1

I'm trying to extract frequencies upper certain dB from the code below. I think the following code calculates the frequency and display the spectrogram with C_db, how can I get the frequencies list upper certain dB?

import librosa.display, librosa
import numpy as np
import matplotlib.pyplot as plt

y, sr = librosa.load('voice_samples/note_sample.wav')

C = librosa.cqt(y=y, sr=sr)
C_db = librosa.amplitude_to_db(np.abs(C), ref=np.max)

fig, ax = plt.subplots()
librosa.display.specshow(C_db, y_axis='cqt_hz', x_axis='time', ax=ax)
ax.set(title='Frequency (Hz) axis decoration')

Jon Nordby
  • 5,494
  • 1
  • 21
  • 50
babbluesy
  • 11
  • 3

0 Answers0