# 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
from .minimax_tts_params_voice_setting import MinimaxTtsParamsVoiceSetting


class MinimaxTtsParams(UncheckedBaseModel):
    """
    MiniMax TTS configuration parameters.
    """

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

    group_id: str = pydantic.Field()
    """
    MiniMax group identifier
    """

    model: str = pydantic.Field()
    """
    TTS model (e.g., speech-02-turbo)
    """

    voice_setting: MinimaxTtsParamsVoiceSetting
    url: str = pydantic.Field()
    """
    WebSocket endpoint (e.g., wss://api-uw.minimax.io/ws/v1/t2a_v2)
    """

    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
