Skip to content

Commit b581ed4

Browse files
author
Nithin Rao Koluguri
committed
Add doc strings
Signed-off-by: Nithin Rao Koluguri <nithinraok>
1 parent 72e003f commit b581ed4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

nemo_asr/calculate_rtf.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
"""
2+
NeMo ASR Model Profiler
3+
4+
This script performs a forward pass on an NeMo ASR models and measures its real-time factor (RTF).
5+
RTF is a metric used to evaluate the processing speed of ASR models.
6+
7+
Parameters:
8+
--model: ASR model name or path to the model checkpoint file.
9+
--decoding_type: Type of decoding to use (ctc or rnnt).
10+
--gpu: GPU device to use.
11+
--batch_size: Batch size to use for inference.
12+
--nbatches: Total number of batches to process.
13+
--warmup_batches: Number of batches to skip as warmup.
14+
--audio: Path to the input audio file for ASR.
15+
--audio_maxlen: Maximum duration of audio to process (in seconds).
16+
--precision: Model precision (16, 32, or bf16).
17+
--cudnn_benchmark: Enable cuDNN benchmarking.
18+
--log: Enable logging.
19+
20+
Example:
21+
python calculate_rtf.py --model stt_en_conformer_ctc_large --decoding_type ctc --gpu 0 --batch_size 1 --nbatches 5 --warmup_batches 5 --audio /path/to/audio.wav --audio_maxlen 600 --precision bf16 --cudnn_benchmark
22+
"""
23+
124
import time
225
import argparse
326
from tqdm import tqdm

0 commit comments

Comments
 (0)