o
    lWiC                     @   sz   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 e jd	ZG d
d dZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)*CreatePronunciationDictionaryResponseModel)%PronunciationDictionaryVersionLocator   )'AsyncRawPronunciationDictionariesClient"RawPronunciationDictionariesClient.c                   @   d   e Zd ZdefddZedefddZeddd	e	d
e
je de
je de
je def
ddZdS )PronunciationDictionariesClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   /var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/studio/projects/pronunciation_dictionaries/client.py__init__      z(PronunciationDictionariesClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPronunciationDictionariesClient
        r   r   r   r   r   with_raw_response      	z1PronunciationDictionariesClient.with_raw_responseNinvalidate_affected_textrequest_options
project_id!pronunciation_dictionary_locatorsr   r   c                C   s   | j j||||d}|jS )a  
        Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator]
            A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'.

        invalidate_affected_text : typing.Optional[bool]
            This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does.

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

        Returns
        -------
        CreatePronunciationDictionaryResponseModel
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs, PronunciationDictionaryVersionLocator

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.pronunciation_dictionaries.create(
            project_id="21m00Tcm4TlvDq8ikWAM",
            pronunciation_dictionary_locators=[
                PronunciationDictionaryVersionLocator(
                    pronunciation_dictionary_id="pronunciation_dictionary_id",
                )
            ],
        )
        r!   r   r   r   createdatar   r    r!   r   r   	_responser   r   r   r$      s   .z&PronunciationDictionariesClient.create)__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingSequencer   Optionalboolr   r   r$   r   r   r   r   r      "    r   c                   @   r   )$AsyncPronunciationDictionariesClientr   c                C   r   r   )r	   r   r   r   r   r   r   V   r   z-AsyncPronunciationDictionariesClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPronunciationDictionariesClient
        r   r   r   r   r   r   Y   r   z6AsyncPronunciationDictionariesClient.with_raw_responseNr   r    r!   r   r   c                   s"   | j j||||dI dH }|jS )a	  
        Create a set of pronunciation dictionaries acting on a project. This will automatically mark text within this project as requiring reconverting where the new dictionary would apply or the old one no longer does.

        Parameters
        ----------
        project_id : str
            The ID of the project to be used. You can use the [List projects](/docs/api-reference/studio/get-projects) endpoint to list all the available projects.

        pronunciation_dictionary_locators : typing.Sequence[PronunciationDictionaryVersionLocator]
            A list of pronunciation dictionary locators (pronunciation_dictionary_id, version_id) encoded as a list of JSON strings for pronunciation dictionaries to be applied to the text. A list of json encoded strings is required as adding projects may occur through formData as opposed to jsonBody. To specify multiple dictionaries use multiple --form lines in your curl, such as --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"Vmd4Zor6fplcA7WrINey\",\"version_id\":\"hRPaxjlTdR7wFMhV4w0b\"}"' --form 'pronunciation_dictionary_locators="{\"pronunciation_dictionary_id\":\"JzWtcGQMJ6bnlWwyMo7e\",\"version_id\":\"lbmwxiLu4q6txYxgdZqn\"}"'.

        invalidate_affected_text : typing.Optional[bool]
            This will automatically mark text in this project for reconversion when the new dictionary applies or the old one no longer does.

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

        Returns
        -------
        CreatePronunciationDictionaryResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs, PronunciationDictionaryVersionLocator

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.pronunciation_dictionaries.create(
                project_id="21m00Tcm4TlvDq8ikWAM",
                pronunciation_dictionary_locators=[
                    PronunciationDictionaryVersionLocator(
                        pronunciation_dictionary_id="pronunciation_dictionary_id",
                    )
                ],
            )


        asyncio.run(main())
        r"   Nr#   r&   r   r   r   r$   d   s   6z+AsyncPronunciationDictionariesClient.create)r(   r)   r*   r   r   r+   r	   r   r,   r-   r.   r/   r   r0   r1   r   r   r$   r   r   r   r   r3   U   r2   r3   )r.   core.client_wrapperr   r   core.request_optionsr   4types.create_pronunciation_dictionary_response_modelr   .types.pronunciation_dictionary_version_locatorr   
raw_clientr	   r
   castAnyr,   r   r3   r   r   r   r   <module>   s   F