# 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 VoiceSegment(UncheckedBaseModel):
    voice_id: str = pydantic.Field()
    """
    The voice ID used for this segment
    """

    start_time_seconds: float = pydantic.Field()
    """
    Start time of this voice segment
    """

    end_time_seconds: float = pydantic.Field()
    """
    End time of this voice segment
    """

    character_start_index: int = pydantic.Field()
    """
    Start index in the characters array
    """

    character_end_index: int = pydantic.Field()
    """
    End index in the characters array (exclusive)
    """

    dialogue_input_index: int = pydantic.Field()
    """
    Line of the dialogue (script) that this segment is a part of.
    """

    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
