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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .voice_provider import VoiceProvider
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ReturnVoice(UniversalBaseModel):
    """
    An Octave voice available for text-to-speech
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the voice in the `Voice Library`.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the voice in the `Voice Library`.
    """

    provider: typing.Optional[VoiceProvider] = pydantic.Field(default=None)
    """
    Specifies the provider of the voice.
    
     - **HUME_AI**:  Preset voices generated by Hume. 
    
     - **CUSTOM_VOICE**: Voices you have generated and saved to your  `Voice library`.
    
     If a provider is not specified, the provider will default to `CUSTOM_VOICE`. 
    
      While Hume's preset voices are shared and usable by anyone, your custom voices are only available to calls  made with your API key.
    """

    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
