Customization#
This section demonstrates customization options with ASR models. These options can be used with Streaming and Offline APIs.
Word Boosting#
Word boosting allows you to bias the ASR engine to recognize particular words of interest at request time by assigning them higher scores when decoding the acoustic model’s output. We recommend a boost score in the range of 20 to 100.
python3 python-clients/scripts/asr/transcribe_file.py --server 0.0.0.0:50051 \
--language-code en-US \
--input-file en-US_sample.wav \
--boosted-lm-words "nature" \
--boosted-lm-score 30
Above command will print the transcript as shown below. The model is able to generate the transcript with nature instead of natural in this example.
## what is nature language processing
Automatic Punctuation#
Automatic punctuation and capitalization can be enabled by passing flag --automatic-punctuation
.
python3 python-clients/scripts/asr/transcribe_file.py --server 0.0.0.0:50051 \
--input-file en-US_sample.wav \
--language-code en-US \
--automatic-punctuation
Above command will print the transcript with punctuations and capitalization as shown below.
## What is natural language processing?
Note
Whisper and Canary models does not support any of the above customization parameters.