Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
voirs-cli
Command-line interface for VoiRS speech synthesis framework.
A powerful, user-friendly CLI tool for converting text to speech using the VoiRS framework. Features batch processing, real-time synthesis, voice management, and comprehensive output format support.
Features
- Text-to-Speech Synthesis: Convert text files or direct input to high-quality audio
- SSML Support: Full Speech Synthesis Markup Language processing
- Voice Management: Download, list, and manage voices and models
- Batch Processing: Process multiple files efficiently with progress tracking
- Real-time Synthesis: Interactive mode with live audio playback
- Multiple Formats: Output to WAV, FLAC, MP3, Opus, and streaming audio
- Quality Control: Configurable quality settings and audio enhancement
- Cross-platform: Windows, macOS, and Linux support
Installation
Pre-built Binaries
Download the latest release for your platform from GitHub Releases.
From Source
Package Managers
# Homebrew (macOS/Linux)
# Scoop (Windows)
# Chocolatey (Windows)
Quick Start
# Basic text synthesis
# Use specific voice
# SSML synthesis
# Interactive mode
# List available voices
Commands
synth - Text to Speech Synthesis
Convert text to speech audio.
# Examples
Options
batch - Batch Processing
Process multiple texts or files efficiently.
# Examples
Input Formats
# Text file (one sentence per line)
# CSV file with columns: text,output_name,voice,speed
# JSON file with array of synthesis requests
Options
interactive - Interactive Mode
Start an interactive synthesis session.
# Examples
Interactive Commands
> Hello, this is a test. # Synthesize text
> :voice en-GB-male-formal # Change voice
> :speed 1.2 # Adjust speaking rate
> :pitch +0.5 # Adjust pitch
> :quality ultra # Change quality
> :save last_synthesis.wav # Save last synthesis
> :play # Replay last synthesis
> :ssml <speak><emphasis>Hello</emphasis></speak> # SSML mode
> :help # Show help
> :quit # Exit
voices - Voice Management
Manage available voices and models.
# Subcommands
Examples
# List all voices
# List voices by language
# Search for female voices
# Get voice information
# Download a voice
# Remove unused voices
models - Model Management
Manage synthesis models and backends.
# Subcommands
Examples
# List installed models
# Download VITS model
# Benchmark all models
# Optimize for current GPU
config - Configuration Management
Manage VoiRS configuration and preferences.
# Subcommands
Examples
# Show configuration
# Set default voice
# Set output directory
# Reset configuration
# Export settings
server - HTTP Server Mode
Start VoiRS as an HTTP API server.
# Examples
Options
API Endpoints
benchmark - Performance Testing
Run performance benchmarks and quality tests.
# Examples
Options
)
Configuration
VoiRS uses a hierarchical configuration system with the following precedence:
- Command-line arguments
- Environment variables
- User configuration file (
~/.voirs/config.toml) - System configuration file (
/etc/voirs/config.toml) - Default values
Configuration File
# ~/.voirs/config.toml
[]
= "en-US-female-calm"
= "high"
= 22050
= "wav"
[]
= "~/.voirs/models/"
= "~/.voirs/cache/"
= "~/Downloads/"
[]
= true
= false
= 256
= true
= true
[]
= true
= ["en-US", "en-GB"]
= "en-US-female-neutral"
[]
= "127.0.0.1"
= 8080
= 4
= 5000
= 60
[]
= 4
= true
= true
= true
[]
= "candle" # candle, onnx
= "auto" # auto, cpu, cuda:0, metal
= "fp32" # fp16, fp32
= "4GB"
= "info" # error, warn, info, debug, trace
Environment Variables
# Override configuration with environment variables
Output Formats
WAV (Uncompressed)
FLAC (Lossless Compression)
MP3 (Lossy Compression)
Opus (Modern Codec)
Streaming Audio
# Stream to system audio output
# Stream to file while playing
SSML Support
VoiRS supports Speech Synthesis Markup Language (SSML) for advanced speech control.
Basic SSML
Advanced SSML Examples
<!-- Prosody control -->
This is spoken slowly, in a low pitch, and softly.
<!-- Pauses and breaks -->
Step 1. Step 2. Step 3.
<!-- Phonetic pronunciation -->
You say tomato,
I say tomato.
<!-- Voice selection -->
This is a calm female voice.
This is an energetic male voice!
<!-- Language switching -->
Hello! ¡Hola!
Bonjour!
Batch Processing
Text File Input
# sentences.txt
Hello, this is the first sentence.
This is the second sentence.
And this is the third sentence.
CSV Input with Metadata
text,output_name,voice,speed,pitch
"Hello world",hello,en-US-female-calm,1.0,0.0
"Bonjour le monde",bonjour,fr-FR-female-casual,1.1,0.5
"Hola mundo",hola,es-ES-male-news,0.9,-0.2
JSON Input with Full Control
Performance Optimization
GPU Acceleration
# Use GPU if available
# Specify GPU device
CUDA_VISIBLE_DEVICES=0
# Benchmark GPU performance
Streaming for Long Texts
# Enable streaming for reduced latency
# Interactive streaming
|
Parallel Batch Processing
# Process with 8 parallel jobs
# Monitor resource usage
Audio Quality Enhancement
Basic Enhancement
Advanced Audio Processing
# Custom quality settings
# Professional audio settings
Troubleshooting
Common Issues
Voice not found:
# List available voices
# Download missing voice
GPU not working:
# Check GPU support
|
# Force CPU mode
Poor audio quality:
# Try higher quality settings
# Check sample rate
Memory issues:
# Enable streaming for large texts
# Reduce chunk size
Debug Mode
# Enable verbose logging
VOIRS_LOG_LEVEL=debug
# Save debug information
Performance Issues
# Profile synthesis performance
# Check system resources
# Optimize models for your hardware
Integration Examples
Shell Scripts
#!/bin/bash
# text_to_speech.sh - Convert text files to audio
for; do
done
Python Integration
"""Synthesize text using VoiRS CLI"""
=
=
return
# Usage
Web Integration
// Node.js example using child_process
const = require;
// Usage
.
.;
Contributing
We welcome contributions! Please see the main repository for contribution guidelines.
Development Setup
# Install development dependencies
# Run tests
# Run CLI locally
# Build release version
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.