
    Z j                         S SK JrJr  S SKJrJrJr  S SKJrJ	r	  S SK
JrJr  \R                  " \5      r " S S\SS9r\ " S	 S
\5      5       rS
/rg)   )
AudioInputmake_list_of_audio)ProcessingKwargsProcessorMixinUnpack)PreTokenizedInput	TextInput)auto_docstringloggingc                   4    \ rS rSrSSSS.SSSS.S	S
0S.rSrg)LasrProcessorKwargs   i>  longestT)sampling_ratepaddingreturn_attention_maskrightF)r   padding_sideadd_special_tokensreturn_tensorspt)audio_kwargstext_kwargscommon_kwargs N)__name__
__module____qualname____firstlineno__	_defaults__static_attributes__r       y/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/transformers/models/lasr/processing_lasr.pyr   r      s3     # %)
 #"'

 +D1Ir"   r   F)totalc                      ^  \ rS rSrU 4S jr\  SS\S\\-  \	\   -  \	\   -  S-  S\
S-  S\\   4S jj5       r\S	 5       rS
rU =r$ )LasrProcessor.   c                 $   > [         TU ]  X5        g )N)super__init__)selffeature_extractor	tokenizer	__class__s      r#   r*   LasrProcessor.__init__0   s    *6r"   Naudiotextr   kwargsc                    [        U5      nU R                  " [        4SU R                  R                  0UD6nUc   [
        R                  SUS   S    S35        O#X5S   S   :w  a  [        SU SUS   S    S35      eUb  U R                  " U40 US   D6nUb  U R                  " U40 US	   D6nUc  W$ WS
   WS'   U$ )a  
sampling_rate (`int`, *optional*):
    The sampling rate of the input audio in Hz. This should match the sampling rate expected by the feature
    extractor (defaults to 16000 Hz). If provided, it will be validated against the processor's expected
    sampling rate, and an error will be raised if they don't match. If not provided, a warning will be
    issued and the default sampling rate will be assumed.
tokenizer_init_kwargszUYou've provided audio without specifying the sampling rate. It will be assumed to be r   r   z$, which can result in silent errors.z The sampling rate of the audio (z5) does not match the sampling rate of the processor (zD). Please provide resampled the audio to the expected sampling rate.r   	input_idslabels)	r   _merge_kwargsr   r-   init_kwargsloggerwarning_once
ValueErrorr,   )r+   r0   r1   r   r2   output_kwargsinputs	encodingss           r#   __call__LasrProcessor.__call__3   sG    #5)**
"&.."<"<
 
  ghu  wE  iF  GV  iW  hX  X|  } N;OLL2=/Av  xE  FT  xU  Ve  xf  wg  gk  l  ++ES]>5RSFtL}]/KLI<M(5F8Mr"   c                 :    U R                   R                  nUS/-   $ )Nr6   )r,   model_input_names)r+   feature_extractor_input_namess     r#   rB   LasrProcessor.model_input_names^   s!    (,(>(>(P(P%,z99r"   r   )NN)r   r   r   r   r*   r
   r   r	   r   listintr   r   r?   propertyrB   r!   __classcell__)r.   s   @r#   r&   r&   .   s    7  bf$(	(( ++d9o=EV@WWZ^^( Tz	(
 ,-( (T : :r"   r&   N)audio_utilsr   r   processing_utilsr   r   r   tokenization_utils_baser   r	   utilsr
   r   
get_loggerr   r9   r   r&   __all__r   r"   r#   <module>rO      s]   * : H H C , 
		H	%*%   2:N 2: 2:j 
r"   