
     `iX                         d Z ddlmZmZ ddlmZ ddlmZmZm	Z	 ddl
mZmZ ddlmZ ddlmZ  ej        e          Z G d	 d
e          Zd
gZdS )z%
Audio/Text processor class for CLAP
    )OptionalUnion   )
AudioInput)ProcessingKwargsProcessorMixinUnpack)PreTokenizedInput	TextInput)logging)deprecate_kwargc                        e Zd ZdZdZdZ fdZ eddd          	 	 	 dd
ee	e
eee
         ee         f                  dee         dee         dee         f fd            Z xZS )ClapProcessora  
    Constructs a CLAP processor which wraps a CLAP feature extractor and a RoBerta tokenizer into a single processor.

    [`ClapProcessor`] offers all the functionalities of [`ClapFeatureExtractor`] and [`RobertaTokenizerFast`]. See the
    [`~ClapProcessor.__call__`] and [`~ClapProcessor.decode`] for more information.

    Args:
        feature_extractor ([`ClapFeatureExtractor`]):
            The audio processor is a required input.
        tokenizer ([`RobertaTokenizerFast`]):
            The tokenizer is a required input.
    ClapFeatureExtractor)RobertaTokenizerRobertaTokenizerFastc                 L    t                                          ||           d S )N)super__init__)selffeature_extractor	tokenizer	__class__s      |/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/transformers/models/clap/processing_clap.pyr   zClapProcessor.__init__0   s$    *I66666    audioszv4.59.0audio)versionnew_nameNtextkwargsc                 |    ||t                               d           |} t                      j        d||d|S )a  
        Forwards the `audio` and `sampling_rate` arguments to [`~ClapFeatureExtractor.__call__`] and the `text`
        argument to [`~RobertaTokenizerFast.__call__`]. Please refer to the docstring of the above two methods for more
        information.
        Nz^Using `audios` keyword argument is deprecated when calling ClapProcessor, instead use `audio`.)r    r    )loggerwarningr   __call__)r   r    r   r   r!   r   s        r   r&   zClapProcessor.__call__3   sS     %-NNp   EuwwATAA&AAAr   )NNN)__name__
__module____qualname____doc__feature_extractor_classtokenizer_classr   r   r   r   r   r
   listr   r	   r   r&   __classcell__)r   s   @r   r   r      s         5BO7 7 7 7 7 _Xy7CCC im'+&*	B BuY(94	?DQbLccdeB $B 
#	B
 )*B B B B B DCB B B B Br   r   N)r*   typingr   r   audio_utilsr   processing_utilsr   r   r	   tokenization_utils_baser
   r   utilsr   utils.deprecationr   
get_loggerr'   r$   r   __all__r#   r   r   <module>r7      s     # " " " " " " " % % % % % % H H H H H H H H H H C C C C C C C C       0 0 0 0 0 0 
	H	%	%)B )B )B )B )BN )B )B )BX 
r   