engine/models/sherpa_protocol library

Classes

SherpaCommand
Sealed Dart 3 command protocol sent from the main UI thread to the Sherpa ASR isolate.
SherpaDestroyCommand
Destroys the recognizer and frees native C++ memory.
SherpaEvent
Sealed Dart 3 event protocol emitted by the Sherpa ASR isolate back to the main thread.
SherpaFlushCommand
Flushes the current utterance across an Ayah boundary without destroying in-flight speech.
SherpaInitCommand
Initializes the ONNX Zipformer CTC streaming engine with model and token asset paths.
SherpaInitErrorEvent
Emitted if asset extraction or ONNX runtime initialization fails.
SherpaInitSuccessEvent
Emitted when the ONNX neural network and cache tensors are successfully initialized.
SherpaRecognizeCommand
Transcribes a raw 16kHz float32 audio chunk.
SherpaResetCommand
Hard resets the streaming buffer and primes attention cache with 300ms pre-roll silence.
SherpaTranscriptionEvent
Streaming transcription result containing decoded text, tokens, and timestamps.