
    b6iC                         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)*CreatePronunciationDictionaryResponseModel)%PronunciationDictionaryVersionLocator   )'AsyncRawPronunciationDictionariesClient"RawPronunciationDictionariesClient.c                       e Zd ZdefdZedefd       Zeddde	de
j                  e   d	e
j                  e   d
e
j                  e   def
dZy)PronunciationDictionariesClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     /root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/studio/projects/pronunciation_dictionaries/client.py__init__z(PronunciationDictionariesClient.__init__   s    =^\    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPronunciationDictionariesClient
        r   r   s    r   with_raw_responsez1PronunciationDictionariesClient.with_raw_response        r   Ninvalidate_affected_textrequest_options
project_id!pronunciation_dictionary_locatorsr   r   c                X    | j                   j                  ||||      }|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   	_responses         r   r%   z&PronunciationDictionariesClient.create   s8    \ $$++.O%=+	 , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   OMITstrtypingSequencer   Optionalboolr   r   r%    r   r   r   r      s    ]*; ]  #E     ;?;?44 ,2??;`+a	4
 #)//$"74  84 
44r   r   c                       e Zd ZdefdZedefd       Zeddde	de
j                  e   d	e
j                  e   d
e
j                  e   def
dZy)$AsyncPronunciationDictionariesClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   z-AsyncPronunciationDictionariesClient.__init__V   s    BR`ar   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPronunciationDictionariesClient
        r   r   s    r   r   z6AsyncPronunciationDictionariesClient.with_raw_responseY   r   r   Nr   r    r!   r   r   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)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'   s         r   r%   z+AsyncPronunciationDictionariesClient.created   sF     l **11.O%=+	 2 
 
	 ~~
s   #868)r)   r*   r+   r   r   r,   r
   r   r-   r.   r/   r0   r   r1   r2   r   r   r%   r3   r   r   r5   r5   U   s    b*< b  #J     ;?;?<< ,2??;`+a	<
 #)//$"7<  8< 
4<r   r5   )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   r5   r3   r   r   <module>r@      sJ     I 3 o d c v{{6::s#C CLK Kr   