ó
    ‚¤j]  ã                   óÈ   • S SK JrJr  S SKJr  \(       a  S SKr\" 5       S\\S4   S\	S-  S\	S-  S\
\\4   4S	 j5       r\" 5       S
\S\	S-  S\	S-  S\
\\4   4S j5       rg)é    )ÚTYPE_CHECKINGÚAny)ÚdocumentNÚaudioz
np.ndarrayÚ
min_lengthÚ
max_lengthÚreturnc                 ó„   • Uc  Ub6  U u  p4[        U5      U-  nUb  XQ:  a
  SSSU S3S.$ Ub  XR:”  a
  SSSU S3S.$ SSS.$ )	aî  
Validates that the audio length is within the specified min and max length (in seconds).

Parameters:
    audio: A tuple of (sample rate in Hz, audio data as numpy array).
    min_length: Minimum length of audio in seconds. If None, no minimum length check is performed.
    max_length: Maximum length of audio in seconds. If None, no maximum length check is performed.
Returns:
    A dict corresponding to `gr.validate()` indicating whether the audio length is valid and an optional message.
ÚvalidateFz(Audio is too short. It must be at least ú seconds©Ú__type__Úis_validÚmessagez&Audio is too long. It must be at most T©r   r   )Úlen)r   r   r   Úsample_rateÚdataÚdurations         ÚŸC:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\gradio/validators.pyÚis_audio_correct_lengthr   	   sƒ   € ð Ñ Ñ!7Ø!ÑˆÜ�t“9˜{Ñ*ˆØÑ! hÓ&;à&Ø!ØEÀjÀ\ÐQYÐZñð ð
 Ñ! hÓ&;à&Ø!ØCÀJÀ<ÈxÐXñð ð
 #°Ñ5Ð5ó    Úvideoc                 ó|   • SSK Jn  Uc  Ub,  U" U 5      nUb  XA:  a
  SSSU S3S.$ Ub  XB:”  a
  SSSU S3S.$ SS	S
.$ )aÔ  
Validates that the video file length is within the specified min and max length (in seconds).

Parameters:
    video: The path to the video file.
    min_length: Minimum length of video in seconds. If None, no minimum length check is performed.
    max_length: Maximum length of video in seconds. If None, no maximum length check is performed.
Returns:
    A dict corresponding to `gr.validate()` indicating whether the audio length is valid and an optional message.
r   )Úget_video_lengthr   Fz(Video is too short. It must be at least r   r   z&Video is too long. It must be at most Tr   )Úgradio.processing_utilsr   )r   r   r   r   r   s        r   Úis_video_correct_lengthr   )   sz   € õ 9àÑ Ñ!7Ù# EÓ*ˆØÑ! hÓ&;à&Ø!ØEÀjÀ\ÐQYÐZñð ð
 Ñ! hÓ&;à&Ø!ØCÀJÀ<ÈxÐXñð ð
 #°Ñ5Ð5r   )Útypingr   r   Úgradio_client.documentationr   ÚnumpyÚnpÚtupleÚintÚfloatÚdictÚstrr   r   © r   r   Ú<module>r(      s¨   ðß %å 0æÛñ 
ƒð6Ø��lÐ"Ñ#ð6Ø16¸±ð6ØKPÐSWÉ<ð6à	ˆ#ˆsˆ(�^ó6ó ð6ñ> 
ƒð6Øð6Ø! D™Lð6Ø6;¸d±lð6à	ˆ#ˆsˆ(�^ó6ó ñ6r   