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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .transcription_id import TranscriptionId


class AudioSource(UniversalBaseModel):
    audio_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    URL to a downloadable audio file. Either audio_url or audio_file must be provided, but not both.
    """

    audio_file: typing.Optional[str] = pydantic.Field(default=None)
    """
    Base64 encoded audio file content. Either audio_url or audio_file must be provided, but not both.
    """

    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    An optional title for this specific audio file. If a title is not provided, the system will use the batch title followed by "Batch Item i+1". If neither a specific title nor a batch title is available, it will default to "Batch Item i+1". This ensures each audio file has a unique identifier within the batch.
    """

    id: typing.Optional[TranscriptionId] = pydantic.Field(default=None)
    """
    An optional UUID for this specific audio file. If an ID is not provided, the system will generate a UUID for the audio file.
    """

    model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
