
    b6iU!                         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                  e j                  d	      Z G d
 d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)EditVoiceSettingsResponseModel)VoiceSettings   )AsyncRawSettingsClientRawSettingsClient.c            	           e Zd ZdefdZedefd       Zdddej                  e
   defdZddd	edej                  e
   defd
Zddd	ededej                  e
   defdZy)SettingsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     l/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/settings/client.py__init__zSettingsClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSettingsClient
        r   r   s    r   with_raw_responsez SettingsClient.with_raw_response        r   Nrequest_optionsr   c                R    | j                   j                  |      }|j                  S )av  
        Gets the default settings for voices. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

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

        Returns
        -------
        VoiceSettings
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.settings.get_default()
        r   r   get_defaultdatar   r   	_responses      r   r!   zSettingsClient.get_default   s'    . $$000Q	~~r   voice_idc                T    | j                   j                  ||      }|j                  S )a4  
        Returns the settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

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

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

        Returns
        -------
        VoiceSettings
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.settings.get(
            voice_id="21m00Tcm4TlvDq8ikWAM",
        )
        r   r   getr"   r   r%   r   r$   s       r   r(   zSettingsClient.get8   s)    8 $$((?(S	~~r   requestc                V    | j                   j                  |||      }|j                  S )ai  
        Edit your settings for a specific voice. "similarity_boost" corresponds to "Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

        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.

        request : VoiceSettings

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

        Returns
        -------
        EditVoiceSettingsResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs, VoiceSettings

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.settings.update(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            request=VoiceSettings(
                stability=1.0,
                use_speaker_boost=True,
                similarity_boost=1.0,
                style=0.0,
                speed=1.0,
            ),
        )
        r*   r   r   updater"   r   r%   r*   r   r$   s        r   r.   zSettingsClient.updateW   s-    N $$++HgWf+g	~~r   )__name__
__module____qualname__r   r   propertyr   r   typingOptionalr   r   r!   strr(   r   r.    r   r   r   r      s    L*; L  #4     QU foon.M Yf 4 X\ C V__^5T `m @ lp(()6(IOYgIh(	'(r   r   c            	           e Zd ZdefdZedefd       Zdddej                  e
   defdZddd	edej                  e
   defd
Zddd	ededej                  e
   defdZy)AsyncSettingsClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   zAsyncSettingsClient.__init__   s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSettingsClient
        r   r   s    r   r   z%AsyncSettingsClient.with_raw_response   r   r   Nr   r   c                n   K   | j                   j                  |       d{   }|j                  S 7 w)a  
        Gets the default settings for voices. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

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

        Returns
        -------
        VoiceSettings
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.settings.get_default()


        asyncio.run(main())
        r   Nr    r#   s      r   r!   zAsyncSettingsClient.get_default   s4     > **666WW	~~ Xs    535r%   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Returns the settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

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

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

        Returns
        -------
        VoiceSettings
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r   Nr'   r)   s       r   r(   zAsyncSettingsClient.get   s7     H **..x.YY	~~ Zs   !646r*   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Edit your settings for a specific voice. "similarity_boost" corresponds to "Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app.

        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.

        request : VoiceSettings

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

        Returns
        -------
        EditVoiceSettingsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs, VoiceSettings

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.settings.update(
                voice_id="21m00Tcm4TlvDq8ikWAM",
                request=VoiceSettings(
                    stability=1.0,
                    use_speaker_boost=True,
                    similarity_boost=1.0,
                    style=0.0,
                    speed=1.0,
                ),
            )


        asyncio.run(main())
        r,   Nr-   r/   s        r   r.   zAsyncSettingsClient.update   s:     ^ **11(G]l1mm	~~ ns   "757)r0   r1   r2   r   r   r3   r
   r   r4   r5   r   r   r!   r6   r(   r   r.   r7   r   r   r9   r9      s    Q*< Q  #9     W[  FOON4S  _l  D ^b %# %6??>;Z %fs %P lp00)60IOYgIh0	'0r   r9   )r4   core.client_wrapperr   r   core.request_optionsr   (types.edit_voice_settings_response_modelr   types.voice_settingsr   
raw_clientr
   r   castAnyOMITr   r9   r7   r   r   <module>rG      sJ     H 2 V 1 A v{{6::s#p pfH Hr   