mg-voca: Malagasy mobile TTS
2 min read
The mg-voca model handles text-to-speech tasks for the Malagasy language, producing 24 kHz audio. It supports two voices (female and male) and weighs only 21 MB in ONNX format, enabling local operation on a CPU, in a browser, or on a smartphone without an internet connection. The model architecture is based on the miniature tiny-voca scheme and includes a transformer-based encoder, a duration predictor, and a waveform generator without a separate vocoder. It is well-suited for developers of offline applications, voice assistants, or pipelines paired with speech recognition (STT) systems for the Malagasy language.
Key features
- Compact size: the model weighs only 21 MB, allowing it to run on mobile devices.
- High execution speed: the median sentence generation time is about 146 ms on two CPU threads.
- Two voices: built-in female and male voices trained on data from the Afrivoice Malagasy project.
- Easy setup: operation via ONNX Runtime without heavy dependencies like PyTorch.
What you can do
- Build an offline assistant: integrate the model into a mobile or web application to read out responses without internet access.
- Pair with STT: combine it with a speech recognition model for two-way voice input and output.
- Synthesize speech lines: voice short commands, notifications, and status messages in a Malagasy language interface.
Example
pip install onnxruntime numpy soundfile huggingface_hub
hf download darioooooo0o/malagasy-tts-mgvoca --local-dir mg-tts
python mg-tts/examples/quickstart_tts.py mg-tts "Manao ahoana, inona no vaovao?" hello.wav FRead more
Details• Parameters: about 4.5 million parameters.
• Performance: median of 146 ms per sentence (105x faster than real-time) on 2 CPU threads.
• Quality: naturalness rating of 3.5 out of 5 (according to a single tester).
• License: Apache-2.0 for code and model weights; training audio data is distributed under the CC-BY-4.0 license.










Comments