o
    "i                     @   sF  d dl Z d dlZd dlZddlmZmZ ddlmZmZ ddl	m
Z
mZ ddlmZmZ ddlmZ ddlmZmZ dd	lmZmZ dd
lmZmZ ddlmZmZ ddlmZmZ ddl m!Z!m"Z" ddl#m$Z$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z-m.Z. G dd dZ/G dd dZ0dddej1e2 dede2fddZ3dS )    N   )AsyncAudioNativeClientAudioNativeClient)AsyncChaptersClientChaptersClient)AsyncClientWrapperSyncClientWrapper)AsyncDubbingClientDubbingClient)ElevenLabsEnvironment)AsyncHistoryClientHistoryClient)AsyncModelsClientModelsClient)AsyncProjectsClientProjectsClient)"AsyncPronunciationDictionaryClientPronunciationDictionaryClient)AsyncSamplesClientSamplesClient)AsyncSpeechToSpeechClientSpeechToSpeechClient)AsyncTextToSpeechClientTextToSpeechClient)AsyncUserClient
UserClient)AsyncVoiceGenerationClientVoiceGenerationClient)AsyncVoicesClientVoicesClientc                   @   ^   e Zd ZdZdejedddddej	e
 dedej	e
 d	ej	e d
ej	ej f
ddZdS )BaseElevenLabsa  
    Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.

    Parameters:
        - base_url: typing.Optional[str]. The base url to use for requests from the client.

        - environment: ElevenLabsEnvironment. The environment to use for requests from the client. from .environment import ElevenLabsEnvironment

                                              Defaults to ElevenLabsEnvironment.PRODUCTION

        - api_key: typing.Optional[str].

        - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds.

        - httpx_client: typing.Optional[httpx.Client]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
    ---
    from elevenlabs.client import ElevenLabs

    client = ElevenLabs(
        api_key="YOUR_API_KEY",
    )
    NELEVEN_API_KEY<   base_urlenvironmentapi_keytimeouthttpx_clientr%   r&   r'   r(   r)   c                C      t t||d||d u rtj|dn|d| _t| jd| _t| jd| _t	| jd| _
t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _t| jd| _d S Nr%   r&   )r(   )r%   r'   r)   )client_wrapper)r   _get_base_urlhttpxClient_client_wrapperr   historyr   samplesr   text_to_speechr   speech_to_speechr   voice_generationr   userr   voicesr   projectsr   chaptersr
   dubbingr   modelsr   audio_nativer   pronunciation_dictionaryselfr%   r&   r'   r(   r)    rA   Z/var/www/html/voicebot/backend/venv/lib/python3.10/site-packages/elevenlabs/base_client.py__init__1   $   	
zBaseElevenLabs.__init__)__name__
__module____qualname____doc__r   
PRODUCTIONosgetenvtypingOptionalstrfloatr/   r0   rC   rA   rA   rA   rB   r!      $    
r!   c                   @   r    )AsyncBaseElevenLabsa(  
    Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.

    Parameters:
        - base_url: typing.Optional[str]. The base url to use for requests from the client.

        - environment: ElevenLabsEnvironment. The environment to use for requests from the client. from .environment import ElevenLabsEnvironment

                                              Defaults to ElevenLabsEnvironment.PRODUCTION

        - api_key: typing.Optional[str].

        - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds.

        - httpx_client: typing.Optional[httpx.AsyncClient]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
    ---
    from elevenlabs.client import AsyncElevenLabs

    client = AsyncElevenLabs(
        api_key="YOUR_API_KEY",
    )
    Nr"   r#   r$   r%   r&   r'   r(   r)   c                C   r*   r+   )r   r.   r/   AsyncClientr1   r   r2   r   r3   r   r4   r   r5   r   r6   r   r7   r   r8   r   r9   r   r:   r	   r;   r   r<   r   r=   r   r>   r?   rA   rA   rB   rC   f   rD   zAsyncBaseElevenLabs.__init__)rE   rF   rG   rH   r   rI   rJ   rK   rL   rM   rN   rO   r/   rR   rC   rA   rA   rA   rB   rQ   N   rP   rQ   )r%   r%   r&   returnc                 C   s"   | d ur| S |d ur|j S td)NzEPlease pass in either base_url or environment to construct the client)value	Exceptionr,   rA   rA   rB   r.      s
   r.   )4rJ   rL   r/   audio_native.clientr   r   chapters.clientr   r   core.client_wrapperr   r   dubbing.clientr	   r
   r&   r   history.clientr   r   models.clientr   r   projects.clientr   r   pronunciation_dictionary.clientr   r   samples.clientr   r   speech_to_speech.clientr   r   text_to_speech.clientr   r   user.clientr   r   voice_generation.clientr   r   voices.clientr   r   r!   rQ   rM   rN   r.   rA   rA   rA   rB   <module>   s*   5&5