From 7bd260fb5a7f648f08f2065e1dddab8f4c4ec3d2 Mon Sep 17 00:00:00 2001 From: jinzr Date: Thu, 9 Nov 2023 11:01:21 +0800 Subject: [PATCH] Update decode.py --- egs/multi_zh-hans/ASR/zipformer/decode.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/egs/multi_zh-hans/ASR/zipformer/decode.py b/egs/multi_zh-hans/ASR/zipformer/decode.py index 710d59553..204524a8c 100755 --- a/egs/multi_zh-hans/ASR/zipformer/decode.py +++ b/egs/multi_zh-hans/ASR/zipformer/decode.py @@ -351,6 +351,28 @@ def get_parser(): help="ID of the backoff symbol in the ngram LM", ) + parser.add_argument( + "--context-score", + type=float, + default=2, + help=""" + The bonus score of each token for the context biasing words/phrases. + Used only when --decoding-method is modified_beam_search and + modified_beam_search_LODR. + """, + ) + + parser.add_argument( + "--context-file", + type=str, + default="", + help=""" + The path of the context biasing lists, one word/phrase each line + Used only when --decoding-method is modified_beam_search and + modified_beam_search_LODR. + """, + ) + add_model_arguments(parser) return parser