diff --git a/sherpa-onnx/python/sherpa_onnx/offline_recognizer.py b/sherpa-onnx/python/sherpa_onnx/offline_recognizer.py index 6a214297..3ac80f8a 100644 --- a/sherpa-onnx/python/sherpa_onnx/offline_recognizer.py +++ b/sherpa-onnx/python/sherpa_onnx/offline_recognizer.py @@ -82,6 +82,12 @@ class OfflineRecognizer(object): max_active_paths: Maximum number of active paths to keep. Used only when decoding_method is modified_beam_search. + hotwords_file: + The file containing hotwords, one words/phrases per line, and for each + phrase the bpe/cjkchar are separated by a space. + hotwords_score: + The hotword score of each token for biasing word/phrase. Used only if + hotwords_file is given with modified_beam_search as decoding method. blank_penalty: The penalty applied on blank symbol during decoding. debug: diff --git a/sherpa-onnx/python/sherpa_onnx/online_recognizer.py b/sherpa-onnx/python/sherpa_onnx/online_recognizer.py index 6af47e11..a9f9e7d5 100644 --- a/sherpa-onnx/python/sherpa_onnx/online_recognizer.py +++ b/sherpa-onnx/python/sherpa_onnx/online_recognizer.py @@ -100,6 +100,12 @@ class OnlineRecognizer(object): max_active_paths: Use only when decoding_method is modified_beam_search. It specifies the maximum number of active paths during beam search. + hotwords_file: + The file containing hotwords, one words/phrases per line, and for each + phrase the bpe/cjkchar are separated by a space. + hotwords_score: + The hotword score of each token for biasing word/phrase. Used only if + hotwords_file is given with modified_beam_search as decoding method. provider: onnxruntime execution providers. Valid values are: cpu, cuda, coreml. model_type: