pyampact.alignment.alignment_visualiser
- pyampact.alignment.alignment_visualiser(audio_spec, times=None, freqs=None, fig=1, showSpec=True)[source]
Visualizes the dynamic time warping (DTW) alignment.
- Parameters:
audio_spec (ndarray) – Spectrogram of the audio file to be visualized.
times (ndarray, optional) – Array of segment times corresponding to the audio spectrogram. If not provided, defaults to None.
freqs (ndarray, optional) – Array of sample frequencies corresponding to the audio spectrogram. If not provided, defaults to None.
fig (int, optional) – Figure number for the plot. Default is 1.
showSpec (bool, optional) – If True, displays the spectrogram overlayed with the alignment information. Default is True.
- Returns:
The visualized spectrogram plot with DTW alignment overlays.
- Return type:
matplotlib.figure.Figure