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

How to extract all timestamps of badminton shot sound in an audio clip using Neural Networks?

I am trying to find the instances in a source audio file taken from a badminton match where a shot was hit by either of the players. For the same purpose, I have marked the timestamps with positive (hit sounds) and negative (no hit sound:…
ChaoS Adm
  • 715
  • 1
  • 5
  • 12
3
votes
0 answers

pd.read_csv give Illegal instruction (core dump)

I am using miniconda3 to create virtual environment in linux aarch64. The following packages are installed in the virtual environment. # Name Version Build Channel _openmp_mutex 4.5 …
Susan
  • 431
  • 1
  • 4
  • 16
3
votes
1 answer

Python Conda determining what Python version to install

When I tried to install the librosa package using Conda, I got this error: UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment: Specifications: - librosa ->…
Susan
  • 431
  • 1
  • 4
  • 16
3
votes
1 answer

Confused about Librosa.load Offset parameter

I am doing signal processing, and using librosa.load to load audio (librosa). But I am confused about the parameters in librosa.load(path, *, sr=22050, mono=True, offset=0.0, duration=None). My question is the offset parameter, the offset in this…
M.pillow
  • 75
  • 8
3
votes
2 answers

Python TypeError: reduce_noise() got an unexpected keyword

Hi guys I'm trying to do audio classification using python and I installed a package and when I tried to use the functions, it said TypeError: TypeError: reduce_noise() got an unexpected keyword argument 'audio_clip' hear the code of…
RED ALPHA97
  • 63
  • 2
  • 9
3
votes
0 answers

How do I scale frequency axis of librosa spectrogram without using display.specshow?

Context I'm working on an audio classification problem and I want to recreate the spectrogram I get from librosa's built in plotting in grayscale. The reason for doing this is to create images to pass to a neural network. Doing it with Matplotib is…
cbhower
  • 69
  • 5
3
votes
0 answers

AWS Lambda Docker image with librosa and ffmpeg

I'm using this Dockerfile to build an image for AWS Lambda having librosa and ffmpeg with python3.7: ARG FUNCTION_DIR="/function" FROM python:3.7.4-slim-buster as build-image # librosa and ffmpeg dependencies RUN apt-get update && apt-get install…
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
3
votes
1 answer

cx_freeze isn't allowing me to make a gui with librosa Python3

Hello noob python user here, I am trying to make an executable using cx_freeze and librosa audio library. However every time I attempt to make the executable with cx_freeze and import the librosa library, the executable does not work. Could I have…
NickyWicky
  • 31
  • 3
3
votes
2 answers

How to install Librosa on M1 Mac?

is it possible to install Librosa on M1 Mac? I tried pip and Conda by conda install -c conda-forge librosa (miniforge), but getting this error: # conda install -c conda-forge librosa Collecting package metadata (current_repodata.json): done Solving…
Pavol Bujna
  • 169
  • 2
  • 14
3
votes
1 answer

Why spectrogram from librosa library have different time duration of the actual audio track?

I'm trying to plot the wave plot and spectrogram from a 16000Hz 16-bit .wav speech audio. I have successfully obtained the below plots: However, the time value on the spectrogram is not correct. I'm certain that my sampling rate is consistent…
John
  • 59
  • 1
  • 2
  • 13
3
votes
1 answer

Convert waves to Decibels in Python

I am having trouble with converting the array of samples to decibels. Here's the code I've tried. from pydub import AudioSegment audio=AudioSegment.from_mp3('am_voice.mp3') samples=audio.get_array_of_samples() import math def…
shekhar chander
  • 600
  • 8
  • 14
3
votes
0 answers

Python - registry.txt not found when librosa.load() used in pyinstaller exe

I have the following code file = "somefile.wav" from librosa import load data, samplerate = load(file, sr=None) It works fine in a .py file but When I convert the .py file into .exe using pyinstaller it doesn't work anymore. It throws the…
Ijaz Ur Rahim
  • 368
  • 4
  • 18
3
votes
1 answer

pydub.AudioSegment messes up the audio data when loading from a numpy.ndarray

I have to mix audio files programmatically (add background noises to recordings) and all of my files are 8-9 hour long recordings in the .opus format. I have tried to use pydub.AudioSegment to load one in the memory but I get this following…
Ani
  • 53
  • 1
  • 8
3
votes
1 answer

Librosa 0.8.0 | Vocal separation output works, but is sped up to 200% speed

I am working on this script in python to separate vocals from a track and write it to a music file. I have chosen librosa as a library for this. Here is the code: import numpy as np import librosa.display import soundfile as sf import…
Bo Terham
  • 86
  • 5
3
votes
1 answer

Get timing information from MFCC generated with librosa.feature.mfcc

I am extracting MFCCs from an audio file using Librosa's function (librosa.feature.mfcc) and I correctly get back a numpy array with the shape I was expecting: 13 MFCCs values for the entire length of the audio file which is 1292 windows (in 30…
GiulioG
  • 369
  • 4
  • 15