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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .inference import Inference


class AssistantProsody(UniversalBaseModel):
    """
    **Expression measurement predictions of the assistant's audio output.** Contains inference model results including prosody scores for 48 emotions within the detected expression of the assistant's audio sample.
    """

    custom_session_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions.
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique identifier for the segment.
    """

    models: Inference = pydantic.Field()
    """
    Inference model results.
    """

    type: typing.Literal["assistant_prosody"] = pydantic.Field(default="assistant_prosody")
    """
    The type of message sent through the socket; for an Assistant Prosody message, this must be `assistant_PROSODY`.
    
    This message the expression measurement predictions of the assistant's audio output.
    """

    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
