# 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


class PulseTranscriptionResponseMessageWordsItem(UncheckedBaseModel):
    word: typing.Optional[str] = pydantic.Field(default=None)
    """
    The transcribed word
    """

    start: typing.Optional[float] = pydantic.Field(default=None)
    """
    Start time in seconds
    """

    end: typing.Optional[float] = pydantic.Field(default=None)
    """
    End time in seconds
    """

    confidence: typing.Optional[float] = pydantic.Field(default=None)
    """
    Confidence score for the word (0.0 to 1.0)
    """

    speaker: typing.Optional[int] = pydantic.Field(default=None)
    """
    Speaker label (when diarization is enabled)
    """

    speaker_confidence: typing.Optional[float] = pydantic.Field(default=None)
    """
    Confidence score for the speaker assignment (0.0 to 1.0)
    """

    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
