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

from __future__ import annotations
from .apiconverttexttospeechusingcharacterrequest import (
    APIConvertTextToSpeechUsingCharacterRequest,
    APIConvertTextToSpeechUsingCharacterRequestTypedDict,
)
import httpx
from supertone.types import BaseModel
from supertone.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class StreamSpeechRequestTypedDict(TypedDict):
    voice_id: str
    api_convert_text_to_speech_using_character_request: (
        APIConvertTextToSpeechUsingCharacterRequestTypedDict
    )


class StreamSpeechRequest(BaseModel):
    voice_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]

    api_convert_text_to_speech_using_character_request: Annotated[
        APIConvertTextToSpeechUsingCharacterRequest,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


StreamSpeechResponseResultTypedDict = TypeAliasType(
    "StreamSpeechResponseResultTypedDict", Union[httpx.Response, httpx.Response, str]
)


StreamSpeechResponseResult = TypeAliasType(
    "StreamSpeechResponseResult", Union[httpx.Response, httpx.Response, str]
)


class StreamSpeechResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: StreamSpeechResponseResultTypedDict


class StreamSpeechResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: StreamSpeechResponseResult
