Ë
    ïÏjä%  ã                  ó`  — d dl mZ d dlmZmZ d dlmZ d dlZddlm	Z	 ddl
mZ ddlmZmZmZmZmZmZmZmZ dd	lmZmZmZ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gZ( G d„ de«      Z) G d„ de«      Z* G d„ d«      Z+ G d„ d«      Z, G d„ d«      Z- G d„ d«      Z.y)é    )Úannotations)ÚMappingÚcast)ÚLiteralNé   )Ú_legacy_response)Údeepcopy_with_paths)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚ	FileTypesÚomitÚ	not_given)Úextract_filesÚrequired_argsÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)Úvoice_create_params)Úmake_request_options)ÚVoiceÚVoicesÚAsyncVoicesc                  ó†   — e Zd ZdZedd„«       Zed	d„«       Z eg d¢«      eddde	dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
d„«       Z
y)r   ú(Turn audio into text or text into audio.c                ó   — t        | «      S ©a  
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
        )ÚVoicesWithRawResponse©Úselfs    úZ/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/openai/resources/audio/voices.pyÚwith_raw_responsezVoices.with_raw_response   s   € ô % TÓ*Ð*ó    c                ó   — t        | «      S ©zÌ
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
        )ÚVoicesWithStreamingResponser%   s    r'   Úwith_streaming_responsezVoices.with_streaming_response%   s   € ô +¨4Ó0Ð0r)   ©Úaudio_sampleÚconsentÚnameN©ÚtypeÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               ó  — t        ||||dœdgg«      }	t        t        t        t        t
        f   |	«      dgg¬«      }
ddi|xs i ¥}| j                  dt        |	t        j                  «      |
t        ||||ddi¬	«      t        ¬
«      S )áE  Create a custom voice you can use for audio output (for example, in
        Text-to-Speech and the Realtime API). This requires an audio sample and a
        previously uploaded consent recording.

        Send `name`, `audio_sample`, and the `consent` recording ID as multipart form
        data. The optional `type` defaults to `audio_sample`.

        Returns the saved voice's metadata. See the
        [custom voices guide](https://developers.openai.com/api/docs/guides/text-to-speech#custom-voices)
        for requirements and best practices. Custom voices are limited to eligible
        customers.

        Args:
          audio_sample: The sample audio recording file. Maximum size is 10 MiB.

              Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
              `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.

          consent: The consent recording ID (for example, `cons_1234`).

          name: The name of the new voice.

          type: The voice creation method. Defaults to `audio_sample` when omitted.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        ©r/   r0   r1   r3   r/   ©ÚpathsúContent-Typeúmultipart/form-dataú/audio/voicesÚbearer_authT©r4   r5   r6   r7   Úsecurity©ÚbodyÚfilesÚoptionsÚcast_to)r	   r   r   r   ÚstrÚobjectÚ_postr   r   ÚVoiceCreateParamsr   r   ©r&   r/   r0   r1   r3   r4   r5   r6   r7   rD   rE   s              r'   ÚcreatezVoices.create.   sµ   € ô^ #à ,Ø"ØØñ	ð ÐÐó
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÐGWÐFXÔYˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ�z‰zØÜ  Ô':×'LÑ'LÓMØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô ð ó 
ð 	
r)   )Úreturnr$   )rN   r,   ©r/   r   r0   rH   r1   rH   r3   zLiteral['audio_sample'] | Omitr4   zHeaders | Noner5   zQuery | Noner6   zBody | Noner7   z(float | httpx2.Timeout | None | NotGivenrN   r   ©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r(   r-   r   r   r   rM   © r)   r'   r   r      s½   „ Ù2àò+ó ð+ð ò1ó ð1ñ Ò6Ó7ð 04ð )-Ø$(Ø"&Ø<EñH
ð  ðH
ð ð	H
ð
 ðH
ð -ðH
ð &ðH
ð "ðH
ð  ðH
ð :ðH
ð 
òH
ó 8ñH
r)   c                  ó†   — e Zd ZdZedd„«       Zed	d„«       Z eg d¢«      eddde	dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
d„«       Z
y)r   r!   c                ó   — t        | «      S r#   )ÚAsyncVoicesWithRawResponser%   s    r'   r(   zAsyncVoices.with_raw_response}   s   € ô *¨$Ó/Ð/r)   c                ó   — t        | «      S r+   )Ú AsyncVoicesWithStreamingResponser%   s    r'   r-   z#AsyncVoices.with_streaming_response‡   s   € ô 0°Ó5Ð5r)   r.   Nr2   c             ƒ  óD  K  — t        ||||dœdgg«      }	t        t        t        t        t
        f   |	«      dgg¬«      }
ddi|xs i ¥}| j                  dt        |	t        j                  «      ƒ d{  –—† |
t        ||||dd	i¬
«      t        ¬«      ƒ d{  –—† S 7 Œ(7 Œ­w)r9   r:   r/   r;   r=   r>   r?   Nr@   TrA   rC   )r	   r   r   r   rH   rI   rJ   r   r   rK   r   r   rL   s              r'   rM   zAsyncVoices.create�   sÊ   è ø€ ô^ #à ,Ø"ØØñ	ð ÐÐó
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÐGWÐFXÔYˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ—Z‘ZØÜ,¨TÔ3F×3XÑ3XÓY×YØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô ð  ó 
÷ 
ð 	
àYøð
ús$   ‚A1B Á3B
Á4#B ÂBÂB ÂB )rN   rX   )rN   rZ   rO   rP   rU   r)   r'   r   r   z   s½   „ Ù2àò0ó ð0ð ò6ó ð6ñ Ò6Ó7ð 04ð )-Ø$(Ø"&Ø<EñH
ð  ðH
ð ð	H
ð
 ðH
ð -ðH
ð &ðH
ð "ðH
ð  ðH
ð :ðH
ð 
òH
ó 8ñH
r)   c                  ó   — e Zd Zdd„Zy)r$   c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú_voicesr   Úto_raw_response_wrapperrM   ©r&   Úvoicess     r'   Ú__init__zVoicesWithRawResponse.__init__Ý   s"   € ØˆŒä&×>Ñ>Ø�M‰Mó
ˆ�r)   N©rb   r   rN   ÚNone©rQ   rR   rS   rc   rU   r)   r'   r$   r$   Ü   ó   „ ô
r)   r$   c                  ó   — e Zd Zdd„Zy)rX   c                óZ   — || _         t        j                  |j                  «      | _        y r^   )r_   r   Úasync_to_raw_response_wrapperrM   ra   s     r'   rc   z#AsyncVoicesWithRawResponse.__init__æ   s"   € ØˆŒä&×DÑDØ�M‰Mó
ˆ�r)   N©rb   r   rN   re   rf   rU   r)   r'   rX   rX   å   rg   r)   rX   c                  ó   — e Zd Zdd„Zy)r,   c                óF   — || _         t        |j                  «      | _        y r^   )r_   r   rM   ra   s     r'   rc   z$VoicesWithStreamingResponse.__init__ï   s   € ØˆŒä2Ø�M‰Mó
ˆ�r)   Nrd   rf   rU   r)   r'   r,   r,   î   rg   r)   r,   c                  ó   — e Zd Zdd„Zy)rZ   c                óF   — || _         t        |j                  «      | _        y r^   )r_   r   rM   ra   s     r'   rc   z)AsyncVoicesWithStreamingResponse.__init__ø   s   € ØˆŒä8Ø�M‰Mó
ˆ�r)   Nrk   rf   rU   r)   r'   rZ   rZ   ÷   rg   r)   rZ   )/Ú
__future__r   Útypingr   r   Útyping_extensionsr   Úhttpx2Ú r   Ú_filesr	   Ú_typesr
   r   r   r   r   r   r   r   Ú_utilsr   r   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Útypes.audior   Ú_base_clientr   Útypes.audio.voicer   Ú__all__r   r   r$   rX   r,   rZ   rU   r)   r'   Ú<module>r      s‹   ðõ #ç  Ý %ã å  Ý )ß V× VÓ Vß ZÓ ZÝ &ß :ß YÝ .Ý 0Ý &à�]Ð
#€ô_
ˆ_ô _
ôD_
Ð"ô _
÷D
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r)   