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

import typing

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


class OverdubConfig(UniversalBaseModel):
    original_audio_gain: typing.Optional[float] = pydantic.Field(default=None)
    """
    Proportion of the original audio (0.0 to 1.0).
    """

    background_audio_gain: typing.Optional[float] = pydantic.Field(default=None)
    """
    Proportion of the background audio (0.0 to 1.0).
    """

    fade_time: typing.Optional[float] = pydantic.Field(default=None)
    """
    Cross-fade duration in seconds (0.0 to 5.0).
    """

    fallback_audio_gain: typing.Optional[float] = pydantic.Field(default=None)
    """
    Proportion of the fallback audio (0.0 to 1.0) (for streaming only).
    """

    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
