File tree Expand file tree Collapse file tree
examples/asr/asr_chunked_inference/rnnt Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments