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

from ...core.pydantic_utilities import UniversalBaseModel
from .transcription_id import TranscriptionId
import pydantic
import datetime as dt
from .language import Language
import typing
from .letters_language import LettersLanguage
from .status import Status


class TranscriptionInfo(UniversalBaseModel):
    id: TranscriptionId = pydantic.Field()
    """
    ID of the transcription
    """

    title: str = pydantic.Field()
    """
    Title of the transcription
    """

    created_at: dt.datetime = pydantic.Field()
    """
    When the transcription was created
    """

    primary_language: Language = pydantic.Field()
    """
    The primary language of the audio content, which can be English (en), Hebrew (he), or Yiddish (yi).
    """

    hebrew_word_format: typing.List[LettersLanguage] = pydantic.Field()
    """
    Indicates how Hebrew words are transcribed in the response when the primary language is English.
    - Hebrew words are in Hebrew letters if "he" is specified.
    - Hebrew words are transliterated into English letters if "en" is specified.
    - If both "he" and "en" are specified, both versions are provided back-to-back for each Hebrew word.
    Transliterated Hebrew words are surrounded by <i> tags in the response text.
    """

    num_speakers: int = pydantic.Field()
    """
    Number of speakers in the audio. If more than 1, then speaker labeling is enabled (a pro feature).
    """

    status: Status = pydantic.Field()
    """
    Current status of the transcription
    """

    duration: typing.Optional[float] = pydantic.Field(default=None)
    """
    Duration of the audio in seconds. If None, it means the duration was not calculated yet.
    """

    model: typing.Optional[str] = pydantic.Field(default=None)
    """
    Model used for the transcription. V1 is the latest and most accurate model, especially for audio with longer stretches of Hebrew. V0 is suitable for audio with fewer Hebrew words.
    """

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