# 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 OpenAiTtsParams(UncheckedBaseModel):
    """
    OpenAI TTS configuration parameters.
    """

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

    voice: str = pydantic.Field()
    """
    Voice name (e.g., "alloy", "echo", "fable", "onyx", "nova", "shimmer")
    """

    model: typing.Optional[str] = pydantic.Field(default=None)
    """
    Model name (e.g., "tts-1", "tts-1-hd")
    """

    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
