ZonosTTS
Python template · sinapsis_zonos.templates.zonos_tts
Overview
Base template for speech synthesis using the Zonos model.
This template is designed to generate high-quality, expressive text-to-speech (TTS) outputs using the Zonos TTS model, which supports multilingual speech generation, speaker cloning, and fine control over various speech attributes like pitch, speaking rate, and emotions.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-zonos==1.0.0uv pip install sinapsis-zonos==1.0.0uv add sinapsis-zonos==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Max frequency for speech in Hz (default: 22050, range: 0-24000).
Optional
Default: 22050
Optional
Default: 420
Model identifier for Zonos. Options: "Zyphra/Zonos-v0.1-transformer", "Zyphra/Zonos-v0.1-hybrid" (default: "Zyphra/Zonos-v0.1-transformer").
Optional
Default: "Zyphra/Zonos-v0.1-transformer"
Denoising strength for hybrid models (default: 4.0, range: 1-5).
Optional
Default: 4
Emotions to apply to generated speech, fine-tuning emotional tone.
Optional
Default: null
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Optional
Default: 0
Language for speech synthesis (default: 'en-us').
Optional
Default: "en-us"
Optional
Default: null
VQ score for hybrid models (default: 0.78, range: 0.5-0.8).
Optional
Default: 0.7
Controls randomness in speech (default: 2.0, range: 1-5).
Optional
Default: 2
Standard deviation for pitch variation (default: 20.0, range: 0-300).
Optional
Default: 20
Path to an audio file for prefix conditioning (e.g., whispering).
Optional
Default: null
Path to an audio file for creating a speaker embedding for voice cloning. output_folder (str): Folder for saving generated audio files (default: SINAPSIS_CACHE_DIR/zonos/audios).
Optional
Default: null
Rate of speech (default: 15.0, range: 5-30).
Optional
Default: 15
If True, the seed is randomized (default: True).
Optional
Default: true
Controls sampling behavior, including `top_p`, `top_k`, `min_p`, `linear`, `conf`, and `quad` parameters for sampling.
Optional
Default: null
Confidence level for randomness. Range: -2.0 to 2.0. Default: 0.0.
Optional
Default: 0
Controls how much low probabilities are reduced. Range: -2.0 to 2.0. Default: 0.0.
Optional
Default: 0
Minimum token probability, scaled by the highest token probability. Range: 0-1. Default: 0.0.
Optional
Default: 0
Number of top tokens to sample from. Range: 0-1024. Default: 0.
Optional
Default: 0
Cumulative probability threshold for nucleus sampling. Range: 0-1. Default: 0.0.
Optional
Default: 0
Controls the token unusualness. Range: -2.0 to 2.0. Default: 0.0.
Optional
Default: 0
If True, applies denoising to speaker embedding.
Optional
Default: false
Keys for conditioning speech without speaker embedding.
Optional
Default: null
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "ZonosTTS"
class_name: "ZonosTTS"
attributes:
fmax: 22050
seed: 420
model: "Zyphra/Zonos-v0.1-transformer"
dnsmos: 4
emotions:
fear: 0
anger: 0
other: 0
disgust: 0
neutral: 0
sadness: 0
surprise: 0
happiness: 0
language: "en-us"
vq_score: 0.7
cfg_scale: 2
pitch_std: 20
prefix_audio: null
speaker_audio: null
speaking_rate: 15
randomized_seed: true
sampling_params:
conf: 0
quad: 0
min_p: 0
top_k: 0
top_p: 0
linear: 0
denoised_speaker: false
unconditional_keys: null
Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.