
    b6i                         d dl Z d dlmZ ddlmZ ddlmZ ddlmZm	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 ddlmZ ddlmZ  e j2                  e j4                  d      Z G d d      Z G d d      Zy)    N)JSONDecodeError   )core)ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)jsonable_encoder)RequestOptions)construct_type)UnprocessableEntityError)HttpValidationError))RequestPvcManualVerificationResponseModel.c                       e Zd ZdefdZedddedej                  e	j                     dej                  e   dej                  e   d	ee   f
d
Zy)RawVerificationClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     x/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/voices/pvc/verification/raw_client.py__init__zRawVerificationClient.__init__   
    -    N
extra_textrequest_optionsvoice_idfilesr   r    returnc                    | j                   j                  j                  dt        |       ddd|id|i|t        d      }	 d|j
                  cxk  rd	k  rGn nDt        j                  t        t        t        |j                         
            }t        ||      S |j
                  dk(  rUt        t        |j                        t        j                  t        t        t        |j                         
                  |j                         }t#        |j
                  t        |j                        |      # t         $ r6 t#        |j
                  t        |j                        |j$                        w xY w)a  
        Request manual verification for a PVC voice.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        files : typing.List[core.File]
            See core.File for more documentation

        extra_text : typing.Optional[str]
            Extra text to be used in the manual verification process.

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

        Returns
        -------
        HttpResponse[RequestPvcManualVerificationResponseModel]
            Successful Response
        v1/voices/pvc//verificationPOSTr   r"   Tmethoddatar"   r    omitforce_multipart   ,  type_object_responser*     headersbodystatus_coder6   r7   )r   httpx_clientrequestr   OMITr9   typingcastr   r   jsonr
   r   dictr6   r   r   r   textr   r!   r"   r   r    	_response_data_response_jsons           r   r;   zRawVerificationClient.request   sb   < ((55==-h78Fj  ,  > 
		ti++1c1="G ) 0 $YUCC$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AD> A4D> >?E=)__name__
__module____qualname__r   r   r<   strr=   Listr   FileOptionalr   r
   r   r;    r   r   r   r      s}    .*; . ,0;?CpCp {{499%	Cp
 OOC(Cp  8Cp 
?	@Cpr   r   c                       e Zd ZdefdZedddedej                  e	j                     dej                  e   dej                  e   d	ee   f
d
Zy)AsyncRawVerificationClientr   c                    || _         y r   r   r   s     r   r   z#AsyncRawVerificationClient.__init__`   r   r   Nr   r!   r"   r   r    r#   c                  K   | j                   j                  j                  dt        |       ddd|id|i|t        d       d{   }	 d	|j
                  cxk  rd
k  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j
                  dk(  rUt        t        |j                        t        j                  t        t        t        |j                                           |j                         }t#        |j
                  t        |j                        |      7 # t         $ r6 t#        |j
                  t        |j                        |j$                        w xY ww)a  
        Request manual verification for a PVC voice.

        Parameters
        ----------
        voice_id : str
            Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

        files : typing.List[core.File]
            See core.File for more documentation

        extra_text : typing.Optional[str]
            Extra text to be used in the manual verification process.

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

        Returns
        -------
        AsyncHttpResponse[RequestPvcManualVerificationResponseModel]
            Successful Response
        r%   r&   r'   r   r"   Tr(   Nr-   r.   r/   r2   r4   r5   r8   )r   r:   r;   r   r<   r9   r=   r>   r   r   r?   r	   r   r@   r6   r   r   r   rA   rB   s           r   r;   z"AsyncRawVerificationClient.requestc   sr    < ..;;CC-h78Fj  ,  D 
 
		ti++1c1="G ) 0 ))%HH$$+. !2!23+&"5$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`nooK
F  	ty'<'<d9K\K\F]dmdrdrss	ts8   AFEFAE (F)A4E ,F?F

F)rF   rG   rH   r   r   r<   rI   r=   rJ   r   rK   rL   r   r	   r   r;   rM   r   r   rO   rO   _   s}    .*< . ,0;?CpCp {{499%	Cp
 OOC(Cp  8Cp 
D	ECpr   rO   )r=   json.decoderr    r   core.api_errorr   core.client_wrapperr   r   core.http_responser	   r
   core.jsonable_encoderr   core.request_optionsr   core.unchecked_base_modelr   !errors.unprocessable_entity_errorr   types.http_validation_errorr   4types.request_pvc_manual_verification_response_modelr   r>   Anyr<   r   rO   rM   r   r   <module>r^      s`     (  ' I B 6 3 8 J ? n v{{6::s#Gp GpTGp Gpr   