# 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 import AgentV1SettingsAudioInput
from .agent_v1settings_audio_output import AgentV1SettingsAudioOutput


class AgentV1SettingsAudio(UniversalBaseModel):
    input: typing.Optional[AgentV1SettingsAudioInput] = pydantic.Field(default=None)
    """
    Audio input configuration settings. If omitted, defaults to encoding=linear16 and sample_rate=24000. Higher sample rates like 44100 Hz provide better audio quality.
    """

    output: typing.Optional[AgentV1SettingsAudioOutput] = pydantic.Field(default=None)
    """
    Audio output configuration settings
    """

    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
