models/senseVoice/src/sense_voice_engine library

Classes

SenseVoiceEngine
SenseVoiceOnnxBackend
Runs the SenseVoice graph.

Constants

senseVoiceWithItn → const int
The text normalization input that keeps punctuation and writes numbers as digits ("withitn").

Functions

decodeSenseVoiceText(List<String> vocabulary, List<int> tokens) → String
Joins SentencePiece tokens: ▁ starts a word. Special tokens, such as <unk> and <|en|>, are skipped.
greedySenseVoiceCtc(Float32List logits, int vocabulary) → List<int>
Greedy CTC: the best token of each frame, without repeats and blanks.
parseSenseVoiceTokens(String text) → List<String>
Parses tokens.txt: one token and its ID per line, IDs 0, 1, 2, ...