Utilities

Metric functions

predictions_temporal_integration(Y_predicted) Integrate temporal dimension.
evaluate_metrics(model, data, metrics, **kwargs) Calculate metrics over files with different length
sed(Y_val, Y_predicted[, sequence_time_sec, …]) Calculate metrics for Sound Event Detection
classification(Y_val, Y_predicted[, label_list]) Calculate metrics for Audio Classification
tagging(Y_val, Y_predicted[, label_list]) Calculate metrics for Audio Tagging
accuracy
ER
F1

Data functions

get_fold_val(fold_test, fold_list) Get the validation fold given the test fold.
evaluation_setup(fold_test, folds, …[, …]) Return a evaluation setup given by the evaluation_mode.

Events functions

contiguous_regions(act)
evaluation_setup(fold_test, folds, …[, …]) Return a evaluation setup given by the evaluation_mode.
event_roll_to_event_list(event_roll, …) Convert a event roll matrix to a event list.
tag_probabilities_to_tag_list(…[, threshold]) Convert a tag probabilites matrix to a tag list.

Files functions

save_json(path, json_string) Save a json file in the location given by path.
load_json(path) Load a json file from path.
save_pickle(X, path) Save a pickle object in the location given by path.
load_pickle(path) Load a pickle object from path.
list_all_files(path) List all files in the path including subfolders.
list_wav_files(path) List all wav files in the path including subfolders.
load_training_log(weights_folder) Load the training log files of keras.
mkdir_if_not_exists(path[, parents]) Make dir if does not exists.
download_files_and_unzip(dataset_folder, …) Download files from zenodo and decompress them.
move_all_files_to(source, destination) Move all files from source to destination
move_all_files_to_parent(parent, child) Move all files in parent/child to the parent/
duplicate_folder_structure(origin_path, …) Duplicate the folder structure from the origin to the destination.
example_audio_file([index]) Get path to an example audio file

Callback functions

ClassificationCallback(data[, file_weights, …]) Keras callback to calculate acc after each epoch and save file with the weights if the evaluation improves
SEDCallback(data[, file_weights, best_F1, …]) Keras callback to calculate F1 and ER after each epoch and save file with the weights if the evaluation improves.
TaggingCallback(data[, file_weights, …]) Keras callback to calculate acc after each epoch and save file with the weights if the evaluation improves
F1ERCallback

GUI functions

encode_audio(data, sr) Encode an audio signal for web applications.

UI functions

progressbar(it[, prefix, size, file]) Iterable progress bar.

Miscellaneous functions

get_class_by_name(classes_dict, class_name, …) Get a class given its name.