OrpheusTTSOptions (orpheus/options.py)

realtime-phone-agents-course · src/realtime_phone_agents/tts/runpod/orpheus/options.py · python · MIT
voice

Defines a Pydantic model for Orpheus TTS API configuration, pulling defaults from settings.

# Source: https://github.com/neural-maze/realtime-phone-agents-course | License: MIT | Copyright 2025 The Neural Maze
# Provided via justclaw.it.com; keep this notice with the code.
from pydantic import BaseModel, Field

from realtime_phone_agents.config import settings

DEFAULT_HEADERS = {"Content-Type": "application/json"}
CUSTOM_TOKEN_PREFIX = "<custom_token_"


class OrpheusTTSOptions(BaseModel):
    """Orpheus TTS options with defaults from Pydantic settings."""

    api_url: str = Field(
        default_factory=lambda: settings.orpheus.api_url,
        description="Orpheus TTS API URL",
    )
    model: str = Field(
        default_factory=lambda: settings.orpheus.model, description="Orpheus TTS Model"
    )
    headers: dict = Field(
        default_factory=lambda: DEFAULT_HEADERS.c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key