# 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 .embedding_audio_metadata_embedding_scopes_item import EmbeddingAudioMetadataEmbeddingScopesItem


class EmbeddingAudioMetadata(UniversalBaseModel):
    """
    Metadata for audio embeddings
    """

    input_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    The publicly accessible URL for the audio file
    """

    input_filename: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the audio file
    """

    embedding_options: typing.List[str] = pydantic.Field()
    """
    Audio embedding options used for generating the embedding
    """

    embedding_scopes: typing.List[EmbeddingAudioMetadataEmbeddingScopesItem] = pydantic.Field()
    """
    Audio embedding scopes
    """

    duration: float = pydantic.Field()
    """
    Duration of the audio in seconds
    """

    start_offset_sec: typing.Optional[float] = pydantic.Field(default=None)
    """
    Start offset in seconds
    """

    end_offset_sec: typing.Optional[float] = pydantic.Field(default=None)
    """
    End offset in seconds
    """

    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
