[Release] HaikuTTS: A High-Quality, Natural Voice TTS Engine for Haiku
Hello Haiku community!
I’m excited to announce the first release of HaikuTTS, a powerful, offline text-to-speech engine that brings natural, human-like voices to our favorite operating system.
This project was born out of a desire for a modern, high-quality TTS solution on Haiku. It’s built upon the excellent Piper TTS engine, which is renowned for its natural-sounding voices across many languages. The real breakthrough was porting Piper’s lightweight NCNN version to Haiku.
The entire development process was done on Haiku 64-bit, which included compiling the NCNN static library from source and then rewriting the application logic to integrate with Haiku’s native sound system.
Key Features & Licensing
- High-Quality Offline Voices: No internet connection required.
- Native Haiku Audio: Uses the system’s BSoundPlayer for direct audio playback.
- BSD License: To avoid the GPL license of espeak-ng’s library, HaikuTTS makes a command-line call to the espeak tool for phonemization, keeping the application under a permissive BSD license.
- Semi-Native Build: The core program is a semi-native Haiku application.
How to Use
-
Install espeak: You must have espeak installed from HaikuDepot. The older version available works well enough for this purpose.
-
Download a Voice Model: I have published 29 NCNN voice models on Hugging Face. Download the model you want to use.
-
Download HaikuTTS: Get the program executable from the link below.
-
Run from Terminal: Use the command line to generate speech from text, a file, or standard input.
A special note: It would be fantastic if someone in the community could tackle the challenge of compiling the latest espeak-ng for Haiku, as it would surely improve the quality even further!
Future Plans & Downloads
If this program is well-received, I plan to publish the API and the source code for the core library to allow other developers to integrate it into their applications.
haikutts binary (haiku is 64 bit x86) folder:
- Download HaikuTTS Program: https://k00.fr/kft71a6x
- Download Voice Models: gyroing/PiperTTS-NCNN-Models at main
I look forward to your feedback!
@gyroing (github and huggingface)
program help:
Usage: haikutts <model_dir> <speaker_id> [OPTIONS] [espeak_lang_override]
A command-line Text-to-Speech (TTS) program for the Haiku using Piper NCNN models.
The program automatically detects the model configuration from the specified directory.
Input text is read with the following priority: -t > -f > stdin.
Arguments:
<model_dir> Path to the directory containing all files for a single model
(e.g., *.ncnn.param, *_config.txt).
<speaker_id> The integer ID of the speaker/voice to use. For single-speaker
models, this is typically 0.
[espeak_lang_override] (Optional) Override the espeak voice used for phoneme generation
(e.g., “fr-fr”). If not provided, the “espeak_voice” value
from the config file is used.
Options:
-t, --text “…” The text string to synthesize. Highest priority input.
-f, --file Read input text from a UTF-8 file.
-o, --output Path to save the output as a WAV file. If omitted, the
synthesized audio will be played directly.
-h, --help Show this help message and exit.
example:
echo " hi kaiku" | ./haikutts ./models/en_GB-alba 0