models/nemoAsr/src/nemo_asr_engine library
Classes
- NemoAsrEngine
- Greedy decoding, as sherpa-onnx and NeMo do it.
- NemoAsrOnnxBackend
- Runs the ONNX graphs of a NeMo model. A TDT backend keeps the encoder output and the prediction network's state between calls.
Constants
- nemoAsrLeadInSamples → const int
- The quiet that withNemoAsrLeadIn ensures before speech: 250 ms.
Properties
- parakeetTdtV3Blank → int
-
The blank of Parakeet TDT v3, its last token.
final
Functions
-
decodeNemoAsrText(
List< String> vocabulary, List<int> tokens) → String -
Joins SentencePiece tokens:
▁starts a word. Special tokens, such as<unk>and<|nospeech|>, are skipped. -
greedyCtc(
Float32List logProbabilities, int vocabulary) → List< int> - Greedy CTC: the best token of each frame, without repeats and blanks. The blank is the last token.
-
withNemoAsrLeadIn(
Float32List samples) → Float32List -
Returns
sampleswith silence before them, so that they start with at least nemoAsrLeadInSamples of quiet: 10 ms frames below -35 dBFS RMS.