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

from ...core.pydantic_utilities import UniversalBaseModel
from .return_voice_provider import ReturnVoiceProvider
import pydantic
import typing
from .return_custom_voice import ReturnCustomVoice
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ReturnVoice(UniversalBaseModel):
    """
    A specific voice specification
    """

    provider: ReturnVoiceProvider = pydantic.Field()
    """
    The provider of the voice to use. Supported values are `HUME_AI` and `CUSTOM_VOICE`.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the specified voice.
    
    This will either be the name of a previously created Custom Voice or one of our 8 base voices: `ITO`, `KORA`, `DACHER`, `AURA`, `FINN`, `WHIMSY`, `STELLA`, or `SUNNY`.
    """

    custom_voice: typing.Optional[ReturnCustomVoice] = None

    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
