o
    lWi                     @   s`   d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 G dd	 d	ZG d
d dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)VoiceSamplePreviewResponseModel   )AsyncRawAudioClientRawAudioClientc                   @   ^   e Zd ZdefddZedefddZdddd	ed
ede	j
e de	j
e def
ddZdS )AudioClientclient_wrapperc                C      t |d| _d S N)r   )r	   _raw_clientselfr    r   n/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/voices/pvc/samples/audio/client.py__init__      zAudioClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawAudioClient
        r   r   r   r   r   with_raw_response      	zAudioClient.with_raw_responseNremove_background_noiserequest_optionsvoice_id	sample_idr   r   c                C   s   | j j||||d}|jS )a_  
        Retrieve the first 30 seconds of voice sample audio with or without noise removal.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        sample_id : str
            Sample ID to be used

        remove_background_noise : typing.Optional[bool]
            If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VoiceSamplePreviewResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.samples.audio.get(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            sample_id="VW7YKqPnjY4h39yTbx2L",
            remove_background_noise=True,
        )
        r   r   getdatar   r   r    r   r   	_responser   r   r   r"      s   +zAudioClient.get)__name__
__module____qualname__r   r   propertyr	   r   strtypingOptionalboolr   r   r"   r   r   r   r   r      "    r   c                   @   r
   )AsyncAudioClientr   c                C   r   r   )r   r   r   r   r   r   r   L   r   zAsyncAudioClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawAudioClient
        r   r   r   r   r   r   O   r   z"AsyncAudioClient.with_raw_responseNr   r   r    r   r   c                   s"   | j j||||dI dH }|jS )a  
        Retrieve the first 30 seconds of voice sample audio with or without noise removal.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        sample_id : str
            Sample ID to be used

        remove_background_noise : typing.Optional[bool]
            If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        VoiceSamplePreviewResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.pvc.samples.audio.get(
                voice_id="21m00Tcm4TlvDq8ikWAM",
                sample_id="VW7YKqPnjY4h39yTbx2L",
                remove_background_noise=True,
            )


        asyncio.run(main())
        r   Nr!   r$   r   r   r   r"   Z   s
   3zAsyncAudioClient.get)r&   r'   r(   r   r   r)   r   r   r*   r+   r,   r-   r   r   r"   r   r   r   r   r/   K   r.   r/   )r+   core.client_wrapperr   r   core.request_optionsr   )types.voice_sample_preview_response_modelr   
raw_clientr   r	   r   r/   r   r   r   r   <module>   s   @