Piper ONNX Timing Models
Modified Piper TTS models with exposed duration tensors for temporal alignment.
Model Outputs
| Output | Type | Description |
|---|---|---|
audio |
Float32Array | Synthesized speech |
durations |
Float32Array | Frame counts per token |
Duration Format
Durations are expressed in audio frames. To convert to milliseconds:
duration_ms = duration_frames × (hop_size / sample_rate) × 1000
Standard values:
hop_size: 256sample_rate: 22050 (medium models)
Token Structure
The durations array corresponds to a token sequence that includes structural markers:
| ID | Type | Description |
|---|---|---|
| 0 | padding | Inter-token transitions |
| 1 | BOS | Beginning of sentence |
| 2 | EOS | End of sentence |
| 3 | space | Word boundary |
| 4+ | phoneme | Speech sounds |
The token sequence is typically longer than the input phoneme string due to inserted structural tokens.
Configuration
Each model includes a .onnx.json file containing:
phoneme_id_map: Symbol-to-ID mappingsaudio.sample_rate: Sample rate for duration conversion
Source
Based on rhasspy/piper-voices.
Important Notes on Model Selection
- Every model that was based on Lessac was excluded because they're not commercially usable.
- Every MLS (Multilingual LibriSpeech) model is skipped because they failed to produce short audio reliably in any language (just gibberish comes out if the sentence isn't long enough).
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support