
    b6iD                         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j&                  ej(                  d	      Zd
edefdZ G d de      Z G d de      Zy)    N   )AsyncBaseElevenLabsBaseElevenLabs)ElevenLabsEnvironment)AsyncMusicClientMusicClient)RealtimeTextToSpeechClient)AsyncSpeechToTextClientSpeechToTextClient)AsyncWebhooksClientWebhooksClient.base_urlreturnc                 @    t        j                  |       j                  S )N)httpxURLhost)r   s    \/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/client.pyget_base_url_hostr      s    99X###    c                        e Zd ZdZdej
                   ej                  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Z x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                   t         |   |||||       t        | j                        | _        t        | j                        | _        t        | j                        | _        t        | j                        | _
        y Nr   )client_wrapper)super__init__r	   _client_wrapper_text_to_speechr   	_webhooksr   _musicr   _speech_to_textselfr   r   r   r   r   	__class__s         r   r$   zElevenLabs.__init__-   sr     	#% 	 	
  :I]I]^'t7K7KL!1E1EF1AUAUVr   )__name__
__module____qualname____doc__r   
PRODUCTIONosgetenvtypingOptionalstrfloatr   Clientr$   __classcell__r,   s   @r   r   r      s    2 *.-B-M-M(1		2F(G*-6:W //#&W +	W
 %W 'W ooell3W Wr   r   c                        e Zd ZdZdej
                   ej                  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Z xZS )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                    t         |   |||||       t        | j                        | _        t        | j                        | _        t        | j                        | _        y r!   )	r#   r$   r   r%   r'   r   r(   r
   r)   r*   s         r   r$   zAsyncElevenLabs.__init__[   s_     	#% 	 	
 -D<P<PQ&d6J6JK6dFZFZ[r   )r-   r.   r/   r0   r   r1   r2   r3   r4   r5   r6   r7   r   AsyncClientr$   r9   r:   s   @r   r<   r<   C   s    4 *.-B-M-M(1		2F(G*-;?\ //#&\ +	\
 %\ '\ ooe&7&78\ \r   r<   )r2   r4   r   base_clientr   r   r   r   music_customr   r   realtime_ttsr	   speech_to_text_customr
   r   webhooks_customr   r   castAnyOMITr6   r   r   r<    r   r   <module>rH      si    	   < . 7 4 N @ v{{6::s#$ $ $*W *WZ*\) *\r   