VoiRS is a cutting-edge Text-to-Speech (TTS), Voice Recognition, Sound framework that unifies high-performance crates from the cool-japan ecosystem
Rust
46
6 commits
updated Sep 16, 2026
Democratize state-of-the-art speech synthesis with a fully open, memory-safe, and hardware-portable stack built 100% in Rust.
VoiRS is a cutting-edge Text-to-Speech (TTS) framework that unifies high-performance crates from the cool-japan ecosystem (SciRS2, NumRS2, PandRS, TrustformeRS) into a cohesive neural speech synthesis solution.
🚀 Beta Release (0.1.0-beta.1 — 2026-02-26): Core TTS functionality is working and production-ready. Enhanced CUDA GPU acceleration, SciRS2-Core integration with improved SIMD optimizations, comprehensive code quality improvements, and API stabilization for the beta milestone!
# Install CLI tool
cargo install voirs-cli
# Or add to your Rust project
cargo add voirs
use voirs::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let pipeline = VoirsPipeline::builder()
.with_voice("en-US-female-calm")
.build()
.await?;
let audio = pipeline
.synthesize("Hello, world! This is VoiRS speaking in pure Rust.")
.await?;
audio.save_wav("output.wav")?;
Ok(())
}
# Basic synthesis
voirs synth "Hello world" output.wav
# With voice selection
voirs synth "Hello world" output.wav --voice en-US-male-energetic
# SSML support
voirs synth '<speak><emphasis level="strong">Hello</emphasis> world!</speak>' output.wav
# Streaming synthesis
voirs synth --stream "Long text content..." output.wav
# List available voices
voirs voices list
# Train DiffWave vocoder on LJSpeech dataset
voirs train vocoder \
--data /path/to/LJSpeech-1.1 \
--output checkpoints/diffwave \
--model-type diffwave \
--epochs 1000 \
--batch-size 16 \
--lr 0.0002 \
--gpu
# Expected output:
# ✅ Real forward pass SUCCESS! Loss: 25.35
# 💾 Checkpoints saved: 370 parameters, 30MB per file
# 📊 Model: 1,475,136 trainable parameters
# Verify training progress
cat checkpoints/diffwave/best_model.json | jq '{epoch, train_loss, val_loss}'
Training Features:
VoiRS follows a modular pipeline architecture:
Text Input → G2P → Acoustic Model → Vocoder → Audio Output
↓ ↓ ↓ ↓ ↓
SSML Phonemes Mel Spectrograms Neural WAV/OGG
| Component | Description | Backends | Training |
|---|---|---|---|
| G2P | Grapheme-to-Phoneme conversion | Phonetisaurus, OpenJTalk, Neural | ✅ |
| Acoustic | Text → Mel spectrogram | VITS, FastSpeech2 | 🚧 |
| Vocoder | Mel → Waveform | HiFi-GAN, DiffWave | ✅ DiffWave |
| Dataset | Training data utilities | LJSpeech, JVS, Custom | ✅ |
voirs/
├── crates/
│ ├── voirs-g2p/ # Grapheme-to-Phoneme conversion
│ ├── voirs-acoustic/ # Neural acoustic models (VITS)
│ ├── voirs-vocoder/ # Neural vocoders (HiFi-GAN/DiffWave) + Training
│ ├── voirs-dataset/ # Dataset loading and preprocessing
│ ├── voirs-cli/ # Command-line interface + Training commands
│ ├── voirs-ffi/ # C/Python bindings
│ └── voirs-sdk/ # Unified public API
├── models/ # Pre-trained model zoo
├── checkpoints/ # Training checkpoints (SafeTensors)
└── examples/ # Usage examples
cargo# Clone repository
git clone https://github.com/cool-japan/voirs.git
cd voirs
# CPU-only build
cargo build --release
# GPU-accelerated build
cargo build --release --features gpu
# WebAssembly build
cargo build --target wasm32-unknown-unknown --release
# All features
cargo build --release --all-features
# Run tests
cargo nextest run --no-fail-fast
# Run benchmarks
cargo bench
# Check code quality
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --check
# Train a model
voirs train vocoder --data /path/to/dataset --output checkpoints/my-model --model-type diffwave
# Monitor training
tail -f checkpoints/my-model/training.log
| Language | G2P Backend | Status | Quality |
|---|---|---|---|
| English (US) | Phonetisaurus | ✅ Production | MOS 4.5 |
| English (UK) | Phonetisaurus | ✅ Production | MOS 4.4 |
| Japanese | OpenJTalk | ✅ Production | MOS 4.3 |
| Spanish | Neural G2P | 🚧 Beta | MOS 4.1 |
| French | Neural G2P | 🚧 Beta | MOS 4.0 |
| German | Neural G2P | 🚧 Beta | MOS 4.0 |
| Mandarin | Neural G2P | 🚧 Beta | MOS 3.9 |
| Hardware | Backend | RTF | Notes |
|---|---|---|---|
| Intel i7-12700K | CPU | 0.28× | 8-core, 22kHz synthesis |
| Apple M2 Pro | CPU | 0.25× | 12-core, 22kHz synthesis |
| RTX 4080 | CUDA | 0.04× | Batch size 1, 22kHz |
| RTX 4090 | CUDA | 0.03× | Batch size 1, 22kHz |
Explore the examples/ directory for comprehensive usage patterns:
simple_synthesis.rs — Basic text-to-speechbatch_synthesis.rs — Process multiple inputsstreaming_synthesis.rs — Real-time synthesisssml_synthesis.rs — SSML markup supportvoirs train vocoder --data /path/to/LJSpeech-1.1 --output checkpoints/my-voice --model-type diffwave
tail -f checkpoints/my-voice/training.log
cat checkpoints/my-voice/best_model.json | jq '{epoch, train_loss}'
Pure Rust implementation supporting 9 languages with 54 voices!
VoiRS now supports the Kokoro-82M ONNX model for multilingual speech synthesis:
Key Features:
numrs2 for .npz loadingExamples:
kokoro_japanese_demo.rs — Japanese TTSkokoro_chinese_demo.rs — Chinese TTS with tone markskokoro_multilingual_demo.rs — All 9 languageskokoro_espeak_auto_demo.rs — NEW! Automatic IPA generation with eSpeak NG📖 Full documentation: Kokoro Examples Guide
# Run Japanese demo
cargo run --example kokoro_japanese_demo --features onnx --release
# Run all languages
cargo run --example kokoro_multilingual_demo --features onnx --release
# NEW: Automatic IPA generation (7 languages, no manual phonemes needed!)
cargo run --example kokoro_espeak_auto_demo --features onnx --release
We welcome contributions! Please see our Contributing Guide for details.
VoiRS is developed and maintained by COOLJAPAN OU (Team Kitasan).
If you find VoiRS useful, please consider sponsoring the project to support continued development of the Pure Rust ecosystem.
https://github.com/sponsors/cool-japan
Your sponsorship helps us:
Licensed under the Apache License 2.0:
🌐 Website • 📖 Documentation • 💬 Community
Built with ❤️ in Rust by the cool-japan team
6 commits
Rust
97.0%
Python
1.4%
VoiRS is a cutting-edge Text-to-Speech (TTS), Voice Recognition, Sound framework that unifies high-performance crates from the cool-japan ecosystem
Rust
46
6 commits
updated Sep 16, 2026
Democratize state-of-the-art speech synthesis with a fully open, memory-safe, and hardware-portable stack built 100% in Rust.
VoiRS is a cutting-edge Text-to-Speech (TTS) framework that unifies high-performance crates from the cool-japan ecosystem (SciRS2, NumRS2, PandRS, TrustformeRS) into a cohesive neural speech synthesis solution.
🚀 Beta Release (0.1.0-beta.1 — 2026-02-26): Core TTS functionality is working and production-ready. Enhanced CUDA GPU acceleration, SciRS2-Core integration with improved SIMD optimizations, comprehensive code quality improvements, and API stabilization for the beta milestone!
# Install CLI tool
cargo install voirs-cli
# Or add to your Rust project
cargo add voirs
use voirs::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let pipeline = VoirsPipeline::builder()
.with_voice("en-US-female-calm")
.build()
.await?;
let audio = pipeline
.synthesize("Hello, world! This is VoiRS speaking in pure Rust.")
.await?;
audio.save_wav("output.wav")?;
Ok(())
}
# Basic synthesis
voirs synth "Hello world" output.wav
# With voice selection
voirs synth "Hello world" output.wav --voice en-US-male-energetic
# SSML support
voirs synth '<speak><emphasis level="strong">Hello</emphasis> world!</speak>' output.wav
# Streaming synthesis
voirs synth --stream "Long text content..." output.wav
# List available voices
voirs voices list
# Train DiffWave vocoder on LJSpeech dataset
voirs train vocoder \
--data /path/to/LJSpeech-1.1 \
--output checkpoints/diffwave \
--model-type diffwave \
--epochs 1000 \
--batch-size 16 \
--lr 0.0002 \
--gpu
# Expected output:
# ✅ Real forward pass SUCCESS! Loss: 25.35
# 💾 Checkpoints saved: 370 parameters, 30MB per file
# 📊 Model: 1,475,136 trainable parameters
# Verify training progress
cat checkpoints/diffwave/best_model.json | jq '{epoch, train_loss, val_loss}'
Training Features:
VoiRS follows a modular pipeline architecture:
Text Input → G2P → Acoustic Model → Vocoder → Audio Output
↓ ↓ ↓ ↓ ↓
SSML Phonemes Mel Spectrograms Neural WAV/OGG
| Component | Description | Backends | Training |
|---|---|---|---|
| G2P | Grapheme-to-Phoneme conversion | Phonetisaurus, OpenJTalk, Neural | ✅ |
| Acoustic | Text → Mel spectrogram | VITS, FastSpeech2 | 🚧 |
| Vocoder | Mel → Waveform | HiFi-GAN, DiffWave | ✅ DiffWave |
| Dataset | Training data utilities | LJSpeech, JVS, Custom | ✅ |
voirs/
├── crates/
│ ├── voirs-g2p/ # Grapheme-to-Phoneme conversion
│ ├── voirs-acoustic/ # Neural acoustic models (VITS)
│ ├── voirs-vocoder/ # Neural vocoders (HiFi-GAN/DiffWave) + Training
│ ├── voirs-dataset/ # Dataset loading and preprocessing
│ ├── voirs-cli/ # Command-line interface + Training commands
│ ├── voirs-ffi/ # C/Python bindings
│ └── voirs-sdk/ # Unified public API
├── models/ # Pre-trained model zoo
├── checkpoints/ # Training checkpoints (SafeTensors)
└── examples/ # Usage examples
cargo# Clone repository
git clone https://github.com/cool-japan/voirs.git
cd voirs
# CPU-only build
cargo build --release
# GPU-accelerated build
cargo build --release --features gpu
# WebAssembly build
cargo build --target wasm32-unknown-unknown --release
# All features
cargo build --release --all-features
# Run tests
cargo nextest run --no-fail-fast
# Run benchmarks
cargo bench
# Check code quality
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --check
# Train a model
voirs train vocoder --data /path/to/dataset --output checkpoints/my-model --model-type diffwave
# Monitor training
tail -f checkpoints/my-model/training.log
| Language | G2P Backend | Status | Quality |
|---|---|---|---|
| English (US) | Phonetisaurus | ✅ Production | MOS 4.5 |
| English (UK) | Phonetisaurus | ✅ Production | MOS 4.4 |
| Japanese | OpenJTalk | ✅ Production | MOS 4.3 |
| Spanish | Neural G2P | 🚧 Beta | MOS 4.1 |
| French | Neural G2P | 🚧 Beta | MOS 4.0 |
| German | Neural G2P | 🚧 Beta | MOS 4.0 |
| Mandarin | Neural G2P | 🚧 Beta | MOS 3.9 |
| Hardware | Backend | RTF | Notes |
|---|---|---|---|
| Intel i7-12700K | CPU | 0.28× | 8-core, 22kHz synthesis |
| Apple M2 Pro | CPU | 0.25× | 12-core, 22kHz synthesis |
| RTX 4080 | CUDA | 0.04× | Batch size 1, 22kHz |
| RTX 4090 | CUDA | 0.03× | Batch size 1, 22kHz |
Explore the examples/ directory for comprehensive usage patterns:
simple_synthesis.rs — Basic text-to-speechbatch_synthesis.rs — Process multiple inputsstreaming_synthesis.rs — Real-time synthesisssml_synthesis.rs — SSML markup supportvoirs train vocoder --data /path/to/LJSpeech-1.1 --output checkpoints/my-voice --model-type diffwave
tail -f checkpoints/my-voice/training.log
cat checkpoints/my-voice/best_model.json | jq '{epoch, train_loss}'
Pure Rust implementation supporting 9 languages with 54 voices!
VoiRS now supports the Kokoro-82M ONNX model for multilingual speech synthesis:
Key Features:
numrs2 for .npz loadingExamples:
kokoro_japanese_demo.rs — Japanese TTSkokoro_chinese_demo.rs — Chinese TTS with tone markskokoro_multilingual_demo.rs — All 9 languageskokoro_espeak_auto_demo.rs — NEW! Automatic IPA generation with eSpeak NG📖 Full documentation: Kokoro Examples Guide
# Run Japanese demo
cargo run --example kokoro_japanese_demo --features onnx --release
# Run all languages
cargo run --example kokoro_multilingual_demo --features onnx --release
# NEW: Automatic IPA generation (7 languages, no manual phonemes needed!)
cargo run --example kokoro_espeak_auto_demo --features onnx --release
We welcome contributions! Please see our Contributing Guide for details.
VoiRS is developed and maintained by COOLJAPAN OU (Team Kitasan).
If you find VoiRS useful, please consider sponsoring the project to support continued development of the Pure Rust ecosystem.
https://github.com/sponsors/cool-japan
Your sponsorship helps us:
Licensed under the Apache License 2.0:
🌐 Website • 📖 Documentation • 💬 Community
Built with ❤️ in Rust by the cool-japan team
6 commits
Rust
97.0%
Python
1.4%