is_dialogue_model (elevenlabs/models.py)

livekit/agents · livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/models.py · python · Apache-2.0
voice, Voice / Speech

Helper that checks whether a given ElevenLabs model name should be processed via the text‑to‑dialogue API.

# Source: https://github.com/livekit/agents | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
from typing import Literal

TTSModels = Literal[
    "eleven_monolingual_v1",
    "eleven_multilingual_v1",
    "eleven_multilingual_v2",
    "eleven_turbo_v2",
    "eleven_turbo_v2_5",
    "eleven_flash_v2_5",
    "eleven_flash_v2",
    "eleven_v3",
    "eleven_v3_conversational",
    "eleven_v4",
    "eleven_v4_turbo",
]

# Synthesized via text-to-dialogue instead of text-to-speech (see tts.py).
DIALOGUE_TTS_MODEL_PREFIXES = ("eleven_v3", "eleven_v4")


def is_dialogue_model(model: str) -> bool:
    """Whether `model` must be synthesized via the text-to-dialogue API."""
    return model.st

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

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

Get a free API key