
    b6i%                    v   d dl mZ d dlZddlm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 dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZmZ ddlmZ ddlmZ ej>                  r ddl m!Z!m"Z" ddl#m$Z$m%Z% ddl&m'Z'm(Z( ddl)m*Z*m+Z+  ejX                  ejZ                  d      Z. G d d      Z/ G d d      Z0y)    )annotationsN   )core)AsyncClientWrapperSyncClientWrapper)RequestOptions)AddVoiceResponseModel)DeleteVoiceResponseModel)EditVoiceResponseModel)GetLibraryVoicesResponse)GetVoicesResponse)GetVoicesV2Response)Voice   )AsyncRawVoicesClientRawVoicesClient)VoicesGetSharedRequestCategory)VoicesUpdateRequestLabels)AsyncIvcClient	IvcClient)AsyncPvcClient	PvcClient)AsyncSamplesClientSamplesClient)AsyncSettingsClientSettingsClient.c                     e Zd ZddZedd       Zddd	 	 	 	 	 ddZddddddddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddd	 	 	 	 	 	 	 dd	Zdd
	 	 	 	 	 ddZ	e
e
e
e
dd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdd
	 	 	 	 	 	 	 	 	 ddZdddddddddddddddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe
e
e
dd	 	 	 	 	 	 	 	 	 d dZed        Zed        Zed        Zed        Zy)!VoicesClientc               l    t        |      | _        || _        d | _        d | _        d | _        d | _        y Nclient_wrapper)r   _raw_client_client_wrapper	_settings_ivc_pvc_samplesselfr"   s     c/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/client.py__init__zVoicesClient.__init__   s3    *.I-:>04	04	8<    c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawVoicesClient
        r#   r*   s    r+   with_raw_responsezVoicesClient.with_raw_response'        r-   Nshow_legacyrequest_optionsc               T    | j                   j                  ||      }|j                  S )a  
        Returns a list of all available voices for a user.

        Parameters
        ----------
        show_legacy : typing.Optional[bool]
            If set to true, legacy premade voices will be included in responses from /v1/voices

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

        Returns
        -------
        GetVoicesResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.get_all(
            show_legacy=True,
        )
        r3   r#   get_alldatar*   r4   r5   	_responses       r+   r8   zVoicesClient.get_all2   s*    < $$,,Ve,f	~~r-   next_page_token	page_sizesearchsortsort_direction
voice_typecategoryfine_tuning_statecollection_idinclude_total_count	voice_idsr5   c               h    | j                   j                  |||||||||	|
||      }|j                  S )a  
        Gets a list of all available voices for a user with search, filtering and pagination.

        Parameters
        ----------
        next_page_token : typing.Optional[str]
            The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination.

        page_size : typing.Optional[int]
            How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included.

        search : typing.Optional[str]
            Search term to filter voices by. Searches in name, description, labels, category.

        sort : typing.Optional[str]
            Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices.

        sort_direction : typing.Optional[str]
            Which direction to sort the voices in. 'asc' or 'desc'.

        voice_type : typing.Optional[str]
            Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.

        category : typing.Optional[str]
            Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'

        fine_tuning_state : typing.Optional[str]
            State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'

        collection_id : typing.Optional[str]
            Collection ID to filter voices by.

        include_total_count : typing.Optional[bool]
            Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost.

        voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Voice IDs to lookup by. Maximum 100 voice IDs.

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

        Returns
        -------
        GetVoicesV2Response
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.search(
            next_page_token="next_page_token",
            page_size=1,
            search="search",
            sort="sort",
            sort_direction="sort_direction",
            voice_type="voice_type",
            category="category",
            fine_tuning_state="fine_tuning_state",
            collection_id="collection_id",
            include_total_count=True,
        )
        r<   r#   r?   r9   r*   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   r5   r;   s                 r+   r?   zVoicesClient.searchS   sP    d $$+++)!/' 3+ , 
	 ~~r-   with_settingsr5   c               V    | j                   j                  |||      }|j                  S )a]  
        Returns metadata about a specific voice.

        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.

        with_settings : typing.Optional[bool]
            This parameter is now deprecated. It is ignored and will be removed in a future version.

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

        Returns
        -------
        Voice
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.get(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            with_settings=True,
        )
        rK   r#   getr9   r*   voice_idrL   r5   r;   s        r+   rO   zVoicesClient.get   s-    L $$((`o(p	~~r-   r5   c               T    | j                   j                  ||      }|j                  S )a  
        Deletes a voice by its ID.

        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_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DeleteVoiceResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.delete(
            voice_id="21m00Tcm4TlvDq8ikWAM",
        )
        rR   r#   deleter9   r*   rQ   r5   r;   s       r+   rU   zVoicesClient.delete   s)    < $$++Ho+V	~~r-   filesremove_background_noisedescriptionlabelsr5   c          	     ^    | j                   j                  |||||||      }|j                  S )a|  
        Edit a voice created by you.

        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.

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

        files : typing.Optional[typing.List[core.File]]
            See core.File for more documentation

        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.

        description : typing.Optional[str]
            A description of the voice.

        labels : typing.Optional[VoicesUpdateRequestLabels]
            Labels for the voice. Keys can be language, accent, gender, or age.

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

        Returns
        -------
        EditVoiceResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.update(
            voice_id="21m00Tcm4TlvDq8ikWAM",
            name="name",
        )
        namerX   rY   rZ   r[   r5   r#   updater9   	r*   rQ   r^   rX   rY   rZ   r[   r5   r;   s	            r+   r`   zVoicesClient.update   sA    l $$++$;#+ , 
	 ~~r-   c               X    | j                   j                  ||||      }|j                  S )a)  
        Add a shared voice to your collection of Voices

        Parameters
        ----------
        public_user_id : str
            Public user ID used to publicly identify ElevenLabs users.

        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.

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

        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.share(
            public_user_id="63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca",
            voice_id="21m00Tcm4TlvDq8ikWAM",
            new_name="John Smith",
        )
        new_namer5   r#   sharer9   r*   public_user_idrQ   rd   r5   r;   s         r+   rf   zVoicesClient.share@  s/    V $$**>8hhw*x	~~r-   r>   rC   genderageaccentlanguagelocaler?   	use_casesdescriptivesfeaturedmin_notice_period_daysinclude_custom_ratesinclude_live_moderatedreader_app_enabledowner_idr@   pager5   c               v    | j                   j                  |||||||||	|
|||||||||      }|j                  S )at
  
        Retrieves a list of shared voices.

        Parameters
        ----------
        page_size : typing.Optional[int]
            How many shared voices to return at maximum. Can not exceed 100, defaults to 30.

        category : typing.Optional[VoicesGetSharedRequestCategory]
            Voice category used for filtering

        gender : typing.Optional[str]
            Gender used for filtering

        age : typing.Optional[str]
            Age used for filtering

        accent : typing.Optional[str]
            Accent used for filtering

        language : typing.Optional[str]
            Language used for filtering

        locale : typing.Optional[str]
            Locale used for filtering

        search : typing.Optional[str]
            Search term used for filtering

        use_cases : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Use-case used for filtering

        descriptives : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Search term used for filtering

        featured : typing.Optional[bool]
            Filter featured voices

        min_notice_period_days : typing.Optional[int]
            Filter voices with a minimum notice period of the given number of days.

        include_custom_rates : typing.Optional[bool]
            Include/exclude voices with custom rates

        include_live_moderated : typing.Optional[bool]
            Include/exclude voices that are live moderated

        reader_app_enabled : typing.Optional[bool]
            Filter voices that are enabled for the reader app

        owner_id : typing.Optional[str]
            Filter voices by public owner ID

        sort : typing.Optional[str]
            Sort criteria

        page : typing.Optional[int]

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

        Returns
        -------
        GetLibraryVoicesResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.get_shared(
            page_size=1,
            category="professional",
            gender="gender",
            age="age",
            accent="accent",
            language="language",
            locale="locale",
            search="search",
            featured=True,
            min_notice_period_days=1,
            include_custom_rates=True,
            include_live_moderated=True,
            reader_app_enabled=True,
            owner_id="owner_id",
            sort="sort",
            page=1,
        )
        ri   r#   
get_sharedr9   r*   r>   rC   rj   rk   rl   rm   rn   r?   ro   rp   rq   rr   rs   rt   ru   rv   r@   rw   r5   r;   s                        r+   rz   zVoicesClient.get_sharedn  se    f $$//%#9!5#91+' 0 
	* ~~r-   
audio_filesimilarity_thresholdtop_kr5   c               X    | j                   j                  ||||      }|j                  S )aw  
        Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values.

        Parameters
        ----------
        audio_file : typing.Optional[core.File]
            See core.File for more documentation

        similarity_threshold : typing.Optional[float]
            Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned.

        top_k : typing.Optional[int]
            Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100.

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

        Returns
        -------
        GetLibraryVoicesResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.voices.find_similar_voices()
        r|   r#   find_similar_voicesr9   r*   r}   r~   r   r5   r;   s         r+   r   z VoicesClient.find_similar_voices  s8    N $$88!!5+	 9 
	 ~~r-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r%   settings.clientr   r$   )r*   r   s     r+   settingszVoicesClient.settings'  s+    >>!7+4;O;OPDN~~r-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r&   
ivc.clientr   r$   )r*   r   s     r+   ivczVoicesClient.ivc/  +    99-!1E1EFDIyyr-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r'   
pvc.clientr   r$   )r*   r   s     r+   pvczVoicesClient.pvc7  r   r-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r(   samples.clientr   r$   )r*   r   s     r+   sampleszVoicesClient.samples?  s+    == 5)9M9MNDM}}r-   )r"   r   )returnr   r4   typing.Optional[bool]r5   typing.Optional[RequestOptions]r   r   r=   typing.Optional[str]r>   typing.Optional[int]r?   r   r@   r   rA   r   rB   r   rC   r   rD   r   rE   r   rF   r   rG   8typing.Optional[typing.Union[str, typing.Sequence[str]]]r5   r   r   r   rQ   strrL   r   r5   r   r   r   rQ   r   r5   r   r   r
   rQ   r   r^   r   rX   z'typing.Optional[typing.List[core.File]]rY   r   rZ   r   r[   z*typing.Optional[VoicesUpdateRequestLabels]r5   r   r   r   
rh   r   rQ   r   rd   r   r5   r   r   r	   (r>   r   rC   z/typing.Optional[VoicesGetSharedRequestCategory]rj   r   rk   r   rl   r   rm   r   rn   r   r?   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   ru   r   rv   r   r@   r   rw   r   r5   r   r   r   
r}   ztyping.Optional[core.File]r~   ztyping.Optional[float]r   r   r5   r   r   r   __name__
__module____qualname__r,   propertyr1   r8   r?   rO   rU   OMITr`   rf   rz   r   r   r   r   r    r-   r+   r   r      s   =     7;os3Ml	H 15*.'+%)/3+/)-26.259NR;?` .` (	`
 %` #` -` )` '` 0` ,` 3` L` 9` 
`L 04;?'' -	'
 9' 
'T TX1P	!L :>9=,0=A;??? 	?
 7? "7? *? ;? 9? 
 ?N <@,, ,
 , 9, 
,b +/DH'+$('+)-'+'+NRQU*.7;6:8<48)-%)%);?+H (H B	H
 %H "H %H 'H %H %H LH OH (H !5H 4H  !6!H" 2#H$ '%H& #'H( #)H* 9+H, 
"-HZ 267;&*;?- /- 5	-
 $- 9- 
"-^        r-   r   c                     e Zd ZddZedd       Zddd	 	 	 	 	 ddZddddddddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddd	 	 	 	 	 	 	 dd	Zdd
	 	 	 	 	 ddZ	e
e
e
e
dd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdd
	 	 	 	 	 	 	 	 	 ddZdddddddddddddddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZe
e
e
dd	 	 	 	 	 	 	 	 	 d dZed        Zed        Zed        Zed        Zy)!AsyncVoicesClientc               l    t        |      | _        || _        d | _        d | _        d | _        d | _        y r    )r   r#   r$   r%   r&   r'   r(   r)   s     r+   r,   zAsyncVoicesClient.__init__I  s3    /~N-?C59	59	=Ar-   c                    | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawVoicesClient
        r/   r0   s    r+   r1   z#AsyncVoicesClient.with_raw_responseQ  r2   r-   Nr3   c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Returns a list of all available voices for a user.

        Parameters
        ----------
        show_legacy : typing.Optional[bool]
            If set to true, legacy premade voices will be included in responses from /v1/voices

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

        Returns
        -------
        GetVoicesResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.get_all(
                show_legacy=True,
            )


        asyncio.run(main())
        r3   Nr7   r:   s       r+   r8   zAsyncVoicesClient.get_all\  s8     L **22{\k2ll	~~ m   !646r<   c                  K   | j                   j                  |||||||||	|
||       d{   }|j                  S 7 w)a  
        Gets a list of all available voices for a user with search, filtering and pagination.

        Parameters
        ----------
        next_page_token : typing.Optional[str]
            The next page token to use for pagination. Returned from the previous request. Use this in combination with the has_more flag for reliable pagination.

        page_size : typing.Optional[int]
            How many voices to return at maximum. Can not exceed 100, defaults to 10. Page 0 may include more voices due to default voices being included.

        search : typing.Optional[str]
            Search term to filter voices by. Searches in name, description, labels, category.

        sort : typing.Optional[str]
            Which field to sort by, one of 'created_at_unix' or 'name'. 'created_at_unix' may not be available for older voices.

        sort_direction : typing.Optional[str]
            Which direction to sort the voices in. 'asc' or 'desc'.

        voice_type : typing.Optional[str]
            Type of the voice to filter by. One of 'personal', 'community', 'default', 'workspace', 'non-default', 'saved'. 'non-default' is equal to all but 'default'. 'saved' is equal to non-default, but includes default voices if they have been added to a collection.

        category : typing.Optional[str]
            Category of the voice to filter by. One of 'premade', 'cloned', 'generated', 'professional'

        fine_tuning_state : typing.Optional[str]
            State of the voice's fine tuning to filter by. Applicable only to professional voices clones. One of 'draft', 'not_verified', 'not_started', 'queued', 'fine_tuning', 'fine_tuned', 'failed', 'delayed'

        collection_id : typing.Optional[str]
            Collection ID to filter voices by.

        include_total_count : typing.Optional[bool]
            Whether to include the total count of voices found in the response. NOTE: The total_count value is a live snapshot and may change between requests as users create, modify, or delete voices. For pagination, rely on the has_more flag instead. Only enable this when you actually need the total count (e.g., for display purposes), as it incurs a performance cost.

        voice_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Voice IDs to lookup by. Maximum 100 voice IDs.

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

        Returns
        -------
        GetVoicesV2Response
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.search(
                next_page_token="next_page_token",
                page_size=1,
                search="search",
                sort="sort",
                sort_direction="sort_direction",
                voice_type="voice_type",
                category="category",
                fine_tuning_state="fine_tuning_state",
                collection_id="collection_id",
                include_total_count=True,
            )


        asyncio.run(main())
        r<   NrI   rJ   s                 r+   r?   zAsyncVoicesClient.search  s^     t **11+)!/' 3+ 2 
 
	 ~~
s   +A >A rK   c               r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Returns metadata about a specific voice.

        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.

        with_settings : typing.Optional[bool]
            This parameter is now deprecated. It is ignored and will be removed in a future version.

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

        Returns
        -------
        Voice
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        rK   NrN   rP   s        r+   rO   zAsyncVoicesClient.get  s:     \ **..x}fu.vv	~~ ws   "757rR   c               p   K   | j                   j                  ||       d{   }|j                  S 7 w)a'  
        Deletes a voice by its ID.

        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_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        DeleteVoiceResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        rR   NrT   rV   s       r+   rU   zAsyncVoicesClient.delete   s7     L **11(O1\\	~~ ]r   rW   c          	     z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)a  
        Edit a voice created by you.

        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.

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

        files : typing.Optional[typing.List[core.File]]
            See core.File for more documentation

        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.

        description : typing.Optional[str]
            A description of the voice.

        labels : typing.Optional[VoicesUpdateRequestLabels]
            Labels for the voice. Keys can be language, accent, gender, or age.

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

        Returns
        -------
        EditVoiceResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r]   Nr_   ra   s	            r+   r`   zAsyncVoicesClient.updateI  sO     | **11$;#+ 2 
 
	 ~~
s   &;9;c               t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Add a shared voice to your collection of Voices

        Parameters
        ----------
        public_user_id : str
            Public user ID used to publicly identify ElevenLabs users.

        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.

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

        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.share(
                public_user_id="63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca",
                voice_id="21m00Tcm4TlvDq8ikWAM",
                new_name="John Smith",
            )


        asyncio.run(main())
        rc   Nre   rg   s         r+   rf   zAsyncVoicesClient.share  sC     f **00Hx 1 
 
	 ~~
   #868ri   c                  K   | j                   j                  |||||||||	|
|||||||||       d{   }|j                  S 7 w)a&  
        Retrieves a list of shared voices.

        Parameters
        ----------
        page_size : typing.Optional[int]
            How many shared voices to return at maximum. Can not exceed 100, defaults to 30.

        category : typing.Optional[VoicesGetSharedRequestCategory]
            Voice category used for filtering

        gender : typing.Optional[str]
            Gender used for filtering

        age : typing.Optional[str]
            Age used for filtering

        accent : typing.Optional[str]
            Accent used for filtering

        language : typing.Optional[str]
            Language used for filtering

        locale : typing.Optional[str]
            Locale used for filtering

        search : typing.Optional[str]
            Search term used for filtering

        use_cases : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Use-case used for filtering

        descriptives : typing.Optional[typing.Union[str, typing.Sequence[str]]]
            Search term used for filtering

        featured : typing.Optional[bool]
            Filter featured voices

        min_notice_period_days : typing.Optional[int]
            Filter voices with a minimum notice period of the given number of days.

        include_custom_rates : typing.Optional[bool]
            Include/exclude voices with custom rates

        include_live_moderated : typing.Optional[bool]
            Include/exclude voices that are live moderated

        reader_app_enabled : typing.Optional[bool]
            Filter voices that are enabled for the reader app

        owner_id : typing.Optional[str]
            Filter voices by public owner ID

        sort : typing.Optional[str]
            Sort criteria

        page : typing.Optional[int]

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

        Returns
        -------
        GetLibraryVoicesResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.voices.get_shared(
                page_size=1,
                category="professional",
                gender="gender",
                age="age",
                accent="accent",
                language="language",
                locale="locale",
                search="search",
                featured=True,
                min_notice_period_days=1,
                include_custom_rates=True,
                include_live_moderated=True,
                reader_app_enabled=True,
                owner_id="owner_id",
                sort="sort",
                page=1,
            )


        asyncio.run(main())
        ri   Nry   r{   s                        r+   rz   zAsyncVoicesClient.get_shared  ss     v **55%#9!5#91+' 6 
 
	* ~~+
s   2AAAr|   c               t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values.

        Parameters
        ----------
        audio_file : typing.Optional[core.File]
            See core.File for more documentation

        similarity_threshold : typing.Optional[float]
            Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned.

        top_k : typing.Optional[int]
            Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100.

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

        Returns
        -------
        GetLibraryVoicesResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


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


        asyncio.run(main())
        r|   Nr   r   s         r+   r   z%AsyncVoicesClient.find_similar_voices\  sF     ^ **>>!!5+	 ? 
 
	 ~~
r   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r%   r   r   r$   )r*   r   s     r+   r   zAsyncVoicesClient.settings  s+    >>!<0@T@TUDN~~r-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r&   r   r   r$   )r*   r   s     r+   r   zAsyncVoicesClient.ivc  +    992&d6J6JKDIyyr-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r'   r   r   r$   )r*   r   s     r+   r   zAsyncVoicesClient.pvc  r   r-   c                n    | j                   ddlm}  || j                        | _         | j                   S )Nr   )r   r!   )r(   r   r   r$   )r*   r   s     r+   r   zAsyncVoicesClient.samples  s+    == :.d>R>RSDM}}r-   )r"   r   )r   r   r   r   r   r   r   r   r   r   r   r   r-   r+   r   r   H  s   B     7;os'3'Ml'	'X 15*.'+%)/3+/)-26.259NR;?h .h (	h
 %h #h -h )h 'h 0h ,h 3h Lh 9h 
h\ 04;?// -	/
 9/ 
/d TX''1P'	!'\ :>9=,0=A;?GG 	G
 7G "7G *G ;G 9G 
 G^ <@66 6
 6 96 
6v +/DH'+$('+)-'+'+NRQU*.7;6:8<48)-%)%);?+P (P B	P
 %P "P %P 'P %P %P LP OP (P !5P 4P  !6!P" 2#P$ '%P& #'P( #)P* 9+P, 
"-Pj 267;&*;?5 /5 5	5
 $5 95 
"5n        r-   r   )1
__future__r   typing r   core.client_wrapperr   r   core.request_optionsr   types.add_voice_response_modelr	   !types.delete_voice_response_modelr
   types.edit_voice_response_modelr   !types.get_library_voices_responser   types.get_voices_responser   types.get_voices_v_2_responser   types.voicer   
raw_clientr   r   (types.voices_get_shared_request_categoryr   "types.voices_update_request_labelsr   TYPE_CHECKINGr   r   r   r   r   r   r   r   r   r   r   r   castAnyr   r   r   r   r-   r+   <module>r      sx    #   G 1 B H D H 9 ?  = T I	55ADv{{6::s#g gTi	 i	r-   