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

import typing

import pydantic
from ....core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .agent_v1settings_audio_input_encoding import AgentV1SettingsAudioInputEncoding


class AgentV1SettingsAudioInput(UniversalBaseModel):
    """
    Audio input configuration settings. If omitted, defaults to encoding=linear16 and sample_rate=24000. Higher sample rates like 44100 Hz provide better audio quality.
    """

    encoding: AgentV1SettingsAudioInputEncoding = pydantic.Field()
    """
    Audio encoding format
    """

    sample_rate: float = pydantic.Field()
    """
    Sample rate in Hz. Common values are 16000, 24000, 44100, 48000
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
