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

from __future__ import annotations
import io
from livepeer_ai.types import BaseModel
from livepeer_ai.utils import FieldMetadata, MultipartFormMetadata
import pydantic
from typing import IO, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class AudioTypedDict(TypedDict):
    file_name: str
    content: Union[bytes, IO[bytes], io.BufferedReader]
    content_type: NotRequired[str]


class Audio(BaseModel):
    file_name: Annotated[
        str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
    ]

    content: Annotated[
        Union[bytes, IO[bytes], io.BufferedReader],
        pydantic.Field(alias=""),
        FieldMetadata(multipart=MultipartFormMetadata(content=True)),
    ]

    content_type: Annotated[
        Optional[str],
        pydantic.Field(alias="Content-Type"),
        FieldMetadata(multipart=True),
    ] = None


class BodyGenAudioToTextTypedDict(TypedDict):
    audio: AudioTypedDict
    r"""Uploaded audio file to be transcribed."""
    model_id: NotRequired[str]
    r"""Hugging Face model ID used for transcription."""
    return_timestamps: NotRequired[str]
    r"""Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps."""


class BodyGenAudioToText(BaseModel):
    audio: Annotated[Audio, FieldMetadata(multipart=MultipartFormMetadata(file=True))]
    r"""Uploaded audio file to be transcribed."""

    model_id: Annotated[Optional[str], FieldMetadata(multipart=True)] = ""
    r"""Hugging Face model ID used for transcription."""

    return_timestamps: Annotated[Optional[str], FieldMetadata(multipart=True)] = "true"
    r"""Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps."""
