sherpa-onnx-kws-zipformer - Keyword spotting model for Android
2 min read
The model is designed for offline real-time keyword spotting and voice commands directly on mobile devices. It is built on the streaming Zipformer architecture (around 3.3 million parameters in total) and runs via ONNX Runtime (cross-platform inference engine) as part of the sherpa-onnx engine. The repository contains files optimized for Android apps: the encoder, decoder, and joint modules have been converted to the quantized int8 format (intensive 8-bit weight compression) to reduce size and save memory. The model will be useful for developers building voice assistants or local phrase activation systems without sending audio to a server.
Key features
- Real-time streaming audio processing using the sherpa-onnx framework.
- Compact int8 format (the combined weight of the encoder, decoder, and joiner files is only about 5 MB).
- Support for any number of custom keywords specified via a text file with tokens.
- On-device usage on Android without requiring an internet connection.
What you can do
- Integrate local voice phrase activation into your own Android project using sherpa-onnx.
- Configure a list of custom keywords using tokenization via a BPE model (method of splitting text into subword elements).
- Run streaming speech recognition based on an input audio stream at 16 kHz in mono mode.
Example
Example of keyword tokenization for the engine using the command line utility:
sherpa-onnx-cli text2token --tokens en/tokens.txt --tokens-type bpe --bpe-model en/bpe.modelRead more
DetailsArchitecture: Zipformer (3.3M parameters)
Training: based on the GigaSpeech XL corpus (10,000 hours)
Input data: 16 kHz mono float samples, streaming (chunk 16, left context 64)
License: Apache License 2.0










Comments