
    b6i[                        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  G d d      Z G d d      Zy)    )annotationsN   )AsyncClientWrapperSyncClientWrapper)RequestOptions)SpeakerSeparationResponseModel)#StartSpeakerSeparationResponseModel   )AsyncRawSpeakersClientRawSpeakersClient)AsyncAudioClientAudioClientc                  n    e Zd ZddZed	d       Zdd	 	 	 	 	 	 	 d
dZdd	 	 	 	 	 	 	 ddZed        Zy)SpeakersClientc               B    t        |      | _        || _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper_audioselfr   s     x/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/pvc/samples/speakers/client.py__init__zSpeakersClient.__init__   s    ,NK-48    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSpeakersClient
        r   r   s    r   with_raw_responsez SpeakersClient.with_raw_response        r   Nrequest_optionsc               V    | j                   j                  |||      }|j                  S )a^  
        Retrieve the status of the speaker separation process and the list of detected speakers if complete.

        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

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

        Returns
        -------
        SpeakerSeparationResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.samples.speakers.get(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            sample_id="VW7YKqPnjY4h39yTbx2L",
        )
        r"   r   getdatar   voice_id	sample_idr#   	_responses        r   r&   zSpeakersClient.get"   s,    D $$((9o(^	~~r   c               V    | j                   j                  |||      }|j                  S )a1  
        Start speaker separation process for a sample

        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

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

        Returns
        -------
        StartSpeakerSeparationResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.pvc.samples.speakers.separate(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            sample_id="VW7YKqPnjY4h39yTbx2L",
        )
        r"   r   separater'   r(   s        r   r.   zSpeakersClient.separateG   s-    D $$--h	Sb-c	~~r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   audio.clientr   r   )r   r   s     r   audiozSpeakersClient.audiol   s+    ;;1%T5I5IJDK{{r   )r   r   )returnr   r)   strr*   r4   r#   typing.Optional[RequestOptions]r2   r   r)   r4   r*   r4   r#   r5   r2   r	   	__name__
__module____qualname__r   propertyr    r&   r.   r1    r   r   r   r      s    9
     dh##(+#A`#	'#L dh##(+#A`#	,#J  r   r   c                  n    e Zd ZddZed	d       Zdd	 	 	 	 	 	 	 d
dZdd	 	 	 	 	 	 	 ddZed        Zy)AsyncSpeakersClientc               B    t        |      | _        || _        d | _        y r   )r   r   r   r   r   s     r   r   zAsyncSpeakersClient.__init__v   s    1P-9=r   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSpeakersClient
        r   r   s    r   r    z%AsyncSpeakersClient.with_raw_response{   r!   r   Nr"   c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Retrieve the status of the speaker separation process and the list of detected speakers if complete.

        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

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

        Returns
        -------
        SpeakerSeparationResponseModel
            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.speakers.get(
                voice_id="21m00Tcm4TlvDq8ikWAM",
                sample_id="VW7YKqPnjY4h39yTbx2L",
            )


        asyncio.run(main())
        r"   Nr%   r(   s        r   r&   zAsyncSpeakersClient.get   s:     T **..xTc.dd	~~ e   "757c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Start speaker separation process for a sample

        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

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

        Returns
        -------
        StartSpeakerSeparationResponseModel
            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.speakers.separate(
                voice_id="21m00Tcm4TlvDq8ikWAM",
                sample_id="VW7YKqPnjY4h39yTbx2L",
            )


        asyncio.run(main())
        r"   Nr-   r(   s        r   r.   zAsyncSpeakersClient.separate   s:     T **33HiYh3ii	~~ jrB   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr
   )r   r   )r   r0   r   r   )r   r   s     r   r1   zAsyncSpeakersClient.audio   s+    ;;6*$:N:NODK{{r   )r   r   )r2   r   r3   r6   r7   r<   r   r   r>   r>   u   s    >
     dh++(++A`+	'+\ dh++(++A`+	,+Z  r   r>   )
__future__r   typingcore.client_wrapperr   r   core.request_optionsr   'types.speaker_separation_response_modelr   -types.start_speaker_separation_response_modelr	   
raw_clientr   r   TYPE_CHECKINGr0   r   r   r   r>   r<   r   r   <module>rM      sA    #  J 4 W b A	;a aHq qr   