Ë
    S^(h2  ã                   ó0   — d Z ddlmZ  G d„ de«      ZdgZy)z
Processor class for CLVP
é   )ÚProcessorMixinc                   óD   ‡ — e Zd ZdZdZdZg d¢Zˆ fd„Zd„ Z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/skyplay_api_hub/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Ã   € ð —Z‘Z ¨dÓ3ˆ
ØŸ
™
 ?°DÓ9ˆØ�z‰z˜& $Ó'ˆàÐ $ ,ÜÐeÓfÐfàÐ!Ø+�T×+Ñ+¨JÑ^ÀmÐ^ÐW]Ñ^ˆFØÐØ&˜Ÿ™ tÑ6¨vÑ6ˆIàˆ<ØˆMØÐØÐà"+¨KÑ"8ˆF�;ÑØ'0Ð1AÑ'BˆFÐ#Ñ$ØˆMr   c                 ó:   —  | j                   j                  |i |¤ŽS )z½
        This method forwards all its arguments to ClvpTokenizer's [`~PreTrainedTokenizer.batch_decode`]. Please
        refer to the docstring of this method for more information.
        )r   Úbatch_decode©r   r   r   s      r   r    zClvpProcessor.batch_decodeM   s    € ð
 +ˆt�~‰~×*Ñ*¨DÐ;°FÑ;Ð;r   c                 ó:   —  | j                   j                  |i |¤ŽS )z·
        This method forwards all its arguments to ClvpTokenizer's [`~PreTrainedTokenizer.decode`]. Please refer to
        the docstring of this method for more information.
        )r   Údecoder!   s      r   r#   zClvpProcessor.decodeU   s    € ð
 %ˆt�~‰~×$Ñ$ dÐ5¨fÑ5Ð5r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úfeature_extractor_classÚtokenizer_classÚmodel_input_namesr   r   r    r#   Ú__classcell__)r   s   @r   r   r      s1   ø„ ñð 5ÐØ%€OòÐô7òò:<ö6r   r   N)r'   Úprocessing_utilsr   r   Ú__all__© r   r   ú<module>r/      s(   ðñ õ /ôC6�Nô C6ðL Ð
�r   