PhoWhisper-small — ONNX export for sherpa-onnx
An ONNX conversion of
vinai/PhoWhisper-small,
int8-quantised, packaged for
sherpa-onnx.
No weights were retrained, fine-tuned or altered beyond format conversion
and quantisation. This repository exists because the conversion output has
no upstream home — VinAI publishes the PyTorch checkpoint, not an ONNX build —
and an application that ships on-device recognition needs somewhere immutable
to fetch one from.
Contents
One archive, phowhisper-small-onnx.tar.gz, holding exactly three files:
| File | What it is |
|---|
phowhisper-small-encoder.int8.onnx | Encoder, int8 |
phowhisper-small-decoder.int8.onnx | Decoder, int8 |
phowhisper-small-tokens.txt | Token table |
The three names are read literally by the consuming application. Renaming one
breaks loading after a successful download, which is the worst place for it to
fail — so if you republish, keep the names.
How it was produced
| Step | Value |
|---|
| Source model | vinai/PhoWhisper-small @ a86b604c346caf7148c37512eafe783a16420adb |
| HF → OpenAI checkpoint | convert_phowhisper_to_openai.py |
| Exporter | k2-fsa/sherpa-onnx @ 00ad9a19a63751a6c4b12050a00eacfeb204814e, scripts/whisper/export-onnx.py |
| Exporter patch | sherpa_onnx_export.patch @ salony-app bf335d1 — adds the phowhisper-* sizes and sets dynamo=False |
| Export date | 2026-08-04 |
| Runtime verified against | sherpa-onnx 1.13.x (Python); app ships Dart sherpa_onnx ^1.13.4 |
The dynamo=False part matters to anyone reproducing this: PyTorch's
torch.onnx.export defaults to the dynamo exporter, which ignores
dynamic_axes. Exported without it, the graph carries fixed shapes and
sherpa-onnx fails at a Reshape node the moment the audio length differs from
the tracing input.
Intended use, and what it is not
Built for short spoken commands in a Vietnamese salon — names, service names,
counts — recognised entirely on-device.
Published WER for PhoWhisper-small, from the paper: 6.33% VIVOS (clean
read speech), 11.08% Common Voice, 32.96% VLSP Task-2 (spontaneous).
Spontaneous speech is the closest analogue to real use, and proper nouns are
the worst case for any recogniser. Treat these as a floor.
Quantisation to int8 is not free. If you need the reference quality, export
fp32 from the same checkpoint rather than assuming these files match it.
Licence
This artifact is a derivative of PhoWhisper and is distributed under the
BSD 3-Clause licence, the licence of the original model. The copyright
notice, licence text and disclaimer below travel with these files as a
condition of redistribution.
Copy the LICENSE file verbatim from vinai/PhoWhisper-small into this
section rather than reconstructing it from a template. BSD-3 texts vary in
the copyright line and occasionally elsewhere, and the obligation is to
reproduce their notice, not a generic one.
PhoWhisper itself is a fine-tune of
OpenAI Whisper,
which is MIT-licensed. That lineage is acknowledged here for accuracy; the
licence governing this artifact is the BSD-3-Clause one above.
Per BSD-3 clause 3, neither the name VinAI Research nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission. Describing a product as
running on PhoWhisper is a statement of fact; describing it as endorsed by
or in partnership with VinAI is not, and is not permitted here.
Citation
The authors ask that PhoWhisper be cited when it is incorporated into other
software. It is:
1@inproceedings{PhoWhisper,
2 title = {{PhoWhisper: Automatic Speech Recognition for Vietnamese}},
3 author = {Thanh-Thien Le and Linh The Nguyen and Dat Quoc Nguyen},
4 booktitle = {Proceedings of the ICLR 2024 Tiny Papers track},
5 year = {2024}
6}
Acknowledgements
- VinAI Research for PhoWhisper.
- OpenAI for Whisper, which PhoWhisper fine-tunes.
- k2-fsa for sherpa-onnx and its export tooling.