
    h
                     0    d Z ddlmZ  G d de      ZdgZy)z
Processor class for CLVP
   )ProcessorMixinc                   8     e Zd ZdZdZdZg dZ fdZd Z x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ClvpTokenizer)	input_idsinput_featuresattention_maskc                 &    t         |   ||       y )N)super__init__)selffeature_extractor	tokenizer	__class__s      f/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/transformers/models/clvp/processing_clvp.pyr   zClvpProcessor.__init__-   s    *I6    c                    |j                  dd      }|j                  dd      }|j                  dd      }||t        d      | | j                  |fd|i|}| | j                  |fi |}|S |S d   d<   |d   |d<   |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_speechNsampling_ratetextzFYou need to specify either an `raw_speech` or `text` input to process.r   r
   )pop
ValueErrorr   r   )r   argskwargsr   r   r   inputs	encodingss           r   __call__zClvpProcessor.__call__0   s     ZZd3


?D9zz&$'$,eff!+T++J^m^W]^F&t6v6I<M"+K"8F;'01A'BF#$Mr   )
__name__
__module____qualname____doc__feature_extractor_classtokenizer_classmodel_input_namesr   r   __classcell__)r   s   @r   r   r      s'     5%O7r   r   N)r"   processing_utilsr   r   __all__ r   r   <module>r*      s&     /3N 3l 
r   