Questions tagged [librosa]

librosa is a python package for music and audio analysis.

Following are some of the features of librosa

  • Load audio input
  • Compute mel-spectrogram, MFCC, delta features, chroma
  • Invert mel-spectrogram, MFCC or chroma back to waveform
  • Locate beat events
  • Compute beat-synchronous features
  • Display features
  • Save beat tracker output to a CSV file

For detailed information and examples, visit the librosa documentation.

See also the official Github page.

750 questions
4
votes
2 answers

Unable to use Multithread for librosa melspectrogram

I have over 1000 audio files (it's just a initial development, in the future, there will be even more audio files), and would like to convert them to melspectrogram. Since my workstation has a Intel® Xeon® Processor E5-2698 v3, which has 32…
Raven Cheuk
  • 2,903
  • 4
  • 27
  • 54
4
votes
1 answer

How to use a context window to segment a whole log Mel-spectrogram (ensuring the same number of segments for all the audios)?

I have several audios with different duration. So I don't know how to ensure the same number N of segments of the audio. I'm trying to implement an existing paper, so it's said that first a Log Mel-Spectrogram is performed in the whole audio with 64…
4
votes
1 answer

ParameterError: Audio buffer is not finite everywhere

While using the following code on one of the sound files of Urban Sound Dataset, s, r = librosa.load(train_filename[7543]) tonnetz = librosa.feature.tonnetz(y = librosa.effects.harmonic(s), sr = r) I get the following warnings and…
4
votes
1 answer

How to combine mfcc vector with labels from annotation to pass to a neural network

Using librosa, I created mfcc for my audio file as follows: import librosa y, sr = librosa.load('myfile.wav') print y print sr mfcc=librosa.feature.mfcc(y=y, sr=sr) I also have a text file that contains manual annotations[start, stop, tag]…
DJ_Stuffy_K
  • 615
  • 2
  • 11
  • 29
4
votes
2 answers

Signal Processing: Can someone explain for me the different type of spectrogram?

I'm newbie with signal processing and I search on Google many terminology of spectrogram but I can't find any thing talk about the difference of type of spectrogram. Can anyone help me to explain the definition and meaning of diffenrent spectrogram…
Toan Nhu
  • 43
  • 2
  • 6
4
votes
0 answers

Installing librosa on a Raspberry Pi 3

I've tried installing librosa on my Raspberry Pi 3 Model B. I have referred to other links regarding this issue as well including this and this but the errors still kept coming. As of now, I'm stuck with: libllvmlite.so: cannot open shared object…
4
votes
5 answers

is it possible to get exactly the same results from tensorflow mfcc and librosa mfcc?

I'm trying to make tensorflow mfcc give me the same results as python lybrosa mfcc i have tried to match all the default parameters that are used by librosa in my tensorflow code and got a different result this is the tensorflow code that i have…
Eli Leszczynski
  • 145
  • 1
  • 7
4
votes
1 answer

Using Librosa to plot a mel-spectrogram

I am having trouble creating a mel-spectrogram in librosa using a custom file path to my sound. I am following this documentation: https://librosa.github.io/librosa/generated/librosa.feature.melspectrogram.html And I have looked at this stack…
Sreehari R
  • 919
  • 4
  • 11
  • 21
4
votes
1 answer

Why is the plot in librosa different?

I am currently trying using librosa to perform stfft, such that the parameter resembles a stfft process from a different framework (Kaldi). The audio file is fash-b-an251 Kaldi does it using a sample frequency of 16 KHz, window_size = 400 (25ms),…
I am not Fat
  • 283
  • 11
  • 36
4
votes
1 answer

How does mfcc feature size affect recurent neural network

So I'm learning machine learning and wanted to know how does mfcc feature size affect on RNN (Recurent Neural Network)? With librosa I extracted mfcc and then delta coefficients and after that I get array of dimension [13, sound_length] The code of…
3
votes
1 answer

Understanding MFCC output for a simple sine wave

I generate a simple sine wave with a frequency of 200 and calculate an FFT to check that the obtained frequency is correct. Then I calculate MFCC but do not understand what its output means? What is the explanation of the output, and where do I see…
codeDom
  • 1,623
  • 18
  • 54
3
votes
1 answer

librosa error -> AttributeError: module 'librosa.display' has no attribute 'waveplot'

ss of the error: I tried to use this code : !pip install --upgrade librosa But it still gives me the same error. How can I fix this, anybody can help me?
ebru_kilic
  • 31
  • 4
3
votes
2 answers

TypeError in librosa, MFCC

I have the code below, which takes an data set(GTZAN) and turns it into an MFCC in dictionary: DATASET_PATH = '/content/drive/MyDrive/ColabNotebooksNew/PROJECT/ProjectMusic/Data/genres_original' JSON_PATH = "data_10.json" SAMPLE_RATE = 22050 #each…
Liav
  • 31
  • 3
3
votes
1 answer

Error when trying to display colorbar using matplotlib library Python 3.9

I'm currently learning to use the librosa library and when trying to display a colorbar on an associated spectrogram, I get an inexplicable error. I'm not that familiar with matplotlib I've searched everywhere for a solution and I can't help but…
paul7aa
  • 61
  • 7
3
votes
1 answer

How to get complete fundamental (f0) frequency extraction with python lib librosa.pyin?

I am running librosa.pyin on a speech audio clip, and it doesn't seem to be extracting all the fundamentals (f0) from the first part of the recording. librosa documentation: https://librosa.org/doc/main/generated/librosa.pyin.html sr:…
jmhead
  • 887
  • 1
  • 12
  • 25