# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class ElevenLabsTtsParams(UncheckedBaseModel):
    """
    ElevenLabs TTS configuration parameters.
    """

    base_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    WebSocket URL (e.g., "wss://api.elevenlabs.io/v1")
    """

    key: str = pydantic.Field()
    """
    ElevenLabs API key
    """

    model_id: str = pydantic.Field()
    """
    Model ID (e.g., "eleven_flash_v2_5")
    """

    voice_id: str = pydantic.Field()
    """
    Voice ID (e.g., "pNInz6obpgDQGcFmaJgB")
    """

    sample_rate: typing.Optional[int] = pydantic.Field(default=None)
    """
    Audio sample rate in Hz (16kHz for Akool, 24kHz for HeyGen)
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
