mel_spec 0.2.6

Mel spectrograms aligned to the results from the whisper.cpp, pytorch and librosa reference implementations and suited to streaming audio.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
import numpy as np
import matplotlib.pyplot as plt

# Load the Mel spectrogram data
spectrogram = np.load("jfk.npy")
# Plot the spectrogram
plt.figure(figsize=(10, 4))
plt.imshow(spectrogram, aspect="auto", origin="lower", cmap="viridis")
plt.title("Mel Spectrogram")
plt.ylabel("Mel Filter Banks")
plt.xlabel("Frame (Time)")
plt.colorbar(label="Magnitude")
plt.show()