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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
from ...core.unchecked_base_model import UncheckedBaseModel
from .start_agents_request_properties_asr_vendor import StartAgentsRequestPropertiesAsrVendor


class StartAgentsRequestPropertiesAsr(UncheckedBaseModel):
    """
    Automatic Speech Recognition (ASR) configuration.
    """

    language: typing.Optional[str] = pydantic.Field(default=None)
    """
    The BCP-47 language tag identifying the primary language used for agent interaction. If `params` contains a vendor-specific language code, it takes precedence over this setting.
    """

    vendor: typing.Optional[StartAgentsRequestPropertiesAsrVendor] = pydantic.Field(default=None)
    """
    ASR provider:
    - `ares`: Adaptive Recognition Engine for Speech
    - `microsoft`: Microsoft Azure
    - `deepgram`: Deepgram
    - `openai`: OpenAI (Beta)
    - `speechmatics`: Speechmatics
    - `assemblyai`: AssemblyAI (Beta)
    - `amazon`: Amazon Transcribe (Beta)
    - `google`: Google (Beta)
    - `sarvam`: Sarvam (Beta)
    """

    params: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    The configuration parameters for the ASR vendor. See [ASR Overview](https://docs.agora.io/en/conversational-ai/models/asr/overview) for details.
    """

    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
