Skip to content

Commit

Permalink
add hotwords docstring to offline_recognizer and online_recognizer (#546
Browse files Browse the repository at this point in the history
)
  • Loading branch information
chiiyeh authored Jan 25, 2024
1 parent 3bb3849 commit 466a685
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sherpa-onnx/python/sherpa_onnx/offline_recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ def from_transducer(
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:
Expand Down
6 changes: 6 additions & 0 deletions sherpa-onnx/python/sherpa_onnx/online_recognizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def from_transducer(
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:
Expand Down

0 comments on commit 466a685

Please sign in to comment.