Docs /Templates/ sinapsis-orpheus-cpp

OrpheusTTS

sinapsis-orpheus-cppTTSaudioaudio_generationorpheus_cppspeech

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 set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-orpheus-cpp==1.0.0
uv pip install sinapsis-orpheus-cpp==1.0.0
uv add sinapsis-orpheus-cpp==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

min_p

Minimum probability threshold for token selection. Tokens with probability below this threshold are filtered out. Range: 0.0-1.0. Default: 0.05.

float
Optional
Default: 0.05
n_ctx

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.

int
Optional
Default: 8192
top_k

Top-k sampling parameter. Only the top k most likely tokens are considered for sampling. Default: 40.

int
Optional
Default: 40
top_p

Nucleus sampling probability threshold. Only tokens with cumulative probability <= top_p are considered. Range: 0.0-1.0. Default: 0.95.

float
Optional
Default: 0.95
verbose

Enable verbose logging for model operations. Shows detailed model loading and inference information. Default: False.

bool
Optional
Default: false
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
model_idRequired

Hugging Face model repository ID. Must be a valid repository containing GGUF model files. Required parameter with no default.

str
Required
Default: null
voice_idRequired

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.

str
Required
Default: null
cache_dir

Directory to store downloaded models and cache files. Default: SINAPSIS_CACHE_DIR environment variable.

str
Optional
Default: "/home/ariel/.cache/sinapsis"
n_threads

Number of CPU threads to use for model inference. 0 means auto-detect optimal thread count. Default: 0.

int
Optional
Default: 0
batch_size

Batch size for model inference. Higher values may improve throughput but require more memory. Default: 1.

int
Optional
Default: 1
max_tokens

Maximum number of tokens to generate for speech. Controls the length of generated audio sequences. Default: 2048.

int
Optional
Default: 2048
temperature

Sampling temperature for token generation. Higher values (>1.0) make output more random, lower values (<1.0) make it more deterministic. Default: 0.8.

float
Optional
Default: 0.8
n_gpu_layers

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.

int
Optional
Default: -1
model_variant

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.

str | None
Optional
Default: null
pre_buffer_size

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.

float
Optional
Default: 1.5

Configuration example

Example from the Python docstring:

yaml
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.5
Show schema-based configuration skeleton
yaml
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

Immediate parent: sinapsis_core.template_base.template.Template

Environment variables

Environment definitions belong to their canonical Python modules.

SINAPSIS_CACHE_DIR · defined elsewhere