
    b6i                     x    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	m
Z
 ddlmZ  G d	 d
      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)DubbingTranscriptsResponseModel   )AsyncRawTranscriptsClientRawTranscriptsClient)TranscriptsGetRequestFormatTypec                   j    e Zd ZdefdZedefd       Zdddeded	e	d
e
j                  e   def
dZy)TranscriptsClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     p/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/dubbing/transcripts/client.py__init__zTranscriptsClient.__init__   s    /~N    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawTranscriptsClient
        r   r   s    r   with_raw_responsez#TranscriptsClient.with_raw_response        r   Nrequest_options
dubbing_idlanguage_codeformat_typer   c                X    | j                   j                  ||||      }|j                  S )a>  
        Fetch the transcript for one of the languages in a dub.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        language_code : str
            ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media.

        format_type : TranscriptsGetRequestFormatType
            Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio.

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

        Returns
        -------
        DubbingTranscriptsResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.dubbing.transcripts.get(
            dubbing_id="dubbing_id",
            language_code="source",
            format_type="srt",
        )
        r   r   getdatar   r   r    r!   r   	_responses         r   r$   zTranscriptsClient.get   s/    V $$((]Kap(q	~~r   )__name__
__module____qualname__r   r   propertyr
   r   strr   typingOptionalr   r   r$    r   r   r   r      sq    O*; O  #7      <@,, , 5	,  8, 
),r   r   c                   j    e Zd ZdefdZedefd       Zdddeded	e	d
e
j                  e   def
dZy)AsyncTranscriptsClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncTranscriptsClient.__init__K   s    4NSr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawTranscriptsClient
        r   r   s    r   r   z(AsyncTranscriptsClient.with_raw_responseN   r   r   Nr   r   r    r!   r   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Fetch the transcript for one of the languages in a dub.

        Parameters
        ----------
        dubbing_id : str
            ID of the dubbing project.

        language_code : str
            ISO-693 language code to retrieve the transcript for. Use 'source' to fetch the transcript of the original media.

        format_type : TranscriptsGetRequestFormatType
            Format to return transcript in. For subtitles use either 'srt' or 'webvtt', and for a full transcript use 'json'. The 'json' format is not yet supported for Dubbing Studio.

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

        Returns
        -------
        DubbingTranscriptsResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.dubbing.transcripts.get(
                dubbing_id="dubbing_id",
                language_code="source",
                format_type="srt",
            )


        asyncio.run(main())
        r   Nr#   r&   s         r   r$   zAsyncTranscriptsClient.getY   s<     f **..z=+gv.ww	~~ xs   #868)r(   r)   r*   r   r   r+   r	   r   r,   r   r-   r.   r   r   r$   r/   r   r   r1   r1   J   sq    T*< T  #<      <@44 4 5	4  84 
)4r   r1   )r-   core.client_wrapperr   r   core.request_optionsr   (types.dubbing_transcripts_response_modelr   
raw_clientr	   r
   )types.transcripts_get_request_format_typer   r   r1   r/   r   r   <module>r:      s0     H 2 W G V; ;|C Cr   