Skip to content

Commit 26718b4

Browse files
minor fix in comments
Signed-off-by: lilithgrigoryan <lgrigoryan@nvidia.com>
1 parent c0eece3 commit 26718b4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

examples/asr/asr_chunked_inference/rnnt/speech_to_text_streaming_infer_rnnt.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def main(cfg: TranscriptionConfig) -> TranscriptionConfig:
234234
use_per_stream_biasing = cfg.use_per_stream_biasing
235235

236236
# Change Decoding Config
237+
is_tdt_model = cfg.decoding.get("durations", None) not in (None, [])
237238
with open_dict(cfg.decoding):
238239
if cfg.decoding.strategy == "greedy_batch":
239240
if cfg.decoding.greedy.loop_labels is not True:
@@ -244,10 +245,12 @@ def main(cfg: TranscriptionConfig) -> TranscriptionConfig:
244245
elif cfg.decoding.strategy == "malsd_batch":
245246
pass
246247
elif cfg.decoding.strategy == "maes_batch":
247-
pass
248+
if is_tdt_model:
249+
raise NotImplementedError("`maes_batch` is RNN-T only; use `malsd_batch` for TDT models.")
248250
else:
249251
raise NotImplementedError(
250-
"This script currently supports only `greedy_batch` with Label-Looping or `malsd_batch` strategy with MALSD"
252+
f"Unsupported decoding strategy `{cfg.decoding.strategy}`. "
253+
"Supported: `greedy_batch`, `malsd_batch`, `maes_batch` (RNN-T only)."
251254
)
252255
cfg.decoding.tdt_include_token_duration = cfg.timestamps
253256
cfg.decoding.greedy.preserve_alignments = False

0 commit comments

Comments
 (0)