
    
                         S 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	J
r
  SSK	Jr  \R                  \R                  " \R                  R                  5       " S	 S
\R                   5      5       5       rg)z9Cloud Speech-to-text recognizers run short audio command.    )absolute_import)division)unicode_literals)client)base)flag_validations)flags_v2c                   4    \ rS rSrSrS r\S 5       rS rSr	g)RunShort   zIGet transcripts of short (less than 60 seconds) audio from an audio file.c                 \    [         R                  " U5        [         R                  " U5        g)zValidates run short flags.N)r   ValidateDecodingConfigValidateAudioSource)selfargss     .lib/surface/ml/speech/recognizers/run_short.pyValidateRunShortFlagsRunShort.ValidateRunShortFlags   s    ++D1((.    c                 0    [         R                  " U 5        g)z Register flags for this command.N)r	    AddRecognizeRequestFlagsToParser)parsers    r   ArgsRunShort.Args$   s     --f5r   c                    UR                   R                  R                  5       n[        R                  " 5       nU R                  U5        / nUR                  UR                  UR                  U5      u  pTUR                  UUSUS9u  pTUR                  XS9u  Ul        nUR                  (       d  UR                  (       a  UR                  XS9u  Ul        nUR!                  UUR"                  UU5      $ )NT)default_to_auto_decoding_configupdate_mask)r   )CONCEPTS
recognizerParser   SpeechV2Clientr   InitializeRecognitionConfigmodellanguage_codes InitializeDecodingConfigFromArgsInitializeASRFeaturesFromArgsfeatureshint_phraseshint_phrase_sets"InitializeAdaptationConfigFromArgs
adaptationr   audio)r   r   resourcespeech_clientrecognition_config_update_maskrecognition_configs         r   RunRunShort.Run)   s   }}''--/H))+Mt$%'" 	11JJ++-K	
 7 	66,06	 	7 	
 7 	33 	4 	
 @!? D11

:
: ;  D#%C !!

&	 r    N)
__name__
__module____qualname____firstlineno____doc__r   staticmethodr   r1   __static_attributes__r3   r   r   r   r      s&     R/
 6 6)r   r   N)r8   
__future__r   r   r    googlecloudsdk.api_lib.ml.speechr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.ml.speechr   r	   UniverseCompatibleReleaseTracksReleaseTrackALPHACommandr   r3   r   r   <module>rD      sd    @ &  ' 3 ( A 9 D%%++,6t|| 6 - 6r   