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

    key: str = pydantic.Field()
    """
    Google Cloud API key
    """

    voice_name: str = pydantic.Field()
    """
    Google voice name
    """

    language_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Language code (e.g., "en-US")
    """

    sample_rate_hertz: typing.Optional[int] = pydantic.Field(default=None)
    """
    Sample rate in Hz (default depends on selected voice)
    """

    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
