Ë
    ²Œj¼'  ã                  óL  — d dl mZ d dlmZ d dlmZ d dlZddlmZ ddl	m
Z
mZmZmZmZmZmZ ddlmZmZ dd	lmZ dd
l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! 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)ÚUnion)ÚLiteralNé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)ÚStreamedBinaryAPIResponseÚAsyncStreamedBinaryAPIResponseÚ#to_custom_streamed_response_wrapperÚ)async_to_custom_streamed_response_wrapper)Úspeech_create_params)Úmake_request_options)ÚSpeechModelÚSpeechÚAsyncSpeechc            	      óz   — e Zd Zedd„«       Zedd„«       Zeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)	r   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
        )ÚSpeechWithRawResponse©Úselfs    úg/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/openai/resources/audio/speech.pyÚwith_raw_responsezSpeech.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
        )ÚSpeechWithStreamingResponser!   s    r#   Úwith_streaming_responsezSpeech.with_streaming_response'   s   € ô +¨4Ó0Ð0r%   N©ÚinstructionsÚresponse_formatÚspeedÚstream_formatÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               ó¶   — ddi|xs i ¥}| j                  dt        |||||||dœt        j                  «      t	        ||	|
|¬«      t
        j                  ¬«      S )á  
        Generates audio from the input text.

        Args:
          input: The text to generate audio for. The maximum length is 4096 characters.

          model:
              One of the available [TTS models](https://platform.openai.com/docs/models#tts):
              `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.

          voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
              `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
              `verse`. Previews of the voices are available in the
              [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).

          instructions: Control the voice of your generated audio with additional instructions. Does not
              work with `tts-1` or `tts-1-hd`.

          response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
              `wav`, and `pcm`.

          speed: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is
              the default.

          stream_format: The format to stream the audio in. Supported formats are `sse` and `audio`.
              `sse` is not supported for `tts-1` or `tts-1-hd`.

          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
        ÚAcceptúapplication/octet-streamú/audio/speech©ÚinputÚmodelÚvoicer+   r,   r-   r.   ©r/   r0   r1   r2   ©ÚbodyÚoptionsÚcast_to)Ú_postr   r   ÚSpeechCreateParamsr   r   ÚHttpxBinaryResponseContent©r"   r9   r:   r;   r+   r,   r-   r.   r/   r0   r1   r2   s               r#   ÚcreatezSpeech.create0   s�   € ðl "Ð#=ÐWÀ-ÒBUÐSUÐWˆØ�z‰zØÜ à"Ø"Ø"Ø$0Ø'6Ø"Ø%2ñô %×7Ñ7óô )Ø+¸ÐQ[Ðelôô %×?Ñ?ð# ó 
ð 	
r%   )Úreturnr    )rF   r(   ©r9   Ústrr:   zUnion[str, SpeechModel]r;   zlUnion[str, Literal['alloy', 'ash', 'ballad', 'coral', 'echo', 'sage', 'shimmer', 'verse', 'marin', 'cedar']]r+   z
str | Omitr,   z:Literal['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] | Omitr-   zfloat | Omitr.   zLiteral['sse', 'audio'] | Omitr/   zHeaders | Noner0   zQuery | Noner1   zBody | Noner2   z'float | httpx.Timeout | None | NotGivenrF   z+_legacy_response.HttpxBinaryResponseContent©	Ú__name__Ú
__module__Ú__qualname__r   r$   r)   r   r   rE   © r%   r#   r   r      sÏ   „ Øò+ó ð+ð ò1ó ð1ð  $(ØVZØ"Ø8<ð )-Ø$(Ø"&Ø;Dñ#I
ð ðI
ð 'ð	I
ð

ðI
ð !ðI
ð TðI
ð ðI
ð 6ðI
ð &ðI
ð "ðI
ð   ð!I
ð" 9ð#I
ð$ 
5ô%I
r%   c            	      óz   — e Zd Zedd„«       Zedd„«       Zeeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)	r   c                ó   — t        | «      S r   )ÚAsyncSpeechWithRawResponser!   s    r#   r$   zAsyncSpeech.with_raw_response}   s   € ô *¨$Ó/Ð/r%   c                ó   — t        | «      S r'   )Ú AsyncSpeechWithStreamingResponser!   s    r#   r)   z#AsyncSpeech.with_streaming_response‡   s   € ô 0°Ó5Ð5r%   Nr*   c             ƒ  óæ   K  — ddi|xs i ¥}| j                  dt        |||||||dœt        j                  «      ƒ d{  –—† t	        ||	|
|¬«      t
        j                  ¬«      ƒ d{  –—† S 7 Œ.7 Œ­w)r4   r5   r6   r7   r8   Nr<   r=   )rA   r   r   rB   r   r   rC   rD   s               r#   rE   zAsyncSpeech.create�   sš   è ø€ ðl "Ð#=ÐWÀ-ÒBUÐSUÐWˆØ—Z‘ZØÜ,à"Ø"Ø"Ø$0Ø'6Ø"Ø%2ñô %×7Ñ7ó÷ ô )Ø+¸ÐQ[Ðelôô %×?Ñ?ð#  ó 
÷ 
ð 	
ðøð
ús!   ‚<A1¾A-
¿)A1Á(A/Á)A1Á/A1)rF   rP   )rF   rR   rG   rI   rM   r%   r#   r   r   |   sÏ   „ Øò0ó ð0ð ò6ó ð6ð  $(ØVZØ"Ø8<ð )-Ø$(Ø"&Ø;Dñ#I
ð ðI
ð 'ð	I
ð

ðI
ð !ðI
ð TðI
ð ðI
ð 6ðI
ð &ðI
ð "ðI
ð   ð!I
ð" 9ð#I
ð$ 
5ô%I
r%   c                  ó   — e Zd Zdd„Zy)r    c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú_speechr   Úto_raw_response_wrapperrE   ©r"   Úspeechs     r#   Ú__init__zSpeechWithRawResponse.__init__Ý   s"   € ØˆŒä&×>Ñ>Ø�M‰Mó
ˆ�r%   N©rZ   r   rF   ÚNone©rJ   rK   rL   r[   rM   r%   r#   r    r    Ü   ó   „ ô
r%   r    c                  ó   — e Zd Zdd„Zy)rP   c                óZ   — || _         t        j                  |j                  «      | _        y rV   )rW   r   Úasync_to_raw_response_wrapperrE   rY   s     r#   r[   z#AsyncSpeechWithRawResponse.__init__æ   s"   € ØˆŒä&×DÑDØ�M‰Mó
ˆ�r%   N©rZ   r   rF   r]   r^   rM   r%   r#   rP   rP   å   r_   r%   rP   c                  ó   — e Zd Zdd„Zy)r(   c                óP   — || _         t        |j                  t        «      | _        y rV   )rW   r   rE   r   rY   s     r#   r[   z$SpeechWithStreamingResponse.__init__ï   s   € ØˆŒä9Ø�M‰MÜ%ó
ˆ�r%   Nr\   r^   rM   r%   r#   r(   r(   î   ó   „ ô
r%   r(   c                  ó   — e Zd Zdd„Zy)rR   c                óP   — || _         t        |j                  t        «      | _        y rV   )rW   r   rE   r   rY   s     r#   r[   z)AsyncSpeechWithStreamingResponse.__init__ù   s   € ØˆŒä?Ø�M‰MÜ*ó
ˆ�r%   Nrc   r^   rM   r%   r#   rR   rR   ø   rf   r%   rR   )+Ú
__future__r   Útypingr   Útyping_extensionsr   ÚhttpxÚ r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   r   r   Útypes.audior   Ú_base_clientr   Útypes.audio.speech_modelr   Ú__all__r   r   r    rP   r(   rR   rM   r%   r#   Ú<module>rw      sŽ   ðõ #å Ý %ã å  ß K× KÑ Kß <Ý &ß :÷ó õ 0Ý 0Ý 3à�]Ð
#€ô]
ˆ_ô ]
ô@]
Ð"ô ]
÷@
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r%   