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

from __future__ import annotations

import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .raw_client import AsyncRawWavesClient, RawWavesClient

if typing.TYPE_CHECKING:
    from .asr_streaming.client import AsrStreamingClient, AsyncAsrStreamingClient
    from .lightning.client import AsyncLightningClient, LightningClient
    from .lightning_asr_streaming.client import AsyncLightningAsrStreamingClient, LightningAsrStreamingClient
    from .lightning_large.client import AsyncLightningLargeClient, LightningLargeClient
    from .lightning_v2.client import AsyncLightningV2Client, LightningV2Client
    from .lightning_v2tts.client import AsyncLightningV2TtsClient, LightningV2TtsClient
    from .lightning_v31tts.client import AsyncLightningV31TtsClient, LightningV31TtsClient
    from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient, PronunciationDictionariesClient
    from .pulse_stt_streaming.client import AsyncPulseSttStreamingClient, PulseSttStreamingClient
    from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient
    from .streaming_tts.client import AsyncStreamingTtsClient, StreamingTtsClient
    from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient
    from .voice_cloning.client import AsyncVoiceCloningClient, VoiceCloningClient
    from .voices.client import AsyncVoicesClient, VoicesClient


class WavesClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawWavesClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._pronunciation_dictionaries: typing.Optional[PronunciationDictionariesClient] = None
        self._lightning: typing.Optional[LightningClient] = None
        self._lightning_large: typing.Optional[LightningLargeClient] = None
        self._lightning_v2: typing.Optional[LightningV2Client] = None
        self._voices: typing.Optional[VoicesClient] = None
        self._voice_cloning: typing.Optional[VoiceCloningClient] = None
        self._speech_to_text: typing.Optional[SpeechToTextClient] = None
        self._text_to_speech: typing.Optional[TextToSpeechClient] = None
        self._streaming_tts: typing.Optional[StreamingTtsClient] = None
        self._asr_streaming: typing.Optional[AsrStreamingClient] = None
        self._lightning_asr_streaming: typing.Optional[LightningAsrStreamingClient] = None
        self._lightning_v2tts: typing.Optional[LightningV2TtsClient] = None
        self._lightning_v31tts: typing.Optional[LightningV31TtsClient] = None
        self._pulse_stt_streaming: typing.Optional[PulseSttStreamingClient] = None

    @property
    def with_raw_response(self) -> RawWavesClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawWavesClient
        """
        return self._raw_client

    @property
    def pronunciation_dictionaries(self):
        if self._pronunciation_dictionaries is None:
            from .pronunciation_dictionaries.client import PronunciationDictionariesClient  # noqa: E402

            self._pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper)
        return self._pronunciation_dictionaries

    @property
    def lightning(self):
        if self._lightning is None:
            from .lightning.client import LightningClient  # noqa: E402

            self._lightning = LightningClient(client_wrapper=self._client_wrapper)
        return self._lightning

    @property
    def lightning_large(self):
        if self._lightning_large is None:
            from .lightning_large.client import LightningLargeClient  # noqa: E402

            self._lightning_large = LightningLargeClient(client_wrapper=self._client_wrapper)
        return self._lightning_large

    @property
    def lightning_v2(self):
        if self._lightning_v2 is None:
            from .lightning_v2.client import LightningV2Client  # noqa: E402

            self._lightning_v2 = LightningV2Client(client_wrapper=self._client_wrapper)
        return self._lightning_v2

    @property
    def voices(self):
        if self._voices is None:
            from .voices.client import VoicesClient  # noqa: E402

            self._voices = VoicesClient(client_wrapper=self._client_wrapper)
        return self._voices

    @property
    def voice_cloning(self):
        if self._voice_cloning is None:
            from .voice_cloning.client import VoiceCloningClient  # noqa: E402

            self._voice_cloning = VoiceCloningClient(client_wrapper=self._client_wrapper)
        return self._voice_cloning

    @property
    def speech_to_text(self):
        if self._speech_to_text is None:
            from .speech_to_text.client import SpeechToTextClient  # noqa: E402

            self._speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper)
        return self._speech_to_text

    @property
    def text_to_speech(self):
        if self._text_to_speech is None:
            from .text_to_speech.client import TextToSpeechClient  # noqa: E402

            self._text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper)
        return self._text_to_speech

    @property
    def streaming_tts(self):
        if self._streaming_tts is None:
            from .streaming_tts.client import StreamingTtsClient  # noqa: E402

            self._streaming_tts = StreamingTtsClient(client_wrapper=self._client_wrapper)
        return self._streaming_tts

    @property
    def asr_streaming(self):
        if self._asr_streaming is None:
            from .asr_streaming.client import AsrStreamingClient  # noqa: E402

            self._asr_streaming = AsrStreamingClient(client_wrapper=self._client_wrapper)
        return self._asr_streaming

    @property
    def lightning_asr_streaming(self):
        if self._lightning_asr_streaming is None:
            from .lightning_asr_streaming.client import LightningAsrStreamingClient  # noqa: E402

            self._lightning_asr_streaming = LightningAsrStreamingClient(client_wrapper=self._client_wrapper)
        return self._lightning_asr_streaming

    @property
    def lightning_v2tts(self):
        if self._lightning_v2tts is None:
            from .lightning_v2tts.client import LightningV2TtsClient  # noqa: E402

            self._lightning_v2tts = LightningV2TtsClient(client_wrapper=self._client_wrapper)
        return self._lightning_v2tts

    @property
    def lightning_v31tts(self):
        if self._lightning_v31tts is None:
            from .lightning_v31tts.client import LightningV31TtsClient  # noqa: E402

            self._lightning_v31tts = LightningV31TtsClient(client_wrapper=self._client_wrapper)
        return self._lightning_v31tts

    @property
    def pulse_stt_streaming(self):
        if self._pulse_stt_streaming is None:
            from .pulse_stt_streaming.client import PulseSttStreamingClient  # noqa: E402

            self._pulse_stt_streaming = PulseSttStreamingClient(client_wrapper=self._client_wrapper)
        return self._pulse_stt_streaming


class AsyncWavesClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawWavesClient(client_wrapper=client_wrapper)
        self._client_wrapper = client_wrapper
        self._pronunciation_dictionaries: typing.Optional[AsyncPronunciationDictionariesClient] = None
        self._lightning: typing.Optional[AsyncLightningClient] = None
        self._lightning_large: typing.Optional[AsyncLightningLargeClient] = None
        self._lightning_v2: typing.Optional[AsyncLightningV2Client] = None
        self._voices: typing.Optional[AsyncVoicesClient] = None
        self._voice_cloning: typing.Optional[AsyncVoiceCloningClient] = None
        self._speech_to_text: typing.Optional[AsyncSpeechToTextClient] = None
        self._text_to_speech: typing.Optional[AsyncTextToSpeechClient] = None
        self._streaming_tts: typing.Optional[AsyncStreamingTtsClient] = None
        self._asr_streaming: typing.Optional[AsyncAsrStreamingClient] = None
        self._lightning_asr_streaming: typing.Optional[AsyncLightningAsrStreamingClient] = None
        self._lightning_v2tts: typing.Optional[AsyncLightningV2TtsClient] = None
        self._lightning_v31tts: typing.Optional[AsyncLightningV31TtsClient] = None
        self._pulse_stt_streaming: typing.Optional[AsyncPulseSttStreamingClient] = None

    @property
    def with_raw_response(self) -> AsyncRawWavesClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawWavesClient
        """
        return self._raw_client

    @property
    def pronunciation_dictionaries(self):
        if self._pronunciation_dictionaries is None:
            from .pronunciation_dictionaries.client import AsyncPronunciationDictionariesClient  # noqa: E402

            self._pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper)
        return self._pronunciation_dictionaries

    @property
    def lightning(self):
        if self._lightning is None:
            from .lightning.client import AsyncLightningClient  # noqa: E402

            self._lightning = AsyncLightningClient(client_wrapper=self._client_wrapper)
        return self._lightning

    @property
    def lightning_large(self):
        if self._lightning_large is None:
            from .lightning_large.client import AsyncLightningLargeClient  # noqa: E402

            self._lightning_large = AsyncLightningLargeClient(client_wrapper=self._client_wrapper)
        return self._lightning_large

    @property
    def lightning_v2(self):
        if self._lightning_v2 is None:
            from .lightning_v2.client import AsyncLightningV2Client  # noqa: E402

            self._lightning_v2 = AsyncLightningV2Client(client_wrapper=self._client_wrapper)
        return self._lightning_v2

    @property
    def voices(self):
        if self._voices is None:
            from .voices.client import AsyncVoicesClient  # noqa: E402

            self._voices = AsyncVoicesClient(client_wrapper=self._client_wrapper)
        return self._voices

    @property
    def voice_cloning(self):
        if self._voice_cloning is None:
            from .voice_cloning.client import AsyncVoiceCloningClient  # noqa: E402

            self._voice_cloning = AsyncVoiceCloningClient(client_wrapper=self._client_wrapper)
        return self._voice_cloning

    @property
    def speech_to_text(self):
        if self._speech_to_text is None:
            from .speech_to_text.client import AsyncSpeechToTextClient  # noqa: E402

            self._speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper)
        return self._speech_to_text

    @property
    def text_to_speech(self):
        if self._text_to_speech is None:
            from .text_to_speech.client import AsyncTextToSpeechClient  # noqa: E402

            self._text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper)
        return self._text_to_speech

    @property
    def streaming_tts(self):
        if self._streaming_tts is None:
            from .streaming_tts.client import AsyncStreamingTtsClient  # noqa: E402

            self._streaming_tts = AsyncStreamingTtsClient(client_wrapper=self._client_wrapper)
        return self._streaming_tts

    @property
    def asr_streaming(self):
        if self._asr_streaming is None:
            from .asr_streaming.client import AsyncAsrStreamingClient  # noqa: E402

            self._asr_streaming = AsyncAsrStreamingClient(client_wrapper=self._client_wrapper)
        return self._asr_streaming

    @property
    def lightning_asr_streaming(self):
        if self._lightning_asr_streaming is None:
            from .lightning_asr_streaming.client import AsyncLightningAsrStreamingClient  # noqa: E402

            self._lightning_asr_streaming = AsyncLightningAsrStreamingClient(client_wrapper=self._client_wrapper)
        return self._lightning_asr_streaming

    @property
    def lightning_v2tts(self):
        if self._lightning_v2tts is None:
            from .lightning_v2tts.client import AsyncLightningV2TtsClient  # noqa: E402

            self._lightning_v2tts = AsyncLightningV2TtsClient(client_wrapper=self._client_wrapper)
        return self._lightning_v2tts

    @property
    def lightning_v31tts(self):
        if self._lightning_v31tts is None:
            from .lightning_v31tts.client import AsyncLightningV31TtsClient  # noqa: E402

            self._lightning_v31tts = AsyncLightningV31TtsClient(client_wrapper=self._client_wrapper)
        return self._lightning_v31tts

    @property
    def pulse_stt_streaming(self):
        if self._pulse_stt_streaming is None:
            from .pulse_stt_streaming.client import AsyncPulseSttStreamingClient  # noqa: E402

            self._pulse_stt_streaming = AsyncPulseSttStreamingClient(client_wrapper=self._client_wrapper)
        return self._pulse_stt_streaming
