diff --git a/egs/librispeech/ASR/zipformer/streaming_ctc_decode.py b/egs/librispeech/ASR/zipformer/streaming_ctc_decode.py index aa031d930..525c0f405 100755 --- a/egs/librispeech/ASR/zipformer/streaming_ctc_decode.py +++ b/egs/librispeech/ASR/zipformer/streaming_ctc_decode.py @@ -128,7 +128,7 @@ def get_parser(): parser.add_argument( "--bpe-model", type=str, - default="data/lang_bpe_2000/bpe.model", + default="data/lang_bpe_500/bpe.model", help="Path to the BPE model", ) @@ -196,6 +196,22 @@ def get_parser(): return parser +def get_decoding_params() -> AttributeDict: + """Parameters for decoding.""" + params = AttributeDict( + { + "feature_dim": 80, + "frame_shift_ms": 10, + "search_beam": 20, + "output_beam": 8, + "min_active_states": 30, + "max_active_states": 10000, + "use_double_scores": True, + } + ) + return params + + def decode_one_chunk( params: AttributeDict, model: nn.Module, @@ -463,21 +479,6 @@ def save_results( logging.info(s) -def get_decoding_params() -> AttributeDict: - """Parameters for decoding.""" - params = AttributeDict( - { - "frame_shift_ms": 10, - "search_beam": 20, - "output_beam": 8, - "min_active_states": 30, - "max_active_states": 10000, - "use_double_scores": True, - } - ) - return params - - @torch.no_grad() def main(): parser = get_parser()