librosa

Error when trying to display colorbar using matplotlib library Python 3.9

Error when trying to display colorbar using matplotlib library Python 3.9 Question: 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 feel I’m …

Total answers: 1

failed to hear audio on jupyter with librosa but can with scipy – sampling rate issues?

failed to hear audio on jupyter with librosa but can with scipy – sampling rate issues? Question: I can hear audio in jupyter if loaded with scipy. However, I can hear untill 192000 sampling rate. If I set to 192001 or above, I cannot hear anything. from IPython.display import Audio from scipy.io.wavfile import read wave_filename …

Total answers: 1

Slicing audio given video frames

Slicing audio given video frames Question: I have audio from a video that I’ve loaded with PyTorch. Given a starting index and ending index corresponding to the video segment of interest, along with the video FPS and audio sampling rate, how would I go about extracting the slice of audio that matches the segment of …

Total answers: 2

Unable to import librosa

Unable to import librosa Question: 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! Asked By: Pranav Seth || Source Answers: According to the package code, resampy …

Total answers: 1

Librosa Split .wav file into 15s intervals

Librosa Split .wav file into 15s intervals Question: 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 …

Total answers: 1

Identifying the loudest part of an audio track and cropping (Librosa or torchaudio)

Identifying the loudest part of an audio track and cropping (Librosa or torchaudio) Question: I’ve built a U-Net model to perform audio mixing of multitrack audio, for which I’ve used 20s clips of the audio tracks (converted into spectrograms) as input in training the model. However the training process is incredibly long, so I think …

Total answers: 2

How to calculate and plot multiple spectrogram in a for loop with librosa?

How to calculate and plot multiple spectrogram in a for loop with librosa? Question: I have a 16-sec audio signal. I want to divide my signal into 16 1-sec signals with a for loop and calculate its spectrogram. Let’s assume the raw signal is like the figure that I have attached and I want to …

Total answers: 1

Python TypeError: reduce_noise() got an unexpected keyword

Python TypeError: reduce_noise() got an unexpected keyword Question: 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 function. import librosa import numpy as np import noisereduce …

Total answers: 2

Librosa – Audio Spectrogram/Frequency Bins to Spectrum

Librosa – Audio Spectrogram/Frequency Bins to Spectrum Question: I’ve read around for several days but haven’t been to find a solution… I’m able to build Librosa spectrograms and extract amplitude/frequency data using the following: audio, sr = librosa.load(‘short_piano melody_keyCmin_110bpm.wav’, sr = 22500) spectrum = librosa.stft(audio, n_fft=2048, window=scipy.signal.windows.hamming) D = librosa.amplitude_to_db(np.abs(spectrum), ref=np.max) n = D.shape[0] Nfft …

Total answers: 2