You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To address this issue in my situation, I resolved it by modifying the code within the 'create_mels' function to the following:
import librosa
import glob
def create_mels():
print("Generating Mels")
def save_mel_librosa(filename):
# Load audio file
audio, sampling_rate = librosa.load(filename, sr=None)
# Compute mel spectrogram
melspec = librosa.feature.melspectrogram(y=audio, sr=sampling_rate, n_mels=128)
# Convert to decibels (log scale)
melspec_db = librosa.power_to_db(melspec, ref=np.max)
# Save mel spectrogram as NumPy file
output_filename = filename.replace('.wav', '')
np.save(output_filename, melspec_db)
wavs = glob.glob('wavs/*.wav')
for i in tqdm(wavs):
save_mel_librosa(i)
I can't get this working, any suggestions?
The text was updated successfully, but these errors were encountered: