o
    lWi/                     @  s   d dl mZ 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 dd	lmZmZ ejr?dd
lmZmZ ddlmZmZ eejdZG dd dZG dd dZdS )    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AddVoiceResponseModel)"StartPvcVoiceTrainingResponseModel   )AsyncRawPvcClientRawPvcClient)AsyncSamplesClientSamplesClient)AsyncVerificationClientVerificationClient.c                   @  z   e Zd Zd$ddZed%ddZeed	d
d&ddZeeeed	dd'ddZed	dd(ddZ	ed d! Z
ed"d# Zd	S ))	PvcClientclient_wrapperr   c                C  "   t |d| _|| _d | _d | _d S Nr   )r   _raw_client_client_wrapper_samples_verificationselfr    r   `/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/voices/pvc/client.py__init__      
zPvcClient.__init__returnr   c                 C     | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPvcClient
        r   r   r   r   r   with_raw_response      	zPvcClient.with_raw_responseNdescriptionlabelsrequest_optionsnamestrlanguager'   typing.Optional[str]r(   7typing.Optional[typing.Dict[str, typing.Optional[str]]]r)   typing.Optional[RequestOptions]r   c                C  s   | j j|||||d}|jS )a  
        Creates a new PVC voice with metadata but no samples

        Parameters
        ----------
        name : str
            The name that identifies this voice. This will be displayed in the dropdown of the website.

        language : str
            Language used in the samples.

        description : typing.Optional[str]
            Description to use for the created voice.

        labels : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Serialized labels dictionary for the voice.

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

        Returns
        -------
        AddVoiceResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.create(
            name="John Smith",
            language="en",
        )
        r*   r,   r'   r(   r)   r   createdatar   r*   r,   r'   r(   r)   	_responser   r   r   r2   &   s   .
zPvcClient.creater0   voice_idc                C  s   | j j||||||d}|jS )aV  
        Edit PVC voice metadata

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

        name : typing.Optional[str]
            The name that identifies this voice. This will be displayed in the dropdown of the website.

        language : typing.Optional[str]
            Language used in the samples.

        description : typing.Optional[str]
            Description to use for the created voice.

        labels : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Serialized labels dictionary for the voice.

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

        Returns
        -------
        AddVoiceResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.update(
            voice_id="21m00Tcm4TlvDq8ikWAM",
        )
        r0   r   updater3   r   r6   r*   r,   r'   r(   r)   r5   r   r   r   r8   Y   s   1zPvcClient.updatemodel_idr)   r;   r   c                C  s   | j j|||d}|jS )a  
        Start PVC training process for a voice.

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

        model_id : typing.Optional[str]
            The model ID to use for the conversion.

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

        Returns
        -------
        StartPvcVoiceTrainingResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.train(
            voice_id="21m00Tcm4TlvDq8ikWAM",
        )
        r:   r   trainr3   r   r6   r;   r)   r5   r   r   r   r=      s   %zPvcClient.trainc                 C  *   | j d u rddlm} || jd| _ | j S )Nr	   )r   r   )r   samples.clientr   r   )r   r   r   r   r   samples      
zPvcClient.samplesc                 C  r?   )Nr	   )r   r   )r   verification.clientr   r   )r   r   r   r   r   verification   rB   zPvcClient.verification)r   r   )r    r   r*   r+   r,   r+   r'   r-   r(   r.   r)   r/   r    r   r6   r+   r*   r-   r,   r-   r'   r-   r(   r.   r)   r/   r    r   r6   r+   r;   r-   r)   r/   r    r   __name__
__module____qualname__r   propertyr$   OMITr2   r8   r=   rA   rD   r   r   r   r   r      s*    
7?(
r   c                   @  r   ))AsyncPvcClientr   r   c                C  r   r   )r
   r   r   r   r   r   r   r   r   r      r   zAsyncPvcClient.__init__r    r
   c                 C  r!   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPvcClient
        r"   r#   r   r   r   r$      r%   z AsyncPvcClient.with_raw_responseNr&   r*   r+   r,   r'   r-   r(   r.   r)   r/   r   c                  s$   | j j|||||dI dH }|jS )aM  
        Creates a new PVC voice with metadata but no samples

        Parameters
        ----------
        name : str
            The name that identifies this voice. This will be displayed in the dropdown of the website.

        language : str
            Language used in the samples.

        description : typing.Optional[str]
            Description to use for the created voice.

        labels : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Serialized labels dictionary for the voice.

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

        Returns
        -------
        AddVoiceResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.pvc.create(
                name="John Smith",
                language="en",
            )


        asyncio.run(main())
        r0   Nr1   r4   r   r   r   r2      s
   6
zAsyncPvcClient.creater0   r6   c                  s&   | j j||||||dI dH }|jS )a  
        Edit PVC voice metadata

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

        name : typing.Optional[str]
            The name that identifies this voice. This will be displayed in the dropdown of the website.

        language : typing.Optional[str]
            Language used in the samples.

        description : typing.Optional[str]
            Description to use for the created voice.

        labels : typing.Optional[typing.Dict[str, typing.Optional[str]]]
            Serialized labels dictionary for the voice.

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

        Returns
        -------
        AddVoiceResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.pvc.update(
                voice_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r0   Nr7   r9   r   r   r   r8     s   9zAsyncPvcClient.updater:   r;   r   c                  s    | j j|||dI dH }|jS )a  
        Start PVC training process for a voice.

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

        model_id : typing.Optional[str]
            The model ID to use for the conversion.

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

        Returns
        -------
        StartPvcVoiceTrainingResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.pvc.train(
                voice_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r:   Nr<   r>   r   r   r   r=   ]  s   -zAsyncPvcClient.trainc                 C  r?   )Nr	   )r   r   )r   r@   r   r   )r   r   r   r   r   rA     rB   zAsyncPvcClient.samplesc                 C  r?   )Nr	   )r   r   )r   rC   r   r   )r   r   r   r   r   rD     rB   zAsyncPvcClient.verification)r   r   )r    r
   rE   rF   rG   rH   r   r   r   r   rN      s*    
?G0
rN   )
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   types.add_voice_response_modelr   -types.start_pvc_voice_training_response_modelr   
raw_clientr
   r   TYPE_CHECKINGr@   r   r   rC   r   r   castAnyrM   r   rN   r   r   r   r   <module>   s    :