
    b6iR0                        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j,                  ej.                  d      Z G d d      Z G d d      Zy)    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)AddVoiceResponseModel)"StartPvcVoiceTrainingResponseModel   )AsyncRawPvcClientRawPvcClient)AsyncSamplesClientSamplesClient)AsyncVerificationClientVerificationClient.c                      e Zd ZddZedd       Zeedd	 	 	 	 	 	 	 	 	 	 	 ddZeeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 ddZedd	 	 	 	 	 	 	 dd	Z	ed
        Z
ed        Zy)	PvcClientc               P    t        |      | _        || _        d | _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper_samples_verificationselfr   s     g/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/pvc/client.py__init__zPvcClient.__init__   s&    '~F-8<BF    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPvcClient
        r   r   s    r   with_raw_responsezPvcClient.with_raw_response        r   Ndescriptionlabelsrequest_optionsc               Z    | j                   j                  |||||      }|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]]]
            Labels for the voice. Keys can be language, accent, gender, or age.

        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",
        )
        namelanguager&   r'   r(   r   createdatar   r+   r,   r&   r'   r(   	_responses          r   r.   zPvcClient.create&   s8    \ $$++k&bq , 
	 ~~r   r*   c               \    | j                   j                  ||||||      }|j                  S )an  
        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]]]
            Labels for the voice. Keys can be language, accent, gender, or age.

        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",
        )
        r*   r   updater/   r   voice_idr+   r,   r&   r'   r(   r1   s           r   r4   zPvcClient.updateY   s>    b $$++#+ , 
	 ~~r   model_idr(   c               V    | j                   j                  |||      }|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",
        )
        r7   r   trainr/   r   r6   r8   r(   r1   s        r   r;   zPvcClient.train   s-    J $$**8hXg*h	~~r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   samples.clientr   r   )r   r   s     r   sampleszPvcClient.samples   s+    == 5)9M9MNDM}}r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   verification.clientr   r   )r   r   s     r   verificationzPvcClient.verification   s0    %?!34CWCW!XD!!!r   )r   r   )returnr   r+   strr,   rE   r&   typing.Optional[str]r'   7typing.Optional[typing.Dict[str, typing.Optional[str]]]r(   typing.Optional[RequestOptions]rC   r   r6   rE   r+   rF   r,   rF   r&   rF   r'   rG   r(   rH   rC   r   r6   rE   r8   rF   r(   rH   rC   r	   __name__
__module____qualname__r   propertyr#   OMITr.   r4   r;   r?   rB    r   r   r   r      s"   G     -1JN;?1 1 	1
 *1 H1 91 
1n &*)-,0JN;?99 #	9
 '9 *9 H9 99 
9~ *.;?&& '	&
 9& 
,&P   " "r   r   c                      e Zd ZddZedd       Zeedd	 	 	 	 	 	 	 	 	 	 	 ddZeeeedd	 	 	 	 	 	 	 	 	 	 	 	 	 ddZedd	 	 	 	 	 	 	 dd	Z	ed
        Z
ed        Zy)AsyncPvcClientc               P    t        |      | _        || _        d | _        d | _        y r   )r   r   r   r   r   r   s     r   r   zAsyncPvcClient.__init__   s&    ,NK-=AGKr   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPvcClient
        r!   r"   s    r   r#   z AsyncPvcClient.with_raw_response   r$   r   Nr%   c               v   K   | j                   j                  |||||       d{   }|j                  S 7 w)ae  
        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]]]
            Labels for the voice. Keys can be language, accent, gender, or age.

        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())
        r*   Nr-   r0   s          r   r.   zAsyncPvcClient.create   sF     l **11k&bq 2 
 
	 ~~
s   $979r*   c               x   K   | j                   j                  ||||||       d{   }|j                  S 7 w)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]]]
            Labels for the voice. Keys can be language, accent, gender, or age.

        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())
        r*   Nr3   r5   s           r   r4   zAsyncPvcClient.update  sL     r **11#+ 2 
 
	 ~~
s   %:8:r7   c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)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())
        r7   Nr:   r<   s        r   r;   zAsyncPvcClient.train]  s:     Z **00H^m0nn	~~ os   "757c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   r>   r   r   )r   r   s     r   r?   zAsyncPvcClient.samples  s+    == :.d>R>RSDM}}r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   rA   r   r   )r   r   s     r   rB   zAsyncPvcClient.verification  s0    %D!8H\H\!]D!!!r   )r   r   )rC   r   rD   rI   rJ   rK   rQ   r   r   rS   rS      s*   L     -1JN;?9 9 	9
 *9 H9 99 
9~ &*)-,0JN;?AA #	A
 'A *A HA 9A 
AN *.;?.. '	.
 9. 
,.`   " "r   rS   )
__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   rA   r   r   castAnyrP   r   rS   rQ   r   r   <module>re      sZ    #  H 2 C _ 7	APv{{6::s#v" v"rN" N"r   