signal_processing module

Signal Processing module.

This module is intended to provide a set of functions for extracting features from raw data by means of Digital Signal Processing techniques.

signal_processing.get_mfcc(data: DataFrame, args: dict) DataFrame

This function extracts the Mel-frequency cepstral coefficients (MFCCs) from a given data frame of audio signals using the librosa library.

Warning: the returning dataframe index is the elapsed time in milliseconds. Since one MFCC frame is extracted for each acquisition, and each acquisition is sampled every 10 ms, the index is computed by simply multiplying the numerical index by 10. If the MFCC windowing is changed, the indexing should also be changed accordingly.

Parameters:
  • data (pd.DataFrame) – dataframe of audio signals, where each column represents a channel (e.g. x and y) and each row represents a sample

  • args (dict) – dictionary of librosa mfcc function parameters. For parameters setting please refer to the official documentation: https://librosa.org/doc/latest/generated/librosa.feature.mfcc.html

Returns:

dataframe of MFCCs, where each column represents a coefficient of a signal axis, and each row represents a frame

Return type:

pd.DataFrame