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
0 answers

Count the number of segments in audio file with python

I have the following audio file When i plot it using the following code, i get this: audio_data, sr = librosa.load('test.wav') plt.plot(audio_data) plt.show() Wave plot of audio I am trying to get the number of segments in this audio. For this…
Sharhad
  • 11
  • 1
1
vote
1 answer

How to get Pitch class values in Hz from librosa chroma_stft

I use Librosa library to calculate chroma from audio signal. chroma = librosa.feature.chroma_stft(y=audiosignal, sr=44100, window=window, n_fft=8192, hop_length=3276) I would like to know how to find the pitch class value in Hz? because the Librosa…
1
vote
1 answer

MP3 loading using librosa return empty data when start_time metadata is 0

I have a dataset of thousands of bird chirps audios (mp3) and I try to load them using librosa.load() MP3 files are loaded but, most of the time, resulting data is an empty np.ndarray instead of a np.ndarray filled with floats Using…
Clément
  • 1,128
  • 7
  • 21
1
vote
1 answer

Is it possible to use multithread to extract audio features (librosa, opensmile and essentia)?

I'm working with the libraries librosa, opensmile and essentia to extract features from the audio, however, despite being able to, the process is extremely time consuming and making it impossible for me to continue with my project. Basically I have…
1
vote
0 answers

Erorr in Tansorflow (tf.data.Dataset.from_tensor_slices.map()) with librosa (librosa.load())

In speech translation, I attempted to map an audio preprocessing function using librosa that was used mfcc and tensorflow.data.Dataset.from_tensor_slices.map, but there was an error. Please assist... def encode_single_sample(wav_file, label): …
1
vote
0 answers

ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found

I'm using Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-194-generic x86_64) Everything worked fine and don't know what happened this error started to pop out. $ python3 train.py Traceback (most recent call last): File…
Sivan D
  • 61
  • 6
1
vote
1 answer

cannot import librosa on Raspberry Pi 4B

I need to analyse the audio spectrum to detect crying, so librosa is needed. I install all the dependencies librosa(0.9.2) need: LLVM11, llvmlite 0.39.1, numba 0.56.2, numpy 1.22.4. However, when I import librosa, the issue comes out. When I import…
Siyu Chen
  • 13
  • 3
1
vote
1 answer

Compare two audio files with persons speaking and compute the similarity score

Big picture: Trying to identify proxy frauds in video interviews. I have video clips of interviews. Each person has 2 or more interviews. As a first step I am trying to extract the audio from the interviews and trying to match them and identify if…
The6thSense
  • 8,103
  • 8
  • 31
  • 65
1
vote
0 answers

Way to calculate vibration

I am reading a paper about synthesis. One of the parts is talking about calculating vibrato, and I want to follow their way to do the same thing. However, I am new to signal processing and am not sure whether the method I found is correct or…
Megan
  • 541
  • 1
  • 3
  • 14
1
vote
1 answer

Read audio file from s3 directly in python

i want to read audio file from s3 directly in python. First, I record audio, here is my blob settings blob = new Blob(audioChunks,{type: 'audio/wav'}); then using django i uploaded this file to…
Talha Anwar
  • 2,699
  • 4
  • 23
  • 62
1
vote
0 answers

Calculate harmonic series from an audio --Python

I am wondering if there's any way to calculate harmonic series from an audio, because I want to calculate the brightness. For example, I want the sum of (100*1 + 200*2 + 400*4...) . I am thinking of something like this. Load audio from librosa…
Megan
  • 541
  • 1
  • 3
  • 14
1
vote
1 answer

Librosa Split .wav file into 15s intervals

I'm new to working with audio files. I have several 60 second long files that I want to split into 15 second files (or any length). I'm able to split files into 1 second long files (so 60 files) but can't seem to get 15 second intervals to work. How…
andrewr
  • 784
  • 13
  • 31
1
vote
0 answers

Get amplitude of every audio frame of .wav [Python]

I have a .wav file, and using python, I'd like to get a list of every audio frame where the amplitude is at the resting position. How could I achieve this? I think numpy, scipy or librosa could do such a thing, but I'm struggling to find exactly how…
1
vote
0 answers

librosa importing error in Jupyter (macOS M1)

I am trying to import librosa in jupyter notebook !pip3 install librosa !pip3 install pysndfile import librosa Found this ERROR message: OSError Traceback (most recent call last) File…
1
vote
0 answers

Error in librosa.load('path.webm') RuntimeError: File contains data in an unknown format

I am trying to load sound files on a python script. I installed, loaded the right version of modules, imported successfully librosa and soundfile, and even ffmpeg (which I found was a solution to this same error for mp3 files) import os import…
Syrine
  • 13
  • 3