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

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .types import (
        AddTargetLanguageOut,
        AudioOutputType,
        AudioStream,
        ConfigStream,
        ConfigStreamPipeline,
        CreateCustomVoiceOut,
        CreateProjectSetupOut,
        CreateStreamOut,
        CreateStreamRequestPayload,
        CreateTranslatedTtsOut,
        CreateTtsOut,
        DataStream,
        DemixingOption,
        DictionaryTerm,
        DictionaryWithTerms,
        DubbingResult,
        ExceptionReasons,
        Folder,
        Formalities,
        Gender,
        GetAudioSeparationResultOut,
        GetCreateProjectSetupResponse,
        GetProbeStreamIn,
        GetProbeStreamOut,
        GetSetupStoryResultResponse,
        GetTextToVoiceResultOut,
        GetTtsResultOutFileUrl,
        HttpValidationError,
        LanguagePydanticModel,
        Languages,
        OrchestratorPipelineCallResult,
        OrchestratorPipelineResult,
        OrchestratorPipelineResultExceptionReason,
        OrchestratorPipelineResultMessage,
        OutputFormat,
        OverdubConfig,
        ProjectDetails,
        RevoicingOption,
        RunIDsRequestPayload,
        SegmentingOption,
        SourceStream,
        StoryDetails,
        StreamCategory,
        StreamTtsInferenceOptions,
        StreamTtsOutputConfiguration,
        StreamTtsVoiceSettings,
        StreamType,
        StreamUrlForLanguages,
        TargetStream,
        TaskStatus,
        TermTranslationInput,
        TermTranslationOutput,
        TextToAudioResult,
        TextToAudioType,
        TranscribingOption,
        Transcript,
        TranscriptDataType,
        TranscriptFileFormat,
        TranscriptionResult,
        TranslatingOption,
        TranslationResult,
        ValidationError,
        ValidationErrorLocItem,
        VideoOutputTypeWithoutAvi,
        VideoStream,
        Voice,
    )
    from .errors import UnprocessableEntityError
    from . import (
        audio_separation,
        deprecated_streaming,
        dictionaries,
        dub,
        folders,
        languages,
        project_setup,
        story,
        streaming,
        text_to_audio,
        text_to_speech,
        text_to_voice,
        transcription,
        translated_story,
        translated_tts,
        translation,
        voice_cloning,
    )
    from .client import AsyncCambAI, CambAI
    from .dub import (
        DubbedOutputInAltFormatRequestPayloadOutputFormat,
        GetDubbedOutputInAltFormatDubAltFormatRunIdLanguagePostResponse,
        GetDubbedRunInfoDubResultRunIdGetResponse,
        GetDubbingRunsResultsDubbingResultsPostResponseValue,
    )
    from .environment import CambApiEnvironment
    from .story import CreateStoryStoryPostResponse, SetupStoryStorySetupPostResponse
    from .text_to_speech import (
        CreateStreamTtsRequestPayloadLanguage,
        CreateStreamTtsRequestPayloadSpeechModel,
        GetTtsResultsTtsResultsPostResponseValue,
        GetTtsRunInfoTtsResultRunIdGetResponse,
    )
    from .voice_cloning import ListVoicesListVoicesGetResponseItem
_dynamic_imports: typing.Dict[str, str] = {
    "AddTargetLanguageOut": ".types",
    "AsyncCambApi": ".client",
    "AudioOutputType": ".types",
    "AudioStream": ".types",
    "CambApi": ".client",
    "CambApiEnvironment": ".environment",
    "ConfigStream": ".types",
    "ConfigStreamPipeline": ".types",
    "CreateCustomVoiceOut": ".types",
    "CreateProjectSetupOut": ".types",
    "CreateStoryStoryPostResponse": ".story",
    "CreateStreamOut": ".types",
    "CreateStreamRequestPayload": ".types",
    "CreateStreamTtsRequestPayloadLanguage": ".text_to_speech",
    "CreateStreamTtsRequestPayloadSpeechModel": ".text_to_speech",
    "CreateTranslatedTtsOut": ".types",
    "CreateTtsOut": ".types",
    "DataStream": ".types",
    "DemixingOption": ".types",
    "DictionaryTerm": ".types",
    "DictionaryWithTerms": ".types",
    "DubbedOutputInAltFormatRequestPayloadOutputFormat": ".dub",
    "DubbingResult": ".types",
    "ExceptionReasons": ".types",
    "Folder": ".types",
    "Formalities": ".types",
    "Gender": ".types",
    "GetAudioSeparationResultOut": ".types",
    "GetCreateProjectSetupResponse": ".types",
    "GetDubbedOutputInAltFormatDubAltFormatRunIdLanguagePostResponse": ".dub",
    "GetDubbedRunInfoDubResultRunIdGetResponse": ".dub",
    "GetDubbingRunsResultsDubbingResultsPostResponseValue": ".dub",
    "GetProbeStreamIn": ".types",
    "GetProbeStreamOut": ".types",
    "GetSetupStoryResultResponse": ".types",
    "GetTextToVoiceResultOut": ".types",
    "GetTtsResultOutFileUrl": ".types",
    "GetTtsResultsTtsResultsPostResponseValue": ".text_to_speech",
    "GetTtsRunInfoTtsResultRunIdGetResponse": ".text_to_speech",
    "HttpValidationError": ".types",
    "LanguagePydanticModel": ".types",
    "Languages": ".types",
    "ListVoicesListVoicesGetResponseItem": ".voice_cloning",
    "OrchestratorPipelineCallResult": ".types",
    "OrchestratorPipelineResult": ".types",
    "OrchestratorPipelineResultExceptionReason": ".types",
    "OrchestratorPipelineResultMessage": ".types",
    "OutputFormat": ".types",
    "OverdubConfig": ".types",
    "ProjectDetails": ".types",
    "RevoicingOption": ".types",
    "RunIDsRequestPayload": ".types",
    "SegmentingOption": ".types",
    "SetupStoryStorySetupPostResponse": ".story",
    "SourceStream": ".types",
    "StoryDetails": ".types",
    "StreamCategory": ".types",
    "StreamTtsInferenceOptions": ".types",
    "StreamTtsOutputConfiguration": ".types",
    "StreamTtsVoiceSettings": ".types",
    "StreamType": ".types",
    "StreamUrlForLanguages": ".types",
    "TargetStream": ".types",
    "TaskStatus": ".types",
    "TermTranslationInput": ".types",
    "TermTranslationOutput": ".types",
    "TextToAudioResult": ".types",
    "TextToAudioType": ".types",
    "TranscribingOption": ".types",
    "Transcript": ".types",
    "TranscriptDataType": ".types",
    "TranscriptFileFormat": ".types",
    "TranscriptionResult": ".types",
    "TranslatingOption": ".types",
    "TranslationResult": ".types",
    "UnprocessableEntityError": ".errors",
    "ValidationError": ".types",
    "ValidationErrorLocItem": ".types",
    "VideoOutputTypeWithoutAvi": ".types",
    "VideoStream": ".types",
    "Voice": ".types",
    "audio_separation": ".audio_separation",
    "deprecated_streaming": ".deprecated_streaming",
    "dictionaries": ".dictionaries",
    "dub": ".dub",
    "folders": ".folders",
    "languages": ".languages",
    "project_setup": ".project_setup",
    "story": ".story",
    "streaming": ".streaming",
    "text_to_audio": ".text_to_audio",
    "text_to_speech": ".text_to_speech",
    "text_to_voice": ".text_to_voice",
    "transcription": ".transcription",
    "translated_story": ".translated_story",
    "translated_tts": ".translated_tts",
    "translation": ".translation",
    "voice_cloning": ".voice_cloning",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "AddTargetLanguageOut",
    "AsyncCambAI",
    "AudioOutputType",
    "AudioStream",
    "CambAI",
    "CambApiEnvironment",
    "ConfigStream",
    "ConfigStreamPipeline",
    "CreateCustomVoiceOut",
    "CreateProjectSetupOut",
    "CreateStoryStoryPostResponse",
    "CreateStreamOut",
    "CreateStreamRequestPayload",
    "CreateStreamTtsRequestPayloadLanguage",
    "CreateStreamTtsRequestPayloadSpeechModel",
    "CreateTranslatedTtsOut",
    "CreateTtsOut",
    "DataStream",
    "DemixingOption",
    "DictionaryTerm",
    "DictionaryWithTerms",
    "DubbedOutputInAltFormatRequestPayloadOutputFormat",
    "DubbingResult",
    "ExceptionReasons",
    "Folder",
    "Formalities",
    "Gender",
    "GetAudioSeparationResultOut",
    "GetCreateProjectSetupResponse",
    "GetDubbedOutputInAltFormatDubAltFormatRunIdLanguagePostResponse",
    "GetDubbedRunInfoDubResultRunIdGetResponse",
    "GetDubbingRunsResultsDubbingResultsPostResponseValue",
    "GetProbeStreamIn",
    "GetProbeStreamOut",
    "GetSetupStoryResultResponse",
    "GetTextToVoiceResultOut",
    "GetTtsResultOutFileUrl",
    "GetTtsResultsTtsResultsPostResponseValue",
    "GetTtsRunInfoTtsResultRunIdGetResponse",
    "HttpValidationError",
    "LanguagePydanticModel",
    "Languages",
    "ListVoicesListVoicesGetResponseItem",
    "OrchestratorPipelineCallResult",
    "OrchestratorPipelineResult",
    "OrchestratorPipelineResultExceptionReason",
    "OrchestratorPipelineResultMessage",
    "OutputFormat",
    "OverdubConfig",
    "ProjectDetails",
    "RevoicingOption",
    "RunIDsRequestPayload",
    "SegmentingOption",
    "SetupStoryStorySetupPostResponse",
    "SourceStream",
    "StoryDetails",
    "StreamCategory",
    "StreamTtsInferenceOptions",
    "StreamTtsOutputConfiguration",
    "StreamTtsVoiceSettings",
    "StreamType",
    "StreamUrlForLanguages",
    "TargetStream",
    "TaskStatus",
    "TermTranslationInput",
    "TermTranslationOutput",
    "TextToAudioResult",
    "TextToAudioType",
    "TranscribingOption",
    "Transcript",
    "TranscriptDataType",
    "TranscriptFileFormat",
    "TranscriptionResult",
    "TranslatingOption",
    "TranslationResult",
    "UnprocessableEntityError",
    "ValidationError",
    "ValidationErrorLocItem",
    "VideoOutputTypeWithoutAvi",
    "VideoStream",
    "Voice",
    "audio_separation",
    "deprecated_streaming",
    "dictionaries",
    "dub",
    "folders",
    "languages",
    "project_setup",
    "story",
    "streaming",
    "text_to_audio",
    "text_to_speech",
    "text_to_voice",
    "transcription",
    "translated_story",
    "translated_tts",
    "translation",
    "voice_cloning",
]
