Privacy-focused local text-to-speech reader using Piper TTS and Haskell.
- 100% local processing (no cloud APIs)
- Type-safe Haskell implementation
- Read text files
- Read from URLs (planned)
- Multilingual support (35+ languages via Piper)
- Language-based voice selection with
--langflag - Multiple voice support
- Speed control (0.5x - 2.0x)
The Piper binary is already downloaded in bin/.
en_US-bryce-medium.onnx(English - US)es_ES-davefx-medium.onnx(Spanish - Spain)es_MX-claude-high.onnx(Spanish - Mexico)
Preview voices: https://rhasspy.github.io/piper-samples/
- Listen to samples of all available voices
- Find voices in 35+ languages (Arabic, Chinese, French, German, Italian, Portuguese, Russian, etc.)
Download voices:
# Example: Download German voice
cd voices
wget https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/de/de_DE/thorsten/medium/de_DE-thorsten-medium.onnx
wget https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/de/de_DE/thorsten/medium/de_DE-thorsten-medium.onnx.jsonURL structure:
https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/{language}/{locale}/{voice}/{quality}/{filename}
Examples:
- French:
fr/fr_FR/siwis/medium/fr_FR-siwis-medium.onnx - Italian:
it/it_IT/riccardo/x_low/it_IT-riccardo-x_low.onnx - Portuguese:
pt/pt_BR/faber/medium/pt_BR-faber-medium.onnx
Note: Always download both .onnx and .onnx.json files!
cd ~/Programs/piper-reader
cabal buildcabal run piper-reader -- list-voices
# Shows: voice name (Language: code)# Use default voice
cabal run piper-reader -- read-file myfile.txt --play
# Use specific language (auto-selects first matching voice)
cabal run piper-reader -- read-file spanish.txt --lang es --play
# Use specific voice file
cabal run piper-reader -- read-file myfile.txt --voice voices/en_US-bryce-medium.onnx --play# English (automatic voice selection)
echo "Hello world" | cabal run piper-reader -- interactive --lang en --play
# Spanish (automatic voice selection)
echo "Hola mundo" | cabal run piper-reader -- interactive --lang es --play
# With custom speed
cabal run piper-reader -- interactive --lang en --speed 1.5 --play
# Type or paste text, then Ctrl+Dpiper-reader/
├── bin/ # Piper binary (gitignored)
├── voices/ # Voice models (gitignored)
├── src/ # Haskell source
│ ├── Config.hs
│ ├── CLI.hs
│ ├── TTS/
│ │ ├── Types.hs
│ │ └── Piper.hs
│ └── Content/
│ ├── File.hs
│ ├── Fetch.hs
│ └── Parser.hs
└── app/
└── Main.hs
- USAGE.md - Complete usage guide with examples
- VOICES.md - Voice preview, download instructions, and language reference
- NEXT_STEPS.md - Future enhancements and TODOs
MIT