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

from __future__ import annotations
from .provideroptions import ProviderOptions, ProviderOptionsTypedDict
from .sttinputaudio import STTInputAudio, STTInputAudioTypedDict
from openrouter.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class STTRequestProviderTypedDict(TypedDict):
    r"""Provider-specific passthrough configuration"""

    options: NotRequired[ProviderOptionsTypedDict]
    r"""Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped."""


class STTRequestProvider(BaseModel):
    r"""Provider-specific passthrough configuration"""

    options: Optional[ProviderOptions] = None
    r"""Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped."""


class STTRequestTypedDict(TypedDict):
    r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio."""

    input_audio: STTInputAudioTypedDict
    r"""Base64-encoded audio to transcribe"""
    model: str
    r"""STT model identifier"""
    language: NotRequired[str]
    r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."""
    provider: NotRequired[STTRequestProviderTypedDict]
    r"""Provider-specific passthrough configuration"""
    temperature: NotRequired[float]
    r"""Sampling temperature for transcription"""


class STTRequest(BaseModel):
    r"""Speech-to-text request input. Accepts a JSON body with input_audio containing base64-encoded audio."""

    input_audio: STTInputAudio
    r"""Base64-encoded audio to transcribe"""

    model: str
    r"""STT model identifier"""

    language: Optional[str] = None
    r"""ISO-639-1 language code (e.g., \"en\", \"ja\"). Auto-detected if omitted."""

    provider: Optional[STTRequestProvider] = None
    r"""Provider-specific passthrough configuration"""

    temperature: Optional[float] = None
    r"""Sampling temperature for transcription"""
