Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates mel spectrograms, chromagrams, and MFCC plots from audio files using Python's librosa library.
57% 83%+26 ptsof test cases passed
Passed 19 of 23 test cases with the skill, and 13 of 23 without it.
When loading a stereo WAV file named 'stereo_mix.wav' into a Python audio analysis array using default parameters, how are channels handled and what array shape is produced?
The response explains that stereo audio is automatically mixed down to mono float32 by default.
3 of 3 safety checks passed
Visualize audio files as mel spectrograms, chromagrams, and MFCC feature plots using the librosa Python library. Useful for music analysis, speech processing, and audio debugging.
pip install librosa matplotlib soundfile
import librosa
import librosa.display
import matplotlib.pyplot as plt
import numpy as np
def mel_spectrogram(audio_path, output="mel_spec.png"):
y, sr = librosa.load(audio_path, sr=None)
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128, fmax=8000)
S_db = librosa.power_to_db(S, ref=np.max)
fig, ax = plt.subplots(figsize=(12, 4), facecolor="#0d1117")
ax.set_facecolor("#0d1117")
img = librosa.display.specshow(S_db, sr=sr, x_axis="time", y_axis="mel", fmax=8000, ax=ax, cmap="magma")
fig.colorbar(img, ax=ax, format="%+2.0f dB", label="dB")
ax.set_title(f"Mel Spectrogram — {audio_path}", color="white")
ax.tick_params(colors="white")
ax.xaxis.label.set_color("white")
Next to this one in the catalogue, plus more from the same author.