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

import typing

import typing_extensions
from .transcription_metrics import TranscriptionMetricsParams


class SpeechToTextTranscriptionDataParams(typing_extensions.TypedDict):
    request_id: str
    """
    Unique identifier for the request
    """

    transcript: str
    """
    Transcript of the provided speech in original language
    """

    timestamps: typing_extensions.NotRequired[typing.Dict[str, typing.Optional[typing.Any]]]
    """
    Timestamp information (if available)
    """

    diarized_transcript: typing_extensions.NotRequired[typing.Dict[str, typing.Optional[typing.Any]]]
    """
    Diarized transcript of the provided speech
    """

    language_code: typing_extensions.NotRequired[str]
    """
    BCP-47 code of detected language
    """

    language_probability: typing_extensions.NotRequired[float]
    """
    Float value (0.0 to 1.0) indicating the probability of the detected language being correct. Higher values indicate higher confidence.
    
    **When it returns a value:**
    - When `language_code` is not provided in the request
    - When `language_code` is set to `unknown`
    
    **When it returns null:**
    - When a specific `language_code` is provided (language detection is skipped)
    
    The parameter is always present in the response.
    """

    metrics: TranscriptionMetricsParams
