# 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 TextToDialogueWebsocketVoiceInput(UncheckedBaseModel):
    text: str = pydantic.Field()
    """
    Text appended for this voice. Buffered with prior text until the server triggers generation.
    """

    voice_id: str = pydantic.Field()
    """
    Must be one of the IDs from the initial `voices` array.
    """

    new_turn: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When `true`, the server finalizes the current pending segment (as if the speaker finished their turn) before applying this input.
    """

    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
