o
    ¸ÈÏi	  ã                   @   s@   d Z ddlmZ ddlmZ e e¡ZG dd„ deƒZdgZ	dS )z
Processor class for CLVP
é   )ÚProcessorMixin)Úloggingc                       s4   e Zd ZdZdZdZ‡ fdd„Z‡ fdd„Z‡  ZS )ÚClvpProcessoras  
    Constructs a CLVP processor which wraps a CLVP Feature Extractor and a CLVP Tokenizer into a single processor.

    [`ClvpProcessor`] offers all the functionalities of [`ClvpFeatureExtractor`] and [`ClvpTokenizer`]. See the
    [`~ClvpProcessor.__call__`], [`~ClvpProcessor.decode`] and [`~ClvpProcessor.batch_decode`] for more information.

    Args:
        feature_extractor (`ClvpFeatureExtractor`):
            An instance of [`ClvpFeatureExtractor`]. The feature extractor is a required input.
        tokenizer (`ClvpTokenizer`):
            An instance of [`ClvpTokenizer`]. The tokenizer is a required input.
    ÚClvpFeatureExtractorÚClvpTokenizerc                    s   t ƒ  ||¡ d S )N)ÚsuperÚ__init__)ÚselfÚfeature_extractorÚ	tokenizer©Ú	__class__© ú\/home/ubuntu/.local/lib/python3.10/site-packages/transformers/models/clvp/processing_clvp.pyr   ,   s   zClvpProcessor.__init__c                    s8   |  dd¡}|durt d¡ ||d< tƒ j|i |¤ŽS )zÿ
        Forwards the `audio` and `sampling_rate` arguments to [`~ClvpFeatureExtractor.__call__`] and the `text`
        argument to [`~ClvpTokenizer.__call__`]. Please refer to the docstring of the above two methods for more
        information.
        Ú
raw_speechNzbUsing `raw_speech` keyword argument is deprecated when calling ClvpProcessor, instead use `audio`.Úaudio)ÚpopÚloggerÚwarningr   Ú__call__)r	   ÚargsÚkwargsr   r   r   r   r   /   s   ÿzClvpProcessor.__call__)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úfeature_extractor_classÚtokenizer_classr   r   Ú__classcell__r   r   r   r   r      s    r   N)
r   Úprocessing_utilsr   Úutilsr   Ú
get_loggerr   r   r   Ú__all__r   r   r   r   Ú<module>   s   

#