ertk.preprocessing.audioset.VGGishExtractor
- class ertk.preprocessing.audioset.VGGishExtractor(config: VGGishExtractorConfig)
Bases:
FeatureExtractor,AudioClipProcessorA VGGish extractor.
- __init__(config: VGGishExtractorConfig) None
Methods
__init__(config)finish()Perform any cleanup necesasry (e.g.
process_batch(batch, **kwargs)Process a batch of instances.
process_instance(x, **kwargs)Process a single audio clip.
Inherited Methods
friendly_name()Get the friendly name for this processor.
get_config_type()Get the configuration type for this processor.
get_default_config()Get the default configuration for this processor.
get_processor_class(name)Get the class for the named processor.
make_processor(name, config)Create an instance of the named processor.
process_all(xs, batch_size, **kwargs)Process all instances in batches.
process_file(path[, sr])Process individual audio file.
process_files(paths, batch_size[, sr])Process a set of files.
valid_processors()Get a list of all registered processor names.
Attributes
The dimensionality of the extracted features.
The names of the features produced by this processor.
Whether this FeatureExtractor yields sequence features.
The configuration for this processor.
- config: VGGishExtractorConfig
The configuration for this processor.
- process_batch(batch: Iterable[ndarray] | ndarray, **kwargs) List[ndarray]
Process a batch of instances. By default this simply calls
process_instance()on each instance in the batch.- Parameters:
- batch: np.ndarray or iterable of arrays
The batch of instances to process.
- Returns:
- processed: list of np.ndarray
A list of processed instances.