o
    lWiI                     @   sz   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mZ e e jd	ZG d
d dZG dd dZdS )    N   )core)AsyncClientWrapperSyncClientWrapper)RequestOptions)ForcedAlignmentResponseModel   )AsyncRawForcedAlignmentClientRawForcedAlignmentClient.c                   @   `   e Zd ZdefddZedefddZeddd	e	j
d
edeje deje def
ddZdS )ForcedAlignmentClientclient_wrapperc                C      t |d| _d S N)r   )r
   _raw_clientselfr    r   f/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/forced_alignment/client.py__init__      zForcedAlignmentClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawForcedAlignmentClient
        r   r   r   r   r   with_raw_response      	z'ForcedAlignmentClient.with_raw_responseNenabled_spooled_filerequest_optionsfiletextr   r   c                C   s   | j j||||d}|jS )aV  
        Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript.

        Parameters
        ----------
        file : core.File
            See core.File for more documentation

        text : str
            The text to align with the audio. The input text can be in any format, however diarization is not supported at this time.

        enabled_spooled_file : typing.Optional[bool]
            If true, the file will be streamed to the server and processed in chunks. This is useful for large files that cannot be loaded into memory. The default is false.

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

        Returns
        -------
        ForcedAlignmentResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.forced_alignment.create(
            text="text",
        )
        r    r!   r   r   r   createdatar   r    r!   r   r   	_responser   r   r   r$      s   )zForcedAlignmentClient.create)__name__
__module____qualname__r   r   propertyr
   r   OMITr   FilestrtypingOptionalboolr   r   r$   r   r   r   r   r      "    r   c                   @   r   )AsyncForcedAlignmentClientr   c                C   r   r   )r	   r   r   r   r   r   r   N   r   z#AsyncForcedAlignmentClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawForcedAlignmentClient
        r   r   r   r   r   r   Q   r   z,AsyncForcedAlignmentClient.with_raw_responseNr   r    r!   r   r   c                   s"   | j j||||dI dH }|jS )a  
        Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript.

        Parameters
        ----------
        file : core.File
            See core.File for more documentation

        text : str
            The text to align with the audio. The input text can be in any format, however diarization is not supported at this time.

        enabled_spooled_file : typing.Optional[bool]
            If true, the file will be streamed to the server and processed in chunks. This is useful for large files that cannot be loaded into memory. The default is false.

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

        Returns
        -------
        ForcedAlignmentResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.forced_alignment.create(
                text="text",
            )


        asyncio.run(main())
        r"   Nr#   r&   r   r   r   r$   \   s
   1z!AsyncForcedAlignmentClient.create)r(   r)   r*   r   r   r+   r	   r   r,   r   r-   r.   r/   r0   r1   r   r   r$   r   r   r   r   r3   M   r2   r3   )r/    r   core.client_wrapperr   r   core.request_optionsr   %types.forced_alignment_response_modelr   
raw_clientr	   r
   castAnyr,   r   r3   r   r   r   r   <module>   s   >