From d7a63bf546fe95f03ed1bf2bab3993a334c1e5d1 Mon Sep 17 00:00:00 2001 From: Hainan Xu Date: Sun, 9 Jun 2024 10:06:42 -0400 Subject: [PATCH] working --- nemo/collections/asr/parts/submodules/ctc_decoding.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nemo/collections/asr/parts/submodules/ctc_decoding.py b/nemo/collections/asr/parts/submodules/ctc_decoding.py index d2bfb629293e..8fee9c9c51c1 100644 --- a/nemo/collections/asr/parts/submodules/ctc_decoding.py +++ b/nemo/collections/asr/parts/submodules/ctc_decoding.py @@ -213,6 +213,9 @@ def __init__(self, decoding_cfg, blank_id: int): self.batch_dim_index = self.cfg.get('batch_dim_index', 0) self.word_seperator = self.cfg.get('word_seperator', ' ') + if self.cfg.strategy == 'greedy_batched': + self.cfg.strategy = 'greedy_batch' + possible_strategies = ['greedy', 'greedy_batch', 'beam', 'pyctcdecode', 'flashlight'] if self.cfg.strategy not in possible_strategies: raise ValueError(f"Decoding strategy must be one of {possible_strategies}. Given {self.cfg.strategy}")