How can I get the pitch of an audio using Librosa? (NOT 2D array, but 1D)

883 views
Skip to first unread message

Yifang Wang

unread,
May 12, 2020, 3:14:17 AM5/12/20
to librosa

Currently, I'm looking for python packages for audio pitch detection (f0 frequency). I then found librosa and tried the piptrack function to track pitch. However, the result is a 2D array (shown as below) instead of a 1D array.

截屏2020-05-12 11.33.02.png


The thing is, I want to get a simple line chart describing the pitch of audio (just like other packages such as crepeaubio, and parselmouth).

So how can I get a similar result using librosa?


Brian McFee

unread,
Feb 27, 2021, 10:26:26 AM2/27/21
to librosa
The piptrack function is for doing parabolic interpolation on spectrograms to infer local peaks, but it is not an f0 estimator.  For that, take a look at the yin and pyin functions added in librosa 0.8.
Reply all
Reply to author
Forward
0 new messages