"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .converttexttospeechparameters import (
    ConvertTextToSpeechParameters,
    ConvertTextToSpeechParametersTypedDict,
)
from enum import Enum
from supertone.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class PredictTTSDurationUsingCharacterRequestLanguage(str, Enum):
    r"""Language code of the voice"""

    EN = "en"
    KO = "ko"
    JA = "ja"
    ES = "es"
    PT = "pt"


class PredictTTSDurationUsingCharacterRequestOutputFormat(str, Enum):
    r"""The desired output format of the audio file (wav, mp3). Default is wav."""

    WAV = "wav"
    MP3 = "mp3"


class PredictTTSDurationUsingCharacterRequestTypedDict(TypedDict):
    text: str
    r"""The text to convert to speech. Max length is 300 characters."""
    language: PredictTTSDurationUsingCharacterRequestLanguage
    r"""Language code of the voice"""
    style: NotRequired[str]
    r"""The style of character to use for the text-to-speech conversion"""
    model: NotRequired[str]
    r"""The model type to use for the text-to-speech conversion"""
    output_format: NotRequired[PredictTTSDurationUsingCharacterRequestOutputFormat]
    r"""The desired output format of the audio file (wav, mp3). Default is wav."""
    voice_settings: NotRequired[ConvertTextToSpeechParametersTypedDict]


class PredictTTSDurationUsingCharacterRequest(BaseModel):
    text: str
    r"""The text to convert to speech. Max length is 300 characters."""

    language: PredictTTSDurationUsingCharacterRequestLanguage
    r"""Language code of the voice"""

    style: Optional[str] = None
    r"""The style of character to use for the text-to-speech conversion"""

    model: Optional[str] = "sona_speech_1"
    r"""The model type to use for the text-to-speech conversion"""

    output_format: Optional[PredictTTSDurationUsingCharacterRequestOutputFormat] = (
        PredictTTSDurationUsingCharacterRequestOutputFormat.WAV
    )
    r"""The desired output format of the audio file (wav, mp3). Default is wav."""

    voice_settings: Optional[ConvertTextToSpeechParameters] = None
