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

Getting different background colour of spectrograph from audio reading

import numpy as np import pandas as pd import matplotlib.pyplot as plt import librosa as lr import glob path = r'/content/drive/MyDrive/ESC-50/305 - Coughing/*.ogg' a = glob.glob(path) print(len(a)) for file in range(0,len(a),1): #scale,…
-1
votes
1 answer

reading .opus audio files in python

I'm trying to use librosa to read an .opus file but it runs forever and doesn't load anything (I've waited for around 30 minutes for a 51MB file and still nothing). Here is the code I am using path_to_opus = '/my/path/to/file.opus' y, sr =…
Ani
  • 53
  • 1
  • 8
-1
votes
1 answer

How to deal with different audio formats for audio classification?

I am working on an audio classification problem statement to classify between two audio classes. I have collected samples from jotform, they are providing audio widget to collect .wav audio but it turned out that widget is storing data in .mp3…
Aaditya Ura
  • 12,007
  • 7
  • 50
  • 88
-1
votes
1 answer

Is there a way to automatically generate an empty array for each iteration of a for loop?

I am trying to create a separate array for each pass of the for loop in order to store the values of 'signal' which are generated by the wavefile.read function. Some background as to how the code works / how Id like it to work: I have the following…
DIB98
  • 53
  • 1
  • 6
-1
votes
1 answer

Can a melspectrogram feature set be filtered for onset detection?

I have a features here which is a 128 mel bin melspectrogram. I want to write a beat tracker and for this I need to use onset detection. Can a melspectrogram be filtered for beats or should I use something like this (a beat_melspectrogram). I've…
plgent
  • 109
  • 2
  • 5
-1
votes
1 answer

NameError: name 'train' is not defined

I'm attempting to complete an experiment whereby a neural network music analysis program is created using Keras, and the number of layers in the neural network is modified to find the effect on performance. This is my source for the program. I have…
Suren Grig
  • 75
  • 1
  • 1
  • 11
-1
votes
1 answer

librosa plots in a matplotlib gridspec

I'm trying to use librosa with matplotlib, and using a gridspec and all of the code examples of librosa look like they were intended for use with jupyter notebooks and I'm writing in pyqt. Below is something that looks sort of like my code: from…
dpan
  • 1
  • 2
-1
votes
1 answer

Minimal distance in Dynamic Time Warping with Librosa

When using the Librosa library to compute the Dynamic Time Warping matrix between two time series, how does one obtain the minimum distance between the two signals? In Matlab the first returned argument is this distance. In Librosa the returned…
AlexGuevara
  • 932
  • 11
  • 28
-1
votes
1 answer

How does `matplotlib` adjust plot to figure size?

How does matplotlib ensure that a dataset can be within plot with specified size. How do i from a plot stored as numpy, How do i read the color of the pixels illustration a datapoint (0,4) - in the plot. example: import numpy as np import…
J.Down
  • 700
  • 1
  • 9
  • 32
-2
votes
0 answers

illegal command core dumped when running a python script on remote Linux server using PUTTY

I am working on a speech to text model and have built it entirely on pycharm in python 3.11.4. Now i have to run it on a remote server (LINUX) using PUTTY but when i run it it just says: Illegal instruction core dumped. I have not tried anything yet…
-2
votes
1 answer

Unable to import librosa

I did pip install librosa in Anaconda prompt. then uninstalled it, updated numba as i received outdated numba version error message. i installed librosa again still receiving this error while importing it. requesting help to import librosa!
-2
votes
1 answer

How to convert .wav file into an image for neural network?

I am trying to perform sound classification using neural network and would like to convert the audio file of 4 seconds in .wav file format to be converted to an image. I would prefer to use Librosa library. Also I would like to know how to read this…
Deep
  • 616
  • 1
  • 9
  • 17
-2
votes
2 answers

I want to read multiple audio files with librosa and then save it into an empty list

Here id my code . when I append into the array the array remain empty . Please help me where is the mistake. Or tell me some other way also to do this A = [] # load more files with librosa pathAudio = "drive/My Drive/dataset/noise/" files =…
Faiza
  • 1
  • 5
1 2 3
49
50