Ë
    /æjÂL  ã                  óì  — U d dl mZ d dlZd dlZd dlmZmZmZ d dlmZm	Z	 d dl
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 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l,m-Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddgZ5 ejl                  d«      Z7de8d<   	 	 	 	 d$d„Z9 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)%é    )Ú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ÚAsyncTranslationsúopenai.audio.transcriptionszlogging.LoggerÚlogc                ót   — t         j                  j                  j                  j	                  | t
        ¬«      S )N©r&   )ÚopenaiÚlibÚ_parsingÚ_audior   r&   )Úresponse_formats    úf/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/openai/resources/audio/translations.pyÚ_get_response_format_typer/   $   s+   € ô �:‰:×Ñ×%Ñ%×JÑJÈ?Ô`cÐJÓdÐdó    c            
      óz  — e Zd ZdZedd„«       Zedd„«       Ze ej                  dd¬«      e
e
e
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Ze ej                  dd¬«      e
e
ddded	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„«       «       Ze ej                  dd¬«      e
e
ddded	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Ze ej                  dd¬«      e
e
e
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Z ej                  d«      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
        )ÚTranslationsWithRawResponse©Úselfs    r.   Úwith_raw_responsezTranslations.with_raw_response-   s   € ô +¨4Ó0Ð0r0   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
        )Ú!TranslationsWithStreamingResponser6   s    r.   Úwith_streaming_responsez$Translations.with_streaming_response7   s   € ô 1°Ó6Ð6r0   Ú
deprecatedN©Úcategory©Úpromptr-   ÚtemperatureÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc       	         ó   — y ©N© ©
r7   ÚfileÚmodelrA   r-   rB   rC   rD   rE   rF   s
             r.   ÚcreatezTranslations.create@   s   € ð  r0   ©rA   rB   rC   rD   rE   rF   c       	         ó   — y rH   rI   rJ   s
             r.   rM   zTranslations.createR   s   € ð  !r0   c       	         ó   — y rH   rI   rJ   s
             r.   rM   zTranslations.created   s   € ð  r0   c       	         ó   — y rH   rI   rJ   s
             r.   rM   zTranslations.createv   s   € ð  25r0   c       	        óJ  — 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        |t        j                  d
«      ¬«      ¬«      S )áA	  
        Translates audio into English.

        This endpoint supports only `whisper-1`. The endpoint and model are deprecated
        and scheduled to shut down on February 26, 2027. Migrate to
        `/v1/realtime/translations`, which requires a separate integration. See the
        [deprecation schedule](https://developers.openai.com/api/docs/deprecations) for
        details.

        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.

              Deprecated values:

              - "whisper-1", "gpt-4o-transcribe", "gpt-4o-mini-transcribe",
                "gpt-4o-mini-transcribe-2025-12-15", "gpt-4o-transcribe-diarize": Announced
                shutdown date: 2027-02-26. See
                https://developers.openai.com/api/docs/deprecations for details and
                recommended replacements.

          prompt: An optional text to guide the model's style or continue a previous audio
              segment. The
              [prompt](https://developers.openai.com/api/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
        ©rK   rL   rA   r-   rB   rK   ©ÚpathsúContent-Typeúmultipart/form-dataú/audio/translationsÚbearer_authT©rC   rD   rE   rF   Úsecurityr%   r(   ©ÚbodyÚfilesÚoptionsÚcast_to)r   r   r   r   ÚstrÚobjectÚ_postr   r   ÚTranslationCreateParamsr   Ú_create_response_format_typeÚloggingÚ	getLogger©r7   rK   rL   rA   r-   rB   rC   rD   rE   rF   r^   r_   s               r.   rM   zTranslations.createˆ   sÇ   € ô@ #àØØ Ø#2Ø*ñð ˆXˆJó	
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÔQˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ�z‰zØ!Ü  Ô'@×'XÑ'XÓYØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô 1°Äg×FWÑFWÐXuÓFvÔwð ó 
ð 	
r0   )Úreturnr5   )rj   r;   ©rK   r   rL   úUnion[str, AudioModel]rA   ú
str | Omitr-   zLiteral['json'] | OmitrB   úfloat | OmitrC   úHeaders | NonerD   úQuery | NonerE   úBody | NonerF   ú(float | httpx2.Timeout | None | NotGivenrj   r    ©rK   r   rL   rl   rA   rm   r-   zLiteral['verbose_json']rB   rn   rC   ro   rD   rp   rE   rq   rF   rr   rj   r"   ©rK   r   rL   rl   rA   rm   r-   zLiteral['text', 'srt', 'vtt']rB   rn   rC   ro   rD   rp   rE   rq   rF   rr   rj   rb   ©rK   r   rL   rl   rA   rm   r-   z<Literal['json', 'text', 'srt', 'verbose_json', 'vtt'] | OmitrB   rn   rC   ro   rD   rp   rE   rq   rF   rr   rj   z&Translation | TranslationVerbose | str©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r8   r<   r   Útyping_extensionsr=   r   r   rM   rI   r0   r.   r#   r#   *   sv  „ Ù2àò1ó ð1ð ò7ó ð7ð Ø!Ð×!Ñ! ,¸Ô>ð "Ø26Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 ðð 0ðð "ðð &ðð "ðð  ðð :ðð 
òó ?ó ðð  Ø!Ð×!Ñ! ,¸Ô>ð "à$(ð )-Ø$(Ø"&Ø<Eñ!ð ð!ð &ð	!ð
 ð!ð 1ð!ð "ð!ð &ð!ð "ð!ð  ð!ð :ð!ð 
ò!ó ?ó ð!ð  Ø!Ð×!Ñ! ,¸Ô>ð "à$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 ðð 7ðð "ðð &ðð "ðð  ðð :ðð 
òó ?ó ðð  Ø!Ð×!Ñ! ,¸Ô>ð "ØX\Ø$(ð )-Ø$(Ø"&Ø<Eñ5ð ð5ð &ð	5ð
 ð5ð Vð5ð "ð5ð &ð5ð "ð5ð  ð5ð :ð5ð 
0ò5ó ?ó ð5ð  "Ð×!Ñ! ,Ó/ð "ØX\Ø$(ð )-Ø$(Ø"&Ø<EñZ
ð ðZ
ð &ð	Z
ð
 ðZ
ð VðZ
ð "ðZ
ð &ðZ
ð "ðZ
ð  ðZ
ð :ðZ
ð 
0òZ
ó 0ñZ
r0   c            
      óz  — e Zd ZdZedd„«       Zedd„«       Ze ej                  dd¬«      e
e
e
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Ze ej                  dd¬«      e
e
ddded	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„«       «       Ze ej                  dd¬«      e
e
ddded	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Ze ej                  dd¬«      e
e
e
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       «       Z ej                  d«      e
e
e
dddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Zy)r$   r2   c                ó   — t        | «      S r4   )Ú AsyncTranslationsWithRawResponser6   s    r.   r8   z#AsyncTranslations.with_raw_responseé   s   € ô 0°Ó5Ð5r0   c                ó   — t        | «      S r:   )Ú&AsyncTranslationsWithStreamingResponser6   s    r.   r<   z)AsyncTranslations.with_streaming_responseó   s   € ô 6°dÓ;Ð;r0   r=   Nr>   r@   c       	      ƒ  ó   K  — y ­wrH   rI   rJ   s
             r.   rM   zAsyncTranslations.createü   s   è ø€ ð  ùó   ‚rN   c       	      ƒ  ó   K  — y ­wrH   rI   rJ   s
             r.   rM   zAsyncTranslations.create  s   è ø€ ð  !ùr‚   c       	      ƒ  ó   K  — y ­wrH   rI   rJ   s
             r.   rM   zAsyncTranslations.create   s   è ø€ ð  ùr‚   c       	      ƒ  ó   K  — y ­wrH   rI   rJ   s
             r.   rM   zAsyncTranslations.create2  s   è ø€ ð  25ùr‚   c       	      ƒ  óz  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        |t        j                  d«      ¬«      ¬«      ƒ d{  –—† S 7 ŒB7 Œ­w)rS   rT   rK   rU   rW   rX   rY   NrZ   Tr[   r%   r(   r]   )r   r   r   r   rb   rc   rd   r   r   re   r   rf   rg   rh   ri   s               r.   rM   zAsyncTranslations.createD  sÜ   è ø€ ô@ #àØØ Ø#2Ø*ñð ˆXˆJó	
ˆô œd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÔQˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ—Z‘ZØ!Ü,¨TÔ3L×3dÑ3dÓe×eØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô 1°Äg×FWÑFWÐXuÓFvÔwð  ó 
÷ 
ð 	
àeøð
ús$   ‚A2B;Á4B7
Á5=B;Â2B9Â3B;Â9B;)rj   r~   )rj   r€   rk   rs   rt   ru   rv   rI   r0   r.   r$   r$   æ   sv  „ Ù2àò6ó ð6ð ò<ó ð<ð Ø!Ð×!Ñ! ,¸Ô>ð "Ø26Ø$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 ðð 0ðð "ðð &ðð "ðð  ðð :ðð 
òó ?ó ðð  Ø!Ð×!Ñ! ,¸Ô>ð "à$(ð )-Ø$(Ø"&Ø<Eñ!ð ð!ð &ð	!ð
 ð!ð 1ð!ð "ð!ð &ð!ð "ð!ð  ð!ð :ð!ð 
ò!ó ?ó ð!ð  Ø!Ð×!Ñ! ,¸Ô>ð "à$(ð )-Ø$(Ø"&Ø<Eñð ðð &ð	ð
 ðð 7ðð "ðð &ðð "ðð  ðð :ðð 
òó ?ó ðð  Ø!Ð×!Ñ! ,¸Ô>ð "ØX\Ø$(ð )-Ø$(Ø"&Ø<Eñ5ð ð5ð &ð	5ð
 ð5ð Vð5ð "ð5ð &ð5ð "ð5ð  ð5ð :ð5ð 
0ò5ó ?ó ð5ð  "Ð×!Ñ! ,Ó/ð "ØX\Ø$(ð )-Ø$(Ø"&Ø<EñZ
ð ðZ
ð &ð	Z
ð
 ðZ
ð VðZ
ð "ðZ
ð &ðZ
ð "ðZ
ð  ðZ
ð :ðZ
ð 
0òZ
ó 0ñZ
r0   c                  ó   — e Zd Zdd„Zy)r5   c                óZ   — || _         t        j                  |j                  «      | _        y rH   )Ú_translationsr
   Úto_raw_response_wrapperrM   ©r7   Útranslationss     r.   Ú__init__z$TranslationsWithRawResponse.__init__£  s%   € Ø)ˆÔä&×>Ñ>Ø×Ñó
ˆ�r0   N©rŒ   r#   rj   ÚNone©rw   rx   ry   r�   rI   r0   r.   r5   r5   ¢  ó   „ ô
r0   r5   c                  ó   — e Zd Zdd„Zy)r~   c                óZ   — || _         t        j                  |j                  «      | _        y rH   )r‰   r
   Úasync_to_raw_response_wrapperrM   r‹   s     r.   r�   z)AsyncTranslationsWithRawResponse.__init__¬  s%   € Ø)ˆÔä&×DÑDØ×Ñó
ˆ�r0   N©rŒ   r$   rj   r�   r�   rI   r0   r.   r~   r~   «  r‘   r0   r~   c                  ó   — e Zd Zdd„Zy)r;   c                óF   — || _         t        |j                  «      | _        y rH   )r‰   r   rM   r‹   s     r.   r�   z*TranslationsWithStreamingResponse.__init__µ  s   € Ø)ˆÔä2Ø×Ñó
ˆ�r0   NrŽ   r�   rI   r0   r.   r;   r;   ´  r‘   r0   r;   c                  ó   — e Zd Zdd„Zy)r€   c                óF   — || _         t        |j                  «      | _        y rH   )r‰   r   rM   r‹   s     r.   r�   z/AsyncTranslationsWithStreamingResponse.__init__¾  s   € Ø)ˆÔä8Ø×Ñó
ˆ�r0   Nr•   r�   rI   r0   r.   r€   r€   ½  r‘   r0   r€   )r-   zAudioResponseFormat | Omitrj   z,type[Translation | TranslationVerbose | str])@Ú
__future__r   rg   r{   Útypingr   r   r   r   r   Úhttpx2Úopenai.lib._parsing._audior)   Ú 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   rf   Útypes.audio.translationr    Útypes.audio_response_formatr!   Útypes.audio.translation_verboser"   Ú__all__rh   r&   Ú__annotations__r/   r#   r$   r5   r~   r;   r€   rI   r0   r.   ú<module>r®      sÖ   ðö #ã Û ß 'Ñ 'ß /ã ã !å  Ý )ß V× VÓ Vß KÑ KÝ &ß :ß YÝ 4Ý 0Ý +Ý gÝ 2Ý >Ý AàÐ.Ð
/€ð (�g×'Ñ'Ð(EÓF€€^Ó FðeØ/ðeà1óeôy
�?ô y
ôxy
Ð(ô y
÷x
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r0   