diff --git a/python-api-examples/online-decode-files.py b/python-api-examples/online-decode-files.py index a03afef31..a2e9f3975 100755 --- a/python-api-examples/online-decode-files.py +++ b/python-api-examples/online-decode-files.py @@ -118,7 +118,7 @@ def get_args(): parser.add_argument( "--lm", type=str, - default=0.1, + default="", help="""Used only when --decoding-method is modified_beam_search. path of language model. """, diff --git a/sherpa-onnx/python/sherpa_onnx/online_recognizer.py b/sherpa-onnx/python/sherpa_onnx/online_recognizer.py index b576f1e61..a70acf4a3 100644 --- a/sherpa-onnx/python/sherpa_onnx/online_recognizer.py +++ b/sherpa-onnx/python/sherpa_onnx/online_recognizer.py @@ -47,8 +47,8 @@ def from_transducer( hotwords_file: str = "", provider: str = "cpu", model_type: str = "", - lm:str = "", - scale:float = 0.1, + lm: str = "", + scale: float = 0.1, ): """ Please refer to @@ -148,14 +148,14 @@ def from_transducer( ) lm_config = OnlineLMConfig( - model = lm, - scale = scale, + model=lm, + scale=scale, ) recognizer_config = OnlineRecognizerConfig( feat_config=feat_config, model_config=model_config, - lm_config = lm_config , + lm_config=lm_config, endpoint_config=endpoint_config, enable_endpoint=enable_endpoint_detection, decoding_method=decoding_method,