
    b6ix                     `    d dl Z ddlmZmZ ddlmZ ddlmZmZ  G d d      Z	 G d	 d
      Z
y)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions   )AsyncRawAudioClientRawAudioClientc            
           e Zd ZdefdZedefd       Zdddeded	e	j                  e   de	j                  e   fd
Zy)AudioClientclient_wrapperc                &    t        |      | _        y N)r   )r	   _raw_clientselfr   s     q/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/samples/audio/client.py__init__zAudioClient.__init__   s    )H    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAudioClient
        r   r   s    r   with_raw_responsezAudioClient.with_raw_response        r   Nrequest_optionsvoice_id	sample_idr   c             #      K   | j                   j                  |||      5 }|j                  E d{    ddd       y7 # 1 sw Y   yxY ww)a  
        Returns the audio corresponding to a sample attached to a voice.

        Parameters
        ----------
        voice_id : str
            ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.

        sample_id : str
            ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[bytes]
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.samples.audio.get(
            voice_id="voice_id",
            sample_id="sample_id",
        )
        r   Nr   getdata)r   r   r   r   rs        r   r!   zAudioClient.get   sQ     D !!(I!W 	[\vv	 		 	s)   AA?A	AAA
A)__name__
__module____qualname__r   r   propertyr	   r   strtypingOptionalr   Iteratorbytesr!    r   r   r   r   
   sk    I*; I  >     dh##(+#AGQ_A`#		#r   r   c            
           e Zd ZdefdZedefd       Zdddeded	e	j                  e   de	j                  e   fd
Zy)AsyncAudioClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncAudioClient.__init__@   s    .nMr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAudioClient
        r   r   s    r   r   z"AsyncAudioClient.with_raw_responseC   r   r   Nr   r   r   r   c                  K   | j                   j                  |||      4 d{   }|j                  2 3 d{   }| 7 7 6 ddd      d{  7   y# 1 d{  7  sw Y   yxY ww)a  
        Returns the audio corresponding to a sample attached to a voice.

        Parameters
        ----------
        voice_id : str
            ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices.

        sample_id : str
            ID of the sample to be used. You can use the [Get voices](/docs/api-reference/voices/get) endpoint list all the available samples for a voice.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[bytes]
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.samples.audio.get(
                voice_id="voice_id",
                sample_id="sample_id",
            )


        asyncio.run(main())
        r   Nr    )r   r   r   r   r#   _chunks         r   r!   zAsyncAudioClient.getN   sp     T ##'')_'] 	 	ab !  f		 	 	 	 	sd   #A1AA1AA	AA	AA1A		A
A1AA1A."A%#A.*A1)r$   r%   r&   r   r   r'   r   r   r(   r)   r*   r   AsyncIteratorr,   r!   r-   r   r   r/   r/   ?   sn    N*< N  #6     dh,,(+,AGQ_A`,			e	$,r   r/   )r)   core.client_wrapperr   r   core.request_optionsr   
raw_clientr   r	   r   r/   r-   r   r   <module>r8      s(     I 3 ;2 2j; ;r   