ó
    ûÞ j¡=  ã                  óÞ  • % S SK Jr  S SKrS SKJrJrJr  S SKJrJ	r	  S SK
r
SSKJr  SSKJr  SSKJrJrJrJrJrJrJrJr  SS	KJrJrJr  SS
KJr  SSKJrJ r   SSK!J"r"J#r#  SSK$J%r%  SSK&J'r'  SSK(J)r)  SSK*J+r,  SSK-J.r.  SSK/J0r0  SSK1J2r2  SS/r3\Rh                  " S5      r5S\6S'    " S S\5      r7 " S S\ 5      r8 " S S5      r9 " S S5      r: " S S 5      r; " S! S"5      r<    S$S# jr=g)%é    )ÚannotationsN)ÚUnionÚMappingÚcast)ÚLiteralÚoverloadé   )Ú_legacy_response)Údeepcopy_with_paths)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚ	FileTypesÚomitÚ	not_given)Úextract_filesÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)Útranslation_create_params)Úmake_request_options)Ú
AudioModel)Ú$get_translation_response_format_type)ÚTranslation)ÚAudioResponseFormat)ÚTranslationVerboseÚTranslationsÚAsyncTranslationszopenai.audio.transcriptionszlogging.LoggerÚlogc            	      ój  • \ rS rSrSr\SS j5       r\SS j5       r\\	\	\	SSS\
S.                   SS jj5       r\\	\	SSS\
S.                   SS	 jj5       r\\	\	SSS\
S.                   SS
 jj5       r\	\	\	SSS\
S.                   SS jjrSrg)r#   é   ú(Turn audio into text or text into audio.c                ó   • [        U 5      $ ©zï
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
)ÚTranslationsWithRawResponse©Úselfs    Ú]/var/www/html/gaurav/venv/lib/python3.13/site-packages/openai/resources/audio/translations.pyÚwith_raw_responseÚTranslations.with_raw_response"   s   € ô +¨4Ó0Ð0ó    c                ó   • [        U 5      $ ©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
)Ú!TranslationsWithStreamingResponser,   s    r.   Úwith_streaming_responseÚ$Translations.with_streaming_response,   s   € ô 1°Ó6Ð6r1   N©Úresponse_formatÚpromptÚtemperatureÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc       	        ó   • g ©N© ©
r-   ÚfileÚmodelr8   r9   r:   r;   r<   r=   r>   s
             r.   ÚcreateÚTranslations.create5   s   € ð r1   ©r9   r:   r;   r<   r=   r>   c       	        ó   • g r@   rA   rB   s
             r.   rE   rF   F   s   € ð !r1   c       	        ó   • g r@   rA   rB   s
             r.   rE   rF   W   s   € ð r1   ©r9   r8   r:   r;   r<   r=   r>   c       	        ó  • [        UUUUUS.S//5      n
[        [        [        [        [
        4   U
5      S//S9nSS0U=(       d    0 EnU R                  S[        U
[        R                  5      U[        UUUU	SS0S	9[        U5      S
9$ )áª  
Translates audio into English.

Args:
  file: The audio file object (not file name) translate, in one of these formats: flac,
      mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. The request must include enough
      format metadata for the file to be identified. We recommend an extension-bearing
      filename and an appropriate content type.

  model: ID of the model to use. Only `whisper-1` (which is powered by our open source
      Whisper V2 model) is currently available.

  prompt: An optional text to guide the model's style or continue a previous audio
      segment. The
      [prompt](https://platform.openai.com/docs/guides/speech-to-text#prompting)
      should be in English.

  response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
      `verbose_json`, or `vtt`.

  temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
      output more random, while lower values like 0.2 will make it more focused and
      deterministic. If set to 0, the model will use
      [log probability](https://en.wikipedia.org/wiki/Log_probability) to
      automatically increase the temperature until certain thresholds are hit.

  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
©rC   rD   r9   r8   r:   rC   ©ÚpathsúContent-Typeúmultipart/form-dataú/audio/translationsÚbearer_authT©r;   r<   r=   r>   Úsecurity©ÚbodyÚfilesÚoptionsÚcast_to)r   r   r   r   ÚstrÚobjectÚ_postr   r   ÚTranslationCreateParamsr   Ú_get_response_format_type©r-   rC   rD   r9   r8   r:   r;   r<   r=   r>   rW   rX   s               r.   rE   rF   h   s¹   € ôb #àØØ Ø#2Ø*ñð ˆXˆJó	
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÑQˆð (Ð)>ÐXÀ=×CVÐTVÐXˆØ�z‰zØ!Ü  Ô'@×'XÑ'XÓYØÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô .¨oÓ>ð ð 
ð 	
r1   rA   )Úreturnr+   )ra   r4   ©rC   r   rD   úUnion[str, AudioModel]r8   zUnion[Literal['json'], Omit]r9   ú
str | Omitr:   úfloat | Omitr;   úHeaders | Noner<   úQuery | Noner=   úBody | Noner>   ú(float | httpx2.Timeout | None | NotGivenra   r    ©rC   r   rD   rc   r8   zLiteral['verbose_json']r9   rd   r:   re   r;   rf   r<   rg   r=   rh   r>   ri   ra   r"   ©rC   r   rD   rc   r8   zLiteral['text', 'srt', 'vtt']r9   rd   r:   re   r;   rf   r<   rg   r=   rh   r>   ri   ra   r[   )rC   r   rD   rc   r9   rd   r8   zBUnion[Literal['json', 'text', 'srt', 'verbose_json', 'vtt'], Omit]r:   re   r;   rf   r<   rg   r=   rh   r>   ri   ra   ú&Translation | TranslationVerbose | str©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r/   r5   r   r   r   rE   Ú__static_attributes__rA   r1   r.   r#   r#      sl  † Ù2àó1ó ð1ð ó7ó ð7ð ð 9=Ø!Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 6ðð ðð "ðð &ðð "ðð  ðð :ðð 
ôó ðð  ð "Ø$(ð )-Ø$(Ø"&Ø<Eñ!ð ð!ð &ð	!ð
 1ð!ð ð!ð "ð!ð &ð!ð "ð!ð  ð!ð :ð!ð 
ô!ó ð!ð  ð "Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 7ðð ðð "ðð &ðð "ðð  ðð :ðð 
ôó ðð* "Ø^bØ$(ð )-Ø$(Ø"&Ø<EñL
ð ðL
ð &ð	L
ð
 ðL
ð \ðL
ð "ðL
ð &ðL
ð "ðL
ð  ðL
ð :ðL
ð 
0÷L
ð L
r1   c            	      ój  • \ rS rSrSr\SS j5       r\SS j5       r\\	\	\	SSS\
S.                   SS jj5       r\\	\	SSS\
S.                   SS	 jj5       r\\	\	SSS\
S.                   SS
 jj5       r\	\	\	SSS\
S.                   SS jjrSrg)r$   é·   r(   c                ó   • [        U 5      $ r*   )Ú AsyncTranslationsWithRawResponser,   s    r.   r/   Ú#AsyncTranslations.with_raw_responseº   s   € ô 0°Ó5Ð5r1   c                ó   • [        U 5      $ r3   )Ú&AsyncTranslationsWithStreamingResponser,   s    r.   r5   Ú)AsyncTranslations.with_streaming_responseÄ   s   € ô 6°dÓ;Ð;r1   Nr7   c       	      ƒ  ó   #   • g 7fr@   rA   rB   s
             r.   rE   ÚAsyncTranslations.createÍ   s
   é € ð ùó   ‚rG   c       	      ƒ  ó   #   • g 7fr@   rA   rB   s
             r.   rE   r}   Þ   s
   é € ð !ùr~   c       	      ƒ  ó   #   • g 7fr@   rA   rB   s
             r.   rE   r}   ï   s
   é € ð ùr~   rJ   c       	      ƒ  óH  #   • [        UUUUUS.S//5      n
[        [        [        [        [
        4   U
5      S//S9nSS0U=(       d    0 EnU R                  S[        U
[        R                  5      I Sh  v•N U[        UUUU	SS	0S
9[        U5      S9I Sh  v•N $  N' N7f)rL   rM   rC   rN   rP   rQ   rR   NrS   TrT   rV   )r   r   r   r   r[   r\   r]   r   r   r^   r   r_   r`   s               r.   rE   r}      sÌ   é € ôb #àØØ Ø#2Ø*ñð ˆXˆJó	
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÑQˆð (Ð)>ÐXÀ=×CVÐTVÐXˆØ—Z‘ZØ!Ü,¨TÔ3L×3dÑ3dÓe×eØÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô .¨oÓ>ð  ð 
÷ 
ð 	
áeñ
ùs$   ‚A4B"Á6B
Á7"B"ÂB ÂB"Â B"rA   )ra   rw   )ra   rz   rb   rj   rk   )rC   r   rD   rc   r9   rd   r8   z Union[AudioResponseFormat, Omit]r:   re   r;   rf   r<   rg   r=   rh   r>   ri   ra   rl   rm   rA   r1   r.   r$   r$   ·   sk  † Ù2àó6ó ð6ð ó<ó ð<ð ð 9=Ø!Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 6ðð ðð "ðð &ðð "ðð  ðð :ðð 
ôó ðð  ð "Ø$(ð )-Ø$(Ø"&Ø<Eñ!ð ð!ð &ð	!ð
 1ð!ð ð!ð "ð!ð &ð!ð "ð!ð  ð!ð :ð!ð 
ô!ó ð!ð  ð "Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 7ðð ðð "ðð &ðð "ðð  ðð :ðð 
ôó ðð* "Ø<@Ø$(ð )-Ø$(Ø"&Ø<EñL
ð ðL
ð &ð	L
ð
 ðL
ð :ðL
ð "ðL
ð &ðL
ð "ðL
ð  ðL
ð :ðL
ð 
0÷L
ð L
r1   c                  ó   • \ rS rSrSS jrSrg)r+   iO  c                óZ   • Xl         [        R                  " UR                  5      U l        g r@   )Ú_translationsr
   Úto_raw_response_wrapperrE   ©r-   Útranslationss     r.   Ú__init__Ú$TranslationsWithRawResponse.__init__P  s#   € Ø)Ôä&×>Ò>Ø×Ñó
ˆ�r1   ©r„   rE   N©r‡   r#   ra   ÚNone©rn   ro   rp   rq   rˆ   rs   rA   r1   r.   r+   r+   O  ó   † ÷
r1   r+   c                  ó   • \ rS rSrSS jrSrg)rw   iX  c                óZ   • Xl         [        R                  " UR                  5      U l        g r@   )r„   r
   Úasync_to_raw_response_wrapperrE   r†   s     r.   rˆ   Ú)AsyncTranslationsWithRawResponse.__init__Y  s#   € Ø)Ôä&×DÒDØ×Ñó
ˆ�r1   rŠ   N©r‡   r$   ra   rŒ   r�   rA   r1   r.   rw   rw   X  rŽ   r1   rw   c                  ó   • \ rS rSrSS jrSrg)r4   ia  c                óD   • Xl         [        UR                  5      U l        g r@   )r„   r   rE   r†   s     r.   rˆ   Ú*TranslationsWithStreamingResponse.__init__b  s   € Ø)Ôä2Ø×Ñó
ˆ�r1   rŠ   Nr‹   r�   rA   r1   r.   r4   r4   a  rŽ   r1   r4   c                  ó   • \ rS rSrSS jrSrg)rz   ij  c                óD   • Xl         [        UR                  5      U l        g r@   )r„   r   rE   r†   s     r.   rˆ   Ú/AsyncTranslationsWithStreamingResponse.__init__k  s   € Ø)Ôä8Ø×Ñó
ˆ�r1   rŠ   Nr“   r�   rA   r1   r.   rz   rz   j  rŽ   r1   rz   c                ó   • [        U [        S9$ )N)r%   )Ú%_get_translation_response_format_typer%   )r8   s    r.   r_   r_   s  s   € ô 1°ÄcÑJÐJr1   )r8   zAudioResponseFormat | Omitra   z,type[Translation | TranslationVerbose | str])>Ú
__future__r   ÚloggingÚtypingr   r   r   Útyping_extensionsr   r   Úhttpx2Ú r
   Ú_filesr   Ú_typesr   r   r   r   r   r   r   r   Ú_utilsr   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Útypes.audior   Ú_base_clientr   Útypes.audio_modelr   Úlib._parsing._audior   r›   Útypes.audio.translationr    Útypes.audio_response_formatr!   Útypes.audio.translation_verboser"   Ú__all__Ú	getLoggerr%   Ú__annotations__r#   r$   r+   rw   r4   rz   r_   rA   r1   r.   Ú<module>r²      sÌ   ðö #ã ß 'Ñ 'ß /ã å  Ý )ß V× VÓ Vß KÑ KÝ &ß :ß YÝ 4Ý 0Ý +Ý pÝ 2Ý >Ý AàÐ.Ð
/€à×'Ò'Ð(EÓF€€^Ó FôU
�?ô U
ôpU
Ð(ô U
÷p
ñ 
÷
ñ 
÷
ñ 
÷
ñ 
ðKØ/ðKà1õKr1   