fix(nemo): extract Hypothesis.text for TDT/RNNT ASR models (#10012)
* fix(nemo): extract Hypothesis.text for TDT/RNNT ASR models CTC models (e.g. Whisper) return List[str] from transcribe(), but TDT/RNNT models (e.g. parakeet-tdt-0.6b-v3) return List[Hypothesis] where the decoded text lives in the Hypothesis.text attribute. Previously, results[0] was assigned directly to the protobuf string field, causing silent empty output for non-CTC models. Now checks the return type and extracts .text from Hypothesis objects, with a safe fallback via getattr(). * refactor: simplify Hypothesis text extraction per Copilot review Use single getattr() call instead of hasattr() + double access, and return empty string for unknown types instead of str(result) to avoid leaking internal repr to clients.
番
番茄摔成番茄酱 committed
df7623fd87cf516e9d050fc997cd930283848b6a
Parent: 4e5ec6f
Committed by GitHub <noreply@github.com>
on 5/26/2026, 8:35:23 PM