spafe.utils.vis¶
-
spafe.utils.vis.
multi_plots
(data, fs, plot_rows, step, colors=['b', 'r', 'm', 'g', 'b', 'y', 'r-.'])[source]¶ Generate multiple plots related to same signal in one figure.
Parameters: - data (array) – array of arrays to plot.
- fs (int) – the sampling frequency of the signal we are working with.
- plot_rows (int) – number of rows to plot.
- step (int) – array reading step.
- colors (list) – list of colors for the plots.
-
spafe.utils.vis.
plot
(y, ylabel, xlabel)[source]¶ plot an array y.
Parameters: - y (array) – 1d array to plot.
- ylabel (str) – y-axis label.
- xlabel (str) – x-axis label.
-
spafe.utils.vis.
spectogram
(sig, fs)[source]¶ visualize a the spectogram of the given mono signal.
Parameters: - sig (array) – a mono audio signal (Nx1) from which to compute features.
- fs (int) – the sampling frequency of the signal we are working with.
-
spafe.utils.vis.
visualize_fbanks
(fbanks, ylabel, xlabel)[source]¶ visualize a matrix including the filterbanks coordinates. Each row corresponds to a filter.
Parameters: - fbanks (array) – 2d array including the the filterbanks coordinates.
- ylabel (str) – y-axis label.
- xlabel (str) – x-axis label.
-
spafe.utils.vis.
visualize_features
(feats, ylabel, xlabel, cmap='viridis')[source]¶ visualize a matrix including the features coefficients. Each row corresponds to a frame.
Parameters: - feats (array) – 2d array including the the features coefficients.
- ylabel (str) – y-axis label.
- xlabel (str) – x-axis label.
- cmap (str) – matplotlib colormap to use.