Ë
    ¼ßÍiJ)  ã                  ó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            	      ó~   — e Zd 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   ú(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
        )ÚSpeechWithRawResponse©Úselfs    úi/root/rosshost/parking-map/parking-api/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.

        Returns the audio file content, or a stream of audio events.

        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`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.

          voice: The voice to use when generating the audio. Supported built-in voices are
              `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
              `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
              object with an `id`, for example `{ "id": "voice_1234" }`. 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/   ©r0   r1   r2   r3   ©ÚbodyÚoptionsÚcast_to)Ú_postr   r   ÚSpeechCreateParamsr   r   ÚHttpxBinaryResponseContent©r#   r:   r;   r<   r,   r-   r.   r/   r0   r1   r2   r3   s               r$   ÚcreatezSpeech.create2   s�   € ðp "Ð#=ÐWÀ-ÒBUÐSUÐWˆØ�z‰zØÜ à"Ø"Ø"Ø$0Ø'6Ø"Ø%2ñô %×7Ñ7óô )Ø+¸ÐQ[Ðelôô %×?Ñ?ð# ó 
ð 	
r&   )Úreturnr!   )rG   r)   ©r:   Ústrr;   zUnion[str, SpeechModel]r<   zspeech_create_params.Voicer,   z
str | Omitr-   z:Literal['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] | Omitr.   zfloat | Omitr/   zLiteral['sse', 'audio'] | Omitr0   zHeaders | Noner1   zQuery | Noner2   zBody | Noner3   z'float | httpx.Timeout | None | NotGivenrG   z+_legacy_response.HttpxBinaryResponseContent©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   r*   r   r   rF   © r&   r$   r   r      sÒ   „ Ù2àò+ó ð+ð ò1ó ð1ð $(ØVZØ"Ø8<ð )-Ø$(Ø"&Ø;DñK
ð ðK
ð 'ð	K
ð
 *ðK
ð !ðK
ð TðK
ð ðK
ð 6ðK
ð &ðK
ð "ðK
ð  ðK
ð 9ðK
ð  
5ô!K
r&   c            	      ó~   — e Zd 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   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)r5   r6   r7   r8   r9   Nr=   r>   )rB   r   r   rC   r   r   rD   rE   s               r$   rF   zAsyncSpeech.create–   sš   è ø€ ðp "Ð#=ÐWÀ-ÒBUÐSUÐWˆØ—Z‘ZØÜ,à"Ø"Ø"Ø$0Ø'6Ø"Ø%2ñô %×7Ñ7ó÷ ô )Ø+¸ÐQ[Ðelôô %×?Ñ?ð#  ó 
÷ 
ð 	
ðøð
ús!   ‚<A1¾A-
¿)A1Á(A/Á)A1Á/A1)rG   rR   )rG   rT   rH   rJ   rO   r&   r$   r   r   €   sÒ   „ Ù2àò0ó ð0ð ò6ó ð6ð $(ØVZØ"Ø8<ð )-Ø$(Ø"&Ø;DñK
ð ðK
ð 'ð	K
ð
 *ðK
ð !ðK
ð TðK
ð ðK
ð 6ðK
ð &ðK
ð "ðK
ð  ðK
ð 9ðK
ð  
5ô!K
r&   c                  ó   — e Zd Zdd„Zy)r!   c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú_speechr   Úto_raw_response_wrapperrF   ©r#   Úspeechs     r$   Ú__init__zSpeechWithRawResponse.__init__å   s"   € ØˆŒä&×>Ñ>Ø�M‰Mó
ˆ�r&   N©r\   r   rG   ÚNone©rK   rL   rM   r]   rO   r&   r$   r!   r!   ä   ó   „ ô
r&   r!   c                  ó   — e Zd Zdd„Zy)rR   c                óZ   — || _         t        j                  |j                  «      | _        y rX   )rY   r   Úasync_to_raw_response_wrapperrF   r[   s     r$   r]   z#AsyncSpeechWithRawResponse.__init__î   s"   € ØˆŒä&×DÑDØ�M‰Mó
ˆ�r&   N©r\   r   rG   r_   r`   rO   r&   r$   rR   rR   í   ra   r&   rR   c                  ó   — e Zd Zdd„Zy)r)   c                óP   — || _         t        |j                  t        «      | _        y rX   )rY   r   rF   r   r[   s     r$   r]   z$SpeechWithStreamingResponse.__init__÷   s   € ØˆŒä9Ø�M‰MÜ%ó
ˆ�r&   Nr^   r`   rO   r&   r$   r)   r)   ö   ó   „ ô
r&   r)   c                  ó   — e Zd Zdd„Zy)rT   c                óP   — || _         t        |j                  t        «      | _        y rX   )rY   r   rF   r   r[   s     r$   r]   z)AsyncSpeechWithStreamingResponse.__init__  s   € ØˆŒä?Ø�M‰MÜ*ó
ˆ�r&   Nre   r`   rO   r&   r$   rT   rT      rh   r&   rT   )+Ú
__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!   rR   r)   rT   rO   r&   r$   ú<module>ry      sŽ   ðõ #å Ý %ã å  ß K× KÑ Kß <Ý &ß :÷ó õ 0Ý 0Ý 3à�]Ð
#€ôa
ˆ_ô a
ôHa
Ð"ô a
÷H
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r&   