espnet.asr.asr_utils.plot_spectrogram
Less than 1 minute
espnet.asr.asr_utils.plot_spectrogram
espnet.asr.asr_utils.plot_spectrogram(plt, spec, mode='db', fs=None, frame_shift=None, bottom=True, left=True, right=True, top=False, labelbottom=True, labelleft=True, labelright=True, labeltop=False, cmap='inferno')
Plot spectrogram using matplotlib.
- Parameters:
- plt (matplotlib.pyplot) – pyplot object.
 - spec (numpy.ndarray) – Input stft (Freq, Time)
 - mode (str) – db or linear.
 - fs (int) – Sample frequency. To convert y-axis to kHz unit.
 - frame_shift (int) – The frame shift of stft. To convert x-axis to second unit.
 - bottom (bool) – Whether to draw the respective ticks.
 - left (bool)
 - right (bool)
 - top (bool)
 - labelbottom (bool) – Whether to draw the respective tick labels.
 - labelleft (bool)
 - labelright (bool)
 - labeltop (bool)
 - cmap (str) – Colormap defined in matplotlib.
 
 
