o
    lWiD                     @   s   d dl Z d dlZd dl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 ddlmZmZ ddlmZmZ eejd	Zd
edefddZG dd deZG dd deZdS )    N   )AsyncBaseElevenLabsBaseElevenLabs)ElevenLabsEnvironment)AsyncMusicClientMusicClient)RealtimeTextToSpeechClient)AsyncSpeechToTextClientSpeechToTextClient)AsyncWebhooksClientWebhooksClient.base_urlreturnc                 C   s   t | jS )N)httpxURLhost)r    r   U/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/client.pyget_base_url_host   s   r   c                       f   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
 fddZ  ZS )
ElevenLabsa  
    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 240 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ELEVENLABS_API_KEY   r   environmentapi_keytimeouthttpx_clientr   r   r   r   r   c                   sR   t  j|||||d t| jd| _t| jd| _t| jd| _t	| jd| _
d S Nr   )client_wrapper)super__init__r   _client_wrapper_text_to_speechr   	_webhooksr   _musicr
   _speech_to_textselfr   r   r   r   r   	__class__r   r   r!   -   s   	zElevenLabs.__init__)__name__
__module____qualname____doc__r   
PRODUCTIONosgetenvtypingOptionalstrfloatr   Clientr!   __classcell__r   r   r)   r   r      s$    
r   c                       r   )AsyncElevenLabsa  
    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 240 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                   sD   t  j|||||d t| jd| _t| jd| _t| jd| _d S r   )	r    r!   r   r"   r$   r   r%   r	   r&   r'   r)   r   r   r!   [   s   	zAsyncElevenLabs.__init__)r+   r,   r-   r.   r   r/   r0   r1   r2   r3   r4   r5   r   AsyncClientr!   r7   r   r   r)   r   r8   C   s$    
r8   )r0   r2   r   base_clientr   r   r   r   music_customr   r   realtime_ttsr   speech_to_text_customr	   r
   webhooks_customr   r   castAnyOMITr4   r   r   r8   r   r   r   r   <module>   s    -