ó
    €Ï  ã                   óZ   • S r SSKrSSKJr  SSKJr  Sr\" \5      S1-  rS r	S
S jr
S	 rg)z/Validation functions for speech commands flags.é    N)Ústorage_util)Ú
exceptions)ÚLINEAR16ÚMULAWÚALAWÚAUTOc                 óž   • U R                   b@  U R                  b2  U R                   U R                  :”  a  [        R                  " SS5      eggg)z)Validates speaker diarization flag input.Nz--max-speaker-countzH[--max-speaker-count] must be equal to or larger than min-speaker-count.)Úmin_speaker_countÚmax_speaker_countr   ÚInvalidArgumentException©Úargss    Ú<lib/googlecloudsdk/command_lib/ml/speech/flag_validations.pyÚValidateSpeakerDiarizationr      sX   € ð ×ÑÑ(¨T×-CÑ-CÑ-OØ	×	Ñ	 $×"8Ñ"8Ó	8Ü
×
-Ò
-Øð	óð ð 
9ð .PÐ(ó    c                 óŒ  • [         R                  R                  U R                  5      (       a  gU(       a0  [        R
                  " SSR                  U R                  5      5      e[        R                  R                  U R                  5      (       d0  [        R
                  " SSR                  U R                  5      5      eg)z"Validates audio source flag input.Nz--audiozfInvalid audio source [{}]. The source must be a Google Cloud Storage URL (such as gs://bucket/object).z}Invalid audio source [{}]. The source must either be a local path or a Google Cloud Storage URL (such as gs://bucket/object).)
r   ÚObjectReferenceÚIsStorageUrlÚaudior   r   ÚformatÚosÚpathÚisfile)r   Úbatchs     r   ÚValidateAudioSourcer   &   s“   € ä×!Ñ!×.Ñ.¨t¯z©z×:Ñ:Ø
æ
Ü
×
-Ò
-Øð	5ß5;±V¸D¿J¹JÓ5Góð ô 
‰‰˜Ÿ
™
×	#Ñ	#Ü
×
-Ò
-Øð	(ç(.©¨t¯z©zÓ(:ó	ð ð 
$r   c           	      ór  • U R                   c  gU R                   [        ;  a6  [        R                  " SSSR	                  [        [        5      5      -   5      eU R                   S:X  aF  U R                  c  U R                  b+  [        R                  " U R                  b  SS5      eSS5      egU R                  c9  [        R                  " SS	SR	                  [        [        5      5      -   S
-   5      eU R                  c6  [        R                  " SSSR	                  [        [        5      5      -   5      eg)zValidates encoding flag input.Nz
--encodingz#[--encoding] must be set to one of z, r   z--sample-ratez--audio-channel-countzJAUTO encoding does not support setting sample rate or audio channel count.zM[--sample-rate] must be specified when configuring explicit encoding options Ú.zU[--audio-channel-count] must be specified when configuring explicit encoding options )	ÚencodingÚENCODING_OPTIONSr   r   ÚjoinÚsortedÚsample_rateÚaudio_channel_countÚEXPLICIT_ENCODING_OPTIONSr   s    r   ÚValidateDecodingConfigr%   ;   sC  € à	‡]]ÑØ
Ø	‡]]Ô*Ó*Ü
×
-Ò
-ØØ-Ø
)‰)”FÔ+Ó,Ó
-ñ	.óð ð
 
‡]]fÓØ×ÑÑ# t×'?Ñ'?Ñ'KÜ×/Ò/à×ÑÑ)ð ðó	ð ð 'ðó	ð ð (Lð ×ÑÑÜ×/Ò/Ø
ðàI‰I”fÔ6Ó7Ó8ñ9ð ñóð ð ×ÑÑ'Ü×/Ò/Ø
!ð,à—	‘	œ&Ô!:Ó;Ó<ñ=óð ð (r   )F)Ú__doc__r   Úgooglecloudsdk.api_lib.storager   Úgooglecloudsdk.callioper   r$   Ú	frozensetr   r   r   r%   © r   r   Ú<module>r+      s=   ðñ 6ã 	Ý 7Ý .ð :Ð ÙÐ6Ó7¸6¸(ÑBÐ ò	ôó*$r   