sp

Signal processing (sp)

sp_utils

decitala.sp.sp_utils.resample_(samples, source_rate, target_rate)[source]

Function for resampling an array (with fs source_rate) to target_rate.

Parameters
  • samples – an array of samples.

  • source_rate (int) – the sample rate of the source samples.

  • target_rate (int) – the desired sample rate of the resampled array.

decitala.sp.sp_utils.plot_audio_file(filepath, title=None, save_path=None)[source]

Function for plotting an audio file.

Parameters
  • filepath (str) – a path to an audio file.

  • title (str) – optional title for the plot. Default is None.

  • save_path (str) – optional path to save the plot. Default is None.

decitala.sp.sp_utils.plot_spectrogram(filepath, max_freq=8000, title=None, save_path=None)[source]

Function for plotting the spectrogram of an audio file.