o
    lWik                     @   sn   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
 e e jdZG d	d
 d
ZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)SegmentCreateResponse   )AsyncRawSegmentClientRawSegmentClient.c                   @      e Zd ZdefddZedefddZeeddd	e	d
e	de
de
deje	 dejeje	eje	 f  deje defddZdS )SegmentClientclient_wrapperc                C      t |d| _d S N)r   )r	   _raw_clientselfr    r   v/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/dubbing/resource/speaker/segment/client.py__init__      zSegmentClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSegmentClient
        r   r   r   r   r   with_raw_response      	zSegmentClient.with_raw_responseNtexttranslationsrequest_options
dubbing_id
speaker_id
start_timeend_timer   r   r   c          	   	   C   s    | j j|||||||d}|jS )a.  
        Creates a new segment in dubbing resource with a start and end time for the speaker in every available language. Does not automatically generate transcripts/translations/audio.

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

        speaker_id : str
            ID of the speaker.

        start_time : float

        end_time : float

        text : typing.Optional[str]

        translations : typing.Optional[typing.Dict[str, typing.Optional[str]]]

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

        Returns
        -------
        SegmentCreateResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.dubbing.resource.speaker.segment.create(
            dubbing_id="dubbing_id",
            speaker_id="speaker_id",
            start_time=1.1,
            end_time=1.1,
        )
        r"   r#   r   r   r   r   createdata	r   r    r!   r"   r#   r   r   r   	_responser   r   r   r&      s   4	zSegmentClient.create)__name__
__module____qualname__r   r   propertyr	   r   OMITstrfloattypingOptionalDictr   r   r&   r   r   r   r   r      0    	
r   c                   @   r
   )AsyncSegmentClientr   c                C   r   r   )r   r   r   r   r   r   r   ^   r   zAsyncSegmentClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSegmentClient
        r   r   r   r   r   r   a   r   z$AsyncSegmentClient.with_raw_responseNr   r    r!   r"   r#   r   r   r   c          	   	      s(   | j j|||||||dI dH }|jS )a  
        Creates a new segment in dubbing resource with a start and end time for the speaker in every available language. Does not automatically generate transcripts/translations/audio.

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

        speaker_id : str
            ID of the speaker.

        start_time : float

        end_time : float

        text : typing.Optional[str]

        translations : typing.Optional[typing.Dict[str, typing.Optional[str]]]

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

        Returns
        -------
        SegmentCreateResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.dubbing.resource.speaker.segment.create(
                dubbing_id="dubbing_id",
                speaker_id="speaker_id",
                start_time=1.1,
                end_time=1.1,
            )


        asyncio.run(main())
        r$   Nr%   r(   r   r   r   r&   l   s   <	zAsyncSegmentClient.create)r*   r+   r,   r   r   r-   r   r   r.   r/   r0   r1   r2   r3   r   r   r&   r   r   r   r   r5   ]   r4   r5   )r1   core.client_wrapperr   r   core.request_optionsr   types.segment_create_responser   
raw_clientr   r	   castAnyr.   r   r5   r   r   r   r   <module>   s   O