# 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 .listen_v1results_channel_alternatives_item_words_item import ListenV1ResultsChannelAlternativesItemWordsItem


class ListenV1ResultsChannelAlternativesItem(UniversalBaseModel):
    transcript: str = pydantic.Field()
    """
    The transcript of the transcription
    """

    confidence: float = pydantic.Field()
    """
    The confidence of the transcription
    """

    languages: typing.Optional[typing.List[str]] = None
    words: typing.List[ListenV1ResultsChannelAlternativesItemWordsItem]

    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
