espnet2.train.preprocessor.AbsPreprocessor
Less than 1 minute
espnet2.train.preprocessor.AbsPreprocessor
class espnet2.train.preprocessor.AbsPreprocessor(train: bool)
Bases: ABC
Abstract base class for audio data preprocessing.
This class serves as a blueprint for implementing various types of preprocessing tasks for audio data, such as speech enhancement, speech recognition, and others. It provides the structure for initializing preprocessors and defining the processing method.
train
A flag indicating whether the preprocessor is being used in training mode.
Type: bool
Parameters:train (bool) – Indicates if the preprocessor is used for training.
__call__(uid
str, data: Dict[str, Union[str, np.ndarray]]) -> Dict[str, np.ndarray]: Abstract method that processes the input data and returns the preprocessed data.