OrpheusTTS
Python template · sinapsis_orpheus_cpp.templates.orpheus_tts
Overview
Text-to-Speech template using Orpheus model for speech synthesis.
This template converts text input into high-quality speech audio using the Orpheus neural TTS model. It handles model downloading, initialization, and audio generation with configurable voice parameters.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-orpheus-cpp==1.0.0uv pip install sinapsis-orpheus-cpp==1.0.0uv add sinapsis-orpheus-cpp==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Minimum probability threshold for token selection. Tokens with probability below this threshold are filtered out. Range: 0.0-1.0. Default: 0.05.
Optional
Default: 0.05
Context window size (maximum number of tokens). 0 means use the model's maximum trained context size. Larger values require more GPU/RAM memory. Default: 8192.
Optional
Default: 8192
Top-k sampling parameter. Only the top k most likely tokens are considered for sampling. Default: 40.
Optional
Default: 40
Nucleus sampling probability threshold. Only tokens with cumulative probability <= top_p are considered. Range: 0.0-1.0. Default: 0.95.
Optional
Default: 0.95
Enable verbose logging for model operations. Shows detailed model loading and inference information. Default: False.
Optional
Default: false
Optional
Default: null
Hugging Face model repository ID. Must be a valid repository containing GGUF model files. Required parameter with no default.
Required
Default: null
Voice identifier for speech synthesis. Must be a valid voice supported by the Orpheus model. Available voices depend on the specific model variant. Required parameter with no default.
Required
Default: null
Directory to store downloaded models and cache files. Default: SINAPSIS_CACHE_DIR environment variable.
Optional
Default: "/home/ariel/.cache/sinapsis"
Number of CPU threads to use for model inference. 0 means auto-detect optimal thread count. Default: 0.
Optional
Default: 0
Batch size for model inference. Higher values may improve throughput but require more memory. Default: 1.
Optional
Default: 1
Maximum number of tokens to generate for speech. Controls the length of generated audio sequences. Default: 2048.
Optional
Default: 2048
Sampling temperature for token generation. Higher values (>1.0) make output more random, lower values (<1.0) make it more deterministic. Default: 0.8.
Optional
Default: 0.8
Number of model layers to offload to GPU. -1 means use all available layers on GPU for maximum performance. 0 means use CPU only. Default: -1.
Optional
Default: -1
Specific GGUF file to download from the repository. If None, will auto-detect based on model_id naming convention. Use this to specify exact quantization (e.g., "model-q4_k_m.gguf"). Default: None.
Optional
Default: null
Duration in seconds of audio to generate before yielding the first chunk during streaming. Larger values provide smoother audio but higher latency. Default: 1.5.
Optional
Default: 1.5
Configuration example
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: OrpheusTTS
class_name: OrpheusTTS
template_input: InputTemplate
attributes:
n_gpu_layers: -1
n_threads: 0
n_ctx: 8192
model_id: '`replace_me:<class ''str''>`'
model_variant: null
cache_dir: ~/sinapsis
verbose: false
voice_id: '`replace_me:<class ''str''>`'
batch_size: 1
max_tokens: 2048
temperature: 0.8
top_p: 0.95
top_k: 40
min_p: 0.05
pre_buffer_size: 1.5Show schema-based configuration skeleton
templates:
- template_name: "OrpheusTTS"
class_name: "OrpheusTTS"
attributes:
min_p: 0.05
n_ctx: 8192
top_k: 40
top_p: 0.95
verbose: false
model_id: "<required>"
voice_id: "<required>"
cache_dir: "/home/ariel/.cache/sinapsis"
n_threads: 0
batch_size: 1
max_tokens: 2048
temperature: 0.8
n_gpu_layers: -1
model_variant: null
pre_buffer_size: 1.5
Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.