
    b6iX.                         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)$ProjectSnapshotExtendedResponseModel)ProjectSnapshotsResponse   )AsyncRawSnapshotsClientRawSnapshotsClient.c                   ^   e Zd ZdefdZedefd       Zdddede	j                  e   defd	Zddded
ede	j                  e   defdZeddded
ede	j                  e   de	j                  e   de	j$                  e   f
dZddded
ede	j                  e   de	j$                  e   fdZy)SnapshotsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     v/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/studio/projects/snapshots/client.py__init__zSnapshotsClient.__init__   s    -^L    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawSnapshotsClient
        r   r   s    r   with_raw_responsez!SnapshotsClient.with_raw_response        r   Nrequest_options
project_idr   c                T    | j                   j                  ||      }|j                  S )ay  
        Retrieves a list of snapshots for a Studio project.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        ProjectSnapshotsResponse
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.snapshots.list(
            project_id="21m00Tcm4TlvDq8ikWAM",
        )
        r   r   listdatar   r   r   	_responses       r   r"   zSnapshotsClient.list   s)    < $$))*o)V	~~r   project_snapshot_idc                V    | j                   j                  |||      }|j                  S )a  
        Returns the project snapshot.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

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

        Returns
        -------
        ProjectSnapshotExtendedResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.snapshots.get(
            project_id="21m00Tcm4TlvDq8ikWAM",
            project_snapshot_id="21m00Tcm4TlvDq8ikWAM",
        )
        r   r   getr#   r   r   r&   r   r%   s        r   r)   zSnapshotsClient.get?   s.    D $$((5HZi(j	~~r   convert_to_mpegr   r,   c             #      K   | j                   j                  ||||      5 }|j                  E d{    ddd       y7 # 1 sw Y   yxY ww)aA  
        Stream the audio from a Studio project snapshot.

        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.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

        convert_to_mpeg : typing.Optional[bool]
            Whether to convert the audio to mpeg format.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[bytes]
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.snapshots.stream(
            project_id="project_id",
            project_snapshot_id="project_snapshot_id",
        )
        r+   Nr   streamr#   )r   r   r&   r,   r   rs         r   r/   zSnapshotsClient.streamd   s\     T $$+_^m % 
 	vv	 	 	 	s+    AAA A	A AAAc             #      K   | j                   j                  |||      5 }|j                  E d{    ddd       y7 # 1 sw Y   yxY ww)a  
        Returns a compressed archive of the Studio project's audio.

        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.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.Iterator[bytes]
            Streaming archive data

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.studio.projects.snapshots.stream_archive(
            project_id="project_id",
            project_snapshot_id="project_snapshot_id",
        )
        r   Nr   stream_archiver#   )r   r   r&   r   r0   s        r   r3   zSnapshotsClient.stream_archive   sS     D ,,Z9L^m,n 	rsvv	 		 	s)   AA?A	AAA
A)__name__
__module____qualname__r   r   propertyr   r   strtypingOptionalr   r   r"   r   r)   OMITboolIteratorbytesr/   r3    r   r   r   r      s*   M*; M  #5     VZ39??>3R	!D pt##47#MS__]kMl#	-#T 26;?-- !-
  .-  8- 
	-` pt##47#MS__]kMl#		#r   r   c                   ^   e Zd ZdefdZedefd       Zdddede	j                  e   defd	Zddded
ede	j                  e   defdZeddded
ede	j                  e   de	j                  e   de	j$                  e   f
dZddded
ede	j                  e   de	j$                  e   fdZy)AsyncSnapshotsClientr   c                &    t        |      | _        y r   )r
   r   r   s     r   r   zAsyncSnapshotsClient.__init__   s    2.Qr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawSnapshotsClient
        r   r   s    r   r   z&AsyncSnapshotsClient.with_raw_response   r   r   Nr   r   r   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Retrieves a list of snapshots for a Studio project.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

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

        Returns
        -------
        ProjectSnapshotsResponse
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.snapshots.list(
                project_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r   Nr!   r$   s       r   r"   zAsyncSnapshotsClient.list   s7     L **//
O/\\	~~ ]s   !646r&   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)av  
        Returns the project snapshot.

        Parameters
        ----------
        project_id : str
            The ID of the Studio project.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

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

        Returns
        -------
        ProjectSnapshotExtendedResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.snapshots.get(
                project_id="21m00Tcm4TlvDq8ikWAM",
                project_snapshot_id="21m00Tcm4TlvDq8ikWAM",
            )


        asyncio.run(main())
        r   Nr(   r*   s        r   r)   zAsyncSnapshotsClient.get   s;     T **..z;N`o.pp	~~ qs   "757r+   r,   c                  K   | j                   j                  ||||      4 d{   }|j                  2 3 d{   }| 7 7 6 ddd      d{  7   y# 1 d{  7  sw Y   yxY ww)a  
        Stream the audio from a Studio project snapshot.

        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.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

        convert_to_mpeg : typing.Optional[bool]
            Whether to convert the audio to mpeg format.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[bytes]
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.snapshots.stream(
                project_id="project_id",
                project_snapshot_id="project_snapshot_id",
            )


        asyncio.run(main())
        r+   Nr.   )r   r   r&   r,   r   r0   _chunks          r   r/   zAsyncSnapshotsClient.stream  sy     d ##**+_^m + 
 	 	 !  f			 	 	 	 	sd   $A2AA2AA
AA
AA2A

AA2AA2A/#A&$A/+A2c                  K   | j                   j                  |||      4 d{   }|j                  2 3 d{   }| 7 7 6 ddd      d{  7   y# 1 d{  7  sw Y   yxY ww)al  
        Returns a compressed archive of the Studio project's audio.

        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.

        project_snapshot_id : str
            The ID of the Studio project snapshot.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.

        Returns
        -------
        typing.AsyncIterator[bytes]
            Streaming archive data

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.studio.projects.snapshots.stream_archive(
                project_id="project_id",
                project_snapshot_id="project_snapshot_id",
            )


        asyncio.run(main())
        r   Nr2   )r   r   r&   r   r0   rG   s         r   r3   z#AsyncSnapshotsClient.stream_archiveV  sv     T ##22+_ 3 
 	 	 !  f			 	 	 	 	sd   #A1AA1AA	AA	AA1A		A
A1AA1A."A%#A.*A1)r4   r5   r6   r   r   r7   r
   r   r8   r9   r:   r   r   r"   r   r)   r;   r<   AsyncIteratorr>   r/   r3   r?   r   r   rA   rA      s.   R*< R  #:     VZ''39??>3R'	!'T pt++47+MS__]kMl+	-+d 26;?66 !6
  .6  86 
		e	$6r pt..47.MS__]kMl.			e	$.r   rA   )r9   core.client_wrapperr   r   core.request_optionsr   .types.project_snapshot_extended_response_modelr    types.project_snapshots_responser   
raw_clientr
   r   castAnyr;   r   rA   r?   r   r   <module>rQ      sJ     I 3 c I C v{{6::s#g gTK Kr   