Visualisation tools

PyPeaks for Indian Art Music

Audio visualisation utils

compiam.visualisation.audio.plot_waveform(input_data, t1, t2, labels=None, input_sr=44100, sr=44100, output_path=None, verbose=False)[source]

Plotting waveform between two given points with optional labels

Parameters:
  • input_data – path to audio file or numpy array like audio signal

  • input_sr – sampling rate of the input array of data (if any). This variable is only relevant if the input is an array of data instead of a filepath.

  • t1 – starting point for plotting

  • t2 – ending point for plotting

  • labels – dictionary {time_stamp:label} to plot on top of waveform

  • sr – sampling rate

  • output_path – optional path (finished with .png) where the plot is saved

Training visualisation utils

compiam.visualisation.training.plot_losses(train_loss, val_loss, output_path)[source]

Plotting loss curves

Parameters:
  • train_loss – training loss curve

  • val_loss – validation loss curve (same length as training curve)

  • output_path – optional path (finished with .png) where the plot is saved