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

from __future__ import annotations

import typing

import typing_extensions
from ..types.aws_polly_speak_provider_engine import AwsPollySpeakProviderEngine
from ..types.aws_polly_speak_provider_voice import AwsPollySpeakProviderVoice
from ..types.cartesia_speak_provider_model_id import CartesiaSpeakProviderModelId
from ..types.deepgram_speak_provider_model import DeepgramSpeakProviderModel
from ..types.eleven_labs_speak_provider_model_id import ElevenLabsSpeakProviderModelId
from ..types.open_ai_speak_provider_model import OpenAiSpeakProviderModel
from ..types.open_ai_speak_provider_voice import OpenAiSpeakProviderVoice
from .aws_polly_speak_provider_credentials import AwsPollySpeakProviderCredentialsParams
from .cartesia_speak_provider_voice import CartesiaSpeakProviderVoiceParams


class SpeakSettingsV1Provider_DeepgramParams(typing_extensions.TypedDict):
    type: typing.Literal["deepgram"]
    version: typing_extensions.NotRequired[typing.Literal["v1"]]
    model: DeepgramSpeakProviderModel


class SpeakSettingsV1Provider_ElevenLabsParams(typing_extensions.TypedDict):
    type: typing.Literal["eleven_labs"]
    version: typing_extensions.NotRequired[typing.Literal["v1"]]
    model_id: ElevenLabsSpeakProviderModelId
    language: typing_extensions.NotRequired[str]
    language_code: typing_extensions.NotRequired[str]


class SpeakSettingsV1Provider_CartesiaParams(typing_extensions.TypedDict):
    type: typing.Literal["cartesia"]
    version: typing_extensions.NotRequired[typing.Literal["2025-03-17"]]
    model_id: CartesiaSpeakProviderModelId
    voice: CartesiaSpeakProviderVoiceParams
    language: typing_extensions.NotRequired[str]


class SpeakSettingsV1Provider_OpenAiParams(typing_extensions.TypedDict):
    type: typing.Literal["open_ai"]
    version: typing_extensions.NotRequired[typing.Literal["v1"]]
    model: OpenAiSpeakProviderModel
    voice: OpenAiSpeakProviderVoice


class SpeakSettingsV1Provider_AwsPollyParams(typing_extensions.TypedDict):
    type: typing.Literal["aws_polly"]
    voice: AwsPollySpeakProviderVoice
    language: str
    language_code: typing_extensions.NotRequired[str]
    engine: AwsPollySpeakProviderEngine
    credentials: AwsPollySpeakProviderCredentialsParams


SpeakSettingsV1ProviderParams = typing.Union[
    SpeakSettingsV1Provider_DeepgramParams,
    SpeakSettingsV1Provider_ElevenLabsParams,
    SpeakSettingsV1Provider_CartesiaParams,
    SpeakSettingsV1Provider_OpenAiParams,
    SpeakSettingsV1Provider_AwsPollyParams,
]
