Skip to content

Commit

Permalink
fix title underline and code-block spacing (#8758)
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Rastorgueva <[email protected]>
  • Loading branch information
erastorgueva-nv authored Mar 27, 2024
1 parent fc74c44 commit 417aa51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/source/asr/asr_language_modeling_and_customization.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#####################
#######################################
ASR Language Modeling and Customization
#####################
#######################################

Language models have shown to help the accuracy of ASR models. NeMo supports the following two approaches to incorporate language models into the ASR models:

Expand Down Expand Up @@ -548,9 +548,9 @@ The following is the list of the arguments for the opengrm script:
+----------------------+--------+------------------+-----------------------------------------------------------------------------------------------------------------+


******************
***************************************************
Context-biasing (word boosting) without external LM
******************
***************************************************

NeMo toolkit supports a fast context-biasing method for CTC and Transducer (RNN-T) ASR models with CTC-based Word Spotter.
The method involves decoding CTC log probabilities with a context graph built for words and phrases from the context-biasing list.
Expand Down
5 changes: 4 additions & 1 deletion docs/source/asr/results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ For more information, see `nemo.collections.asr.modules <./api.html#modules>`__.
-----

Inference with Multi-task Models
^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Multi-task models that use structured prompts require additionl task tokens as input, in which case it is recommended to use manifest as input. Below is an example of using the `nvidia/canary-1b` model:

.. code-block:: python
from nemo.collections.asr.models import EncDecMultiTaskModel
# load model
Expand All @@ -162,6 +163,7 @@ Multi-task models that use structured prompts require additionl task tokens as i
Here the manifest file should be a json file where each line has the following format:

.. code-block:: bash
{
"audio_filepath": "/path/to/audio.wav", # path to the audio file
"duration": None, # duration of the audio in seconds, set to `None` to use full audio
Expand All @@ -175,6 +177,7 @@ Here the manifest file should be a json file where each line has the following f
Note that using manifest allows to specify the task configuration for each audio individually. If we want to use the same task configuration for all the audio files, it can be specified in `transcribe` method directly.

.. code-block:: python
canary_model.transcribe(
audio=[list of audio files],
batch_size=4, # batch size to run the inference with
Expand Down

0 comments on commit 417aa51

Please sign in to comment.