dcase_util.processors.OpenL3ExtractorProcessor
- class dcase_util.processors.OpenL3ExtractorProcessor(fs=44100, hop_length_samples=None, hop_length_seconds=0.02, model=None, input_repr='mel256', content_type='music', embedding_size=6144, center=True, batch_size=32, verbose=False, **kwargs)[source]
Constructor
- Parameters
- fsint
Sampling rate of the incoming signal.
- hop_length_samplesint
Hop length in samples. Default value None
- hop_length_secondsfloat
Hop length in seconds. Default value 0.02
- modelkeras.models.Model or None
Loaded model object. If a model is provided, then input_repr, content_type, and embedding_size will be ignored. If None is provided, the model will be loaded using the provided values of input_repr, content_type and embedding_size. Default value None
- input_repr“linear”, “mel128”, or “mel256”
Spectrogram representation used for model. Ignored if model is a valid Keras model. Default value “mel256”
- content_type“music” or “env”
Type of content used to train the embedding model. Ignored if model is a valid Keras model. Default value “music”
- embedding_size6144 or 512
Embedding dimensionality. Ignored if model is a valid Keras model. Default value 6144
- centerbool
If True, pads beginning of signal so timestamps correspond to center of window. Default value True
- batch_sizeint
Batch size used for input to embedding model Default value 32
- verbosebool
If True, prints verbose messages. Default value False
- __init__(fs=44100, hop_length_samples=None, hop_length_seconds=0.02, model=None, input_repr='mel256', content_type='music', embedding_size=6144, center=True, batch_size=32, verbose=False, **kwargs)[source]
Constructor
- Parameters
- fsint
Sampling rate of the incoming signal.
- hop_length_samplesint
Hop length in samples. Default value None
- hop_length_secondsfloat
Hop length in seconds. Default value 0.02
- modelkeras.models.Model or None
Loaded model object. If a model is provided, then input_repr, content_type, and embedding_size will be ignored. If None is provided, the model will be loaded using the provided values of input_repr, content_type and embedding_size. Default value None
- input_repr“linear”, “mel128”, or “mel256”
Spectrogram representation used for model. Ignored if model is a valid Keras model. Default value “mel256”
- content_type“music” or “env”
Type of content used to train the embedding model. Ignored if model is a valid Keras model. Default value “music”
- embedding_size6144 or 512
Embedding dimensionality. Ignored if model is a valid Keras model. Default value 6144
- centerbool
If True, pads beginning of signal so timestamps correspond to center of window. Default value True
- batch_sizeint
Batch size used for input to embedding model Default value 32
- verbosebool
If True, prints verbose messages. Default value False
Methods
__init__([fs, hop_length_samples, ...])Constructor
delimiter([exclude_delimiters])Use csv.sniffer to guess delimiter for CSV file
detect_file_format([filename])Detect file format from extension
empty()Check if file is empty
exists()Checks that file exists
extract(y)Extract features for the audio signal.
get_file_information()Get file information, filename
get_processing_chain_item()Get processing chain item with current Processor data.
is_package([filename])Determine if the file is compressed package.
load([filename])Load file
log([level])Log container content
process([data, store_processing_chain])Extract features
save([filename])Save file
show([mode, indent, visualize])Print container content
to_html([indent])Get container information in a HTML formatted string
to_string([ui, indent])Get container information in a string
validate_format()Validate file format
Attributes
bytesFile size in bytes
descriptionExtractor description
input_typeInput data type
labelExtractor label
loggerLogger instance
md5Checksum for file.
output_typeOutput data type
valid_formatsValid file formats