AI GitHub
Vosk for offline streaming speech recognition
Add local speech-to-text to applications through a language-specific model and API.
Key Takeaways
- Vosk offers recognition bindings and prebuilt models for documented languages.
- Download a model for the relevant language and use input with the expected sample rate.
- Run a language model on target hardware and test names, numbers and short pauses.
- Model size and domain coverage affect accuracy.
How it works
Vosk offers recognition bindings and prebuilt models for documented languages. A streaming client can provide audio chunks and consume intermediate and final results.
What you need
Download a model for the relevant language and use input with the expected sample rate. Keep decoding and microphone buffering separate when debugging delays.
What to try first
Run a language model on target hardware and test names, numbers and short pauses. Compare streaming latency with a reference transcript.
Feed the same recording in different chunk sizes. This checks whether apparent latency comes from the application buffering audio or the recognition process.
Where to look for failures
Model size and domain coverage affect accuracy. Confirm sample rate and language assumptions before using microphone or telephone inputs.
Related Franklin pages
Test startup, partial results and end-of-utterance delay on the intended device. An offline throughput figure does not capture how long a user waits to see the first text.
- Run compatible Whisper models through a native inference engine. whisper.cpp for local Whisper transcription
- Embed supported speech models in applications through ONNX-based runtimes. sherpa-onnx for local speech applications
For an application where the quality of recording and handling audio matters, see Franklin’s Open Mic AI profile. Open Mic AI
Project documentation
Try it for your workflow
Explore the project’s documentation for setup and usage, or save this page to a collection for later.
Read the project documentation ↗