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
1
vote
1 answer

How to properly use pitch_shift (librosa)?

I try to use the librosa and pitch_shift from librosa. I recorded some my voice and used this code: sampling_rate= 44100 y, sr = librosa.load(directory, sr=sampling_rate) # y is a numpy array of the wav file, sr = sample rate y_shifted =…
tomm
  • 271
  • 2
  • 14
1
vote
1 answer

Feature extraction of wav file

We are trying to extract features from .wav file and always get the same error. We have tried with python 3.6.6 and 3.7.4 version but the error is the same. import csv import glob import os import librosa import numpy as np if __name__ ==…
Daffyo
  • 13
  • 3
1
vote
1 answer

Matplotlib ploting reduce the latency

I need to plot a spectrogram fast as possible. The spectrogram is calculated with librosa and then ploted with matplotlib. This needs now around 50ms, is it possible to do this faster? I'm very new to matplotlib and librosa. This is my…
Aron
  • 1,179
  • 15
  • 29
1
vote
2 answers

How to Correlate Two Audio Events (Detect if they are Similar) in Python

For my project I have to detect if two audio files are similar and when the first audio file is contained in the second. My problem is that I tried to use librosa the numpy.correlate. I don't know if I'm doing it in the right way. How can I detect…
Jerry Palmiotto
  • 97
  • 1
  • 1
  • 8
1
vote
1 answer

Different FFT signal lengths for same length audio clips

Currently I am working on a project that requires me to pick out audio clips and compare them based off their FFT results (i.e. spectrogram). All of my audio clips are 0.200s long, but when I process them through the transform, they are no longer…
Andrew
  • 460
  • 4
  • 12
1
vote
1 answer

How to load and resample (MP3) audio files faster in Python/Linux?

Currently, I am trying to load 280,000 MP3 audio files in Python where the average duration of files is ~5 seconds. I am using Librosa for this purpose as well as for the further processing (e.g. computing spectrogram) in later stages. However, I…
today
  • 32,602
  • 8
  • 95
  • 115
1
vote
1 answer

librosa ParameterError: Audio buffer is not finite everywhere (cutting wav files)

I'm training a Python audio source separation model package called DeWave (https://github.com/chaodengusc/DeWave). It's trained on single-channel .wav files. After training the model, I did inference on a .wav sample (to separate the two speaker…
Rachel
  • 13
  • 1
  • 5
1
vote
2 answers

No Backend Error appearing when using Librosa for audio analysis

I am getting the following error while executing the mentioned code. This is the first time I am using StackOverflow so pardon my mistakes. --------------------------------------------------------------------------- NoBackendError …
1
vote
1 answer

Confusion regarding kind of data returned by librosa.load and scipy.io.wavfile.read

I am new to audioprocessing, and need some help for my project. Could someone explain me the difference between the kind of data that is returned by librosa.load, and scipy.io.wavefile.read? The former gives an array of floats while the latter gives…
Satashree Roy
  • 365
  • 2
  • 9
1
vote
1 answer

Feature extraction for keyword spotting on long form audio using a CNN

I've built a simple CNN word detector that is accurately able to predict a given word when using a 1-second .wav as input. As seems to be the standard, I'm using the MFCC of the audio files as input for the CNN. However, my goal is to be able to…
Sean
  • 515
  • 7
  • 17
1
vote
1 answer

Exception has occurred: ImportError cannot import name '_typeconv' while using librosa

this is a python script to find the pitch of the give .wav file using librosa, as i run the program the import error mentioned in the title occurs. can anybody help me? import librosa import numpy as np filename = "m1.wav" y, sr =…
AruN
  • 171
  • 4
  • 15
1
vote
1 answer

Python audio analysis: find real time values of the strongest beat in each meter

I have a song and I'd like to use Python to analyze it. I need to find the "major sounds" in the song. I use this term because I don't know the technical term for it, but here is what I mean: https://www.youtube.com/watch?v=TYYyMu3pzL4 If you play…
whatwhatwhat
  • 1,991
  • 4
  • 31
  • 50
1
vote
0 answers

Why the train loss of RNN are odd?

I am new in machine learning and tensorflow. And I have learned some related materials. I did some projects taught in the tutorial, such as mnist, image recognition .And now I want to train on my own dataset which is a set of 15 seconds music clips.…
1
vote
1 answer

Python Librosa Keras Neural Network Error: Too Many Indices For Array

I have recently attempted to perform an experiment whereby a neural network written in the Python IDE IDLE using Keras is used to analyse the GTZAN dataset of songs. I am attempting to vary the layers in order to see if there is any impact on…
Suren Grig
  • 75
  • 1
  • 1
  • 11
1
vote
1 answer

Librosa Keras Music Analysis Neural Network Python: Input Value Error

I have recently attempted to perform an experiment whereby a neural network written in the Python IDE IDLE using Keras is used to analyse the GTZAN dataset of songs. I am attempting to vary the layers in order to see if there is any impact on…
Suren Grig
  • 75
  • 1
  • 1
  • 11