tiny-voca-ca
compact Catalan text-to-speech for the browser
2 min read
This compact 22 MB text-to-speech (TTS) engine generates Central Catalan speech directly in the browser. Its architecture splits into two ONNX files—one handling phonemes and acoustic features, the other generating the waveform. Built in Rust and compiled to WebAssembly, it keeps all user data completely on-device. It includes two professional voices from the FestCat dataset: female (ona) and male (pau).
Key features
- Fully offline in the browser: runs serverless via WebAssembly and the tract engine.
- Ultralightweight: weighs just 22 MB total, split into 7 MB and 15.5 MB files.
- Two voices: supports
onaandpauwith 24 kHz mono audio output. - Fast inference: runs 6x faster than real time on a single thread on a Poco X6 smartphone.
What you can do
- Web app integration: run local speech synthesis directly on web pages or inside a Web Worker.
- Mobile web tools: power lightweight offline assistants in phone and tablet browsers.
- Catalan voiceovers: generate speech on the fly without sending audio or text to remote servers.
Example
import { TinyVoca } from './tiny-voca.js';
const tts = await TinyVoca.load({ model: '[https://huggingface.co/ttzzs/tiny-voca-ca/resolve/main](https://huggingface.co/ttzzs/tiny-voca-ca/resolve/main)', language: 'ca' });
const audio = tts.speak('Bon dia, com va?', { voice: 'pau' });Read more
DetailsBenchmarks: achieves a 14.8% WER on the test set (comparable to the original speaker recordings at 17.0%).
Limitations: struggles with acronyms, rare abbreviations, and question intonation; supports Central Catalan only.
License: CC BY-SA 4.0 (based on the FestCat dataset and the tiny-voca architecture).










Comments