§
    ÒÁ³g#  ã                  ój  — 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 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(dS )é    )Úannotations)ÚUnion)ÚLiteralNé   )Ú_legacy_response)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Ú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                  óV   — e Zd Zedd„¦   «         Zedd„¦   «         Zeedddedœdd„ZdS )r   ÚreturnÚSpeechWithRawResponsec                ó    — 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
        )r   ©Úselfs    ú[/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/openai/resources/audio/speech.pyÚwith_raw_responsezSpeech.with_raw_response    s   € õ % TÑ*Ô*Ð*ó    ÚSpeechWithStreamingResponsec                ó    — 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
        )r%   r    s    r"   Úwith_streaming_responsezSpeech.with_streaming_response*   s   € õ +¨4Ñ0Ô0Ð0r$   N©Úresponse_formatÚspeedÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚinputÚstrÚmodelúUnion[str, SpeechModel]ÚvoiceúTLiteral['alloy', 'ash', 'coral', 'echo', 'fable', 'onyx', 'nova', 'sage', 'shimmer']r*   ú>Literal['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'] | NotGivenr+   úfloat | NotGivenr,   úHeaders | Noner-   úQuery | Noner.   úBody | Noner/   ú'float | httpx.Timeout | None | NotGivenú+_legacy_response.HttpxBinaryResponseContentc       	        ó¶   — ddi|pi ¥}|                       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` or `tts-1-hd`

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

          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.

          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©r0   r2   r4   r*   r+   ©r,   r-   r.   r/   ©ÚbodyÚoptionsÚcast_to)Ú_postr   r   ÚSpeechCreateParamsr   r   ÚHttpxBinaryResponseContent©
r!   r0   r2   r4   r*   r+   r,   r-   r.   r/   s
             r"   ÚcreatezSpeech.create3   sŽ   € ðX "Ð#=ÐWÀ-ÐBUÐSUÐWˆØ�zŠzØÝ à"Ø"Ø"Ø'6Ø"ðð õ %Ô7ñ	ô 	õ )Ø+¸ÐQ[Ðelðñ ô õ %Ô?ð ñ 
ô 
ð 	
r$   )r   r   )r   r%   ©r0   r1   r2   r3   r4   r5   r*   r6   r+   r7   r,   r8   r-   r9   r.   r:   r/   r;   r   r<   ©Ú__name__Ú
__module__Ú__qualname__r   r#   r(   r   rL   © r$   r"   r   r      sˆ   € € € € € Øð+ð +ð +ñ „_ð+ð ð1ð 1ð 1ñ „_ð1ð [dØ"+ð )-Ø$(Ø"&Ø;Dð=
ð =
ð =
ð =
ð =
ð =
ð =
ð =
r$   c                  óV   — e Zd Zedd„¦   «         Zedd„¦   «         Zeedddedœdd„ZdS )r   r   ÚAsyncSpeechWithRawResponsec                ó    — t          | ¦  «        S r   )rT   r    s    r"   r#   zAsyncSpeech.with_raw_responset   s   € õ *¨$Ñ/Ô/Ð/r$   Ú AsyncSpeechWithStreamingResponsec                ó    — t          | ¦  «        S r'   )rV   r    s    r"   r(   z#AsyncSpeech.with_streaming_response~   s   € õ 0°Ñ5Ô5Ð5r$   Nr)   r0   r1   r2   r3   r4   r5   r*   r6   r+   r7   r,   r8   r-   r9   r.   r:   r/   r;   r<   c       	      ƒ  óÒ   K  — ddi|pi ¥}|                       dt          |||||dœt          j        ¦  «        ƒ d{V —†t	          ||||	¬¦  «        t
          j        ¬¦  «        ƒ d{V —†S )r>   r?   r@   rA   rB   NrC   rD   )rH   r   r   rI   r   r   rJ   rK   s
             r"   rL   zAsyncSpeech.create‡   sÎ   è è € ðX "Ð#=ÐWÀ-ÐBUÐSUÐWˆØ—Z’ZØÝ,à"Ø"Ø"Ø'6Ø"ðð õ %Ô7ñ	ô 	ð 	ð 	ð 	ð 	ð 	ð 	õ )Ø+¸ÐQ[Ðelðñ ô õ %Ô?ð  ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ð 	
r$   )r   rT   )r   rV   rM   rN   rR   r$   r"   r   r   s   sˆ   € € € € € Øð0ð 0ð 0ñ „_ð0ð ð6ð 6ð 6ñ „_ð6ð [dØ"+ð )-Ø$(Ø"&Ø;Dð=
ð =
ð =
ð =
ð =
ð =
ð =
ð =
r$   c                  ó   — e Zd Zdd„ZdS )r   Úspeechr   r   ÚNonec                óP   — || _         t          j        |j        ¦  «        | _        d S ©N)Ú_speechr   Úto_raw_response_wrapperrL   ©r!   rZ   s     r"   Ú__init__zSpeechWithRawResponse.__init__È   s&   € ØˆŒå&Ô>ØŒMñ
ô 
ˆŒˆˆr$   N©rZ   r   r   r[   ©rO   rP   rQ   ra   rR   r$   r"   r   r   Ç   ó(   € € € € € ð
ð 
ð 
ð 
ð 
ð 
r$   r   c                  ó   — e Zd Zdd„ZdS )rT   rZ   r   r   r[   c                óP   — || _         t          j        |j        ¦  «        | _        d S r]   )r^   r   Úasync_to_raw_response_wrapperrL   r`   s     r"   ra   z#AsyncSpeechWithRawResponse.__init__Ñ   s&   € ØˆŒå&ÔDØŒMñ
ô 
ˆŒˆˆr$   N©rZ   r   r   r[   rc   rR   r$   r"   rT   rT   Ð   rd   r$   rT   c                  ó   — e Zd Zdd„ZdS )r%   rZ   r   r   r[   c                óR   — || _         t          |j        t          ¦  «        | _        d S r]   )r^   r   rL   r   r`   s     r"   ra   z$SpeechWithStreamingResponse.__init__Ú   s&   € ØˆŒå9ØŒMÝ%ñ
ô 
ˆŒˆˆr$   Nrb   rc   rR   r$   r"   r%   r%   Ù   ó(   € € € € € ð
ð 
ð 
ð 
ð 
ð 
r$   r%   c                  ó   — e Zd Zdd„ZdS )rV   rZ   r   r   r[   c                óR   — || _         t          |j        t          ¦  «        | _        d S r]   )r^   r   rL   r   r`   s     r"   ra   z)AsyncSpeechWithStreamingResponse.__init__ä   s&   € ØˆŒå?ØŒMÝ*ñ
ô 
ˆŒˆˆr$   Nrh   rc   rR   r$   r"   rV   rV   ã   rk   r$   rV   ))Ú
__future__r   Útypingr   Útyping_extensionsr   ÚhttpxÚ r   Ú_typesr   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   rT   r%   rV   rR   r$   r"   ú<module>r|      se  ðð #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %à €€€à  Ð  Ð  Ð  Ð  Ð  Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?ðð ð ð ð ð ð ð ð 'Ð &Ð &Ð &Ð &Ð &Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :ðð ð ð ð ð ð ð ð ð ð ð ð 0Ð /Ð /Ð /Ð /Ð /Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3à�]Ð
#€ðQ
ð Q
ð Q
ð Q
ð Q
ˆ_ñ Q
ô Q
ð Q
ðhQ
ð Q
ð Q
ð Q
ð Q
Ð"ñ Q
ô Q
ð Q
ðh
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
r$   