pYIN
pYIN (probabilistic YIN) is an algorithm for estimating the fundamental frequency (F0) of monophonic audio, published by Matthias Mauch and Simon Dixon in 2014. It modifies YIN to give, for each frame, several pitch candidates with probabilities, derived from a distribution over YIN's threshold, and then chooses a pitch track with a hidden Markov model decoded by the Viterbi algorithm.[1:1] Its authors released it as open-source software,[1:2] and the Python library librosa includes an implementation.[2:1] In 2018 the authors of CREPE called it the best-performing pitch tracker to date.[3:1]
Motivation
Estimating F0 from recordings of a single voice is a prerequisite for analysing intonation in speech and singing.[1:3] Frame-by-frame estimates are usually smoothed afterwards, but YIN gives exactly one estimate per frame, so the smoothing cannot fall back on another reading of the signal.[1:1] Once YIN's estimate is wrong the true value cannot be recovered, yet in many cases some other threshold would have given the right pitch.[1:4]
Method
Stage 1: candidates
The first stage follows YIN's steps except the threshold. YIN picks the smallest lag at which its normalized difference function has a dip below a fixed threshold, usually 0.1 or 0.15. pYIN instead places a prior distribution over 100 thresholds from 0.01 to 1; the published experiments used Beta distributions with means of 0.1, 0.15 and 0.2.[1:5] The thresholds' probabilities give each resulting candidate a probability.[1:1] Probability not given to any candidate can be read as the probability that the frame is unvoiced. YIN's own estimate is always among the candidates, and the candidate set had higher recall than any single YIN threshold.[1:4]
Stage 2: tracking
The second stage chooses at most one candidate per frame. Pitch from 55 Hz to just under 880 Hz is divided into 480 bins of 10 cents, each with a voiced and an unvoiced state in a hidden Markov model. Transition probabilities favour smooth pitch tracks and few changes of voicing, and limit a jump to 25 bins (2.5 semitones) per frame.[1:6] The method adds little computation to YIN.[1:2]
Evaluation
The authors tested pYIN on singing synthesized from the F0 tracks of the 100 popular-music songs of the RWC Music Database, both clean and with five kinds of degradation, more than 30 hours in all.[1:7] Counting a frame correct within one semitone, pYIN's median recall was 0.977 to 0.984, close to the upper bound of 0.98 set by its full candidate set, against below 0.951 for plain YIN. Its octave error rates were 0.5% to 1.7%, and its recall in detecting voiced frames was 92.5% to 95.0%.[1:8] YIN with smoothing but a single threshold had the best precision, because it marked fewer frames as voiced, while pYIN had the best balance of precision and recall.[1:9]
On a real recording of a female singer with an unusually breathy voice, YIN made many octave errors in the last notes of "Happy Birthday", which pYIN tracked correctly.[1:10] The authors concluded that pYIN is more robust to its choice of threshold distribution than YIN is to its choice of threshold.[1:11]
Later use
The authors of CREPE, a neural network pitch tracker, compared it with pYIN and SWIPE as the state of the art.[3:2] On their set of resynthesized instrument and vocal stems, pYIN's raw pitch accuracy at a tolerance of 50 cents was 0.919, against CREPE's 0.967, and the gap widened at tighter tolerances.[3:3] pYIN was almost unaffected by added brown noise, whose energy is concentrated at low frequencies.[3:4]
librosa's implementation returns, for each frame, the F0, a flag for whether the frame is voiced and the probability that it is; its documentation recommends a search range from C2 (about 65 Hz) to C7 (about 2093 Hz).[2:2]
- ^a ^b ^c ↗ pyin-abstract ^a ^b ↗ pyin-release ^ ↗ pyin-intonation ^a ^b ↗ pyin-candidates ^ ↗ pyin-thresholds ^ ↗ pyin-hmm ^ ↗ pyin-test-data ^ ↗ pyin-results ^ ↗ pyin-precision-f ^ ↗ pyin-singer-example ^ ↗ pyin-robustness Mauch, Matthias; Dixon, Simon (2014-05). PYIN: A fundamental frequency estimator using probabilistic threshold distributions. 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). https://doi.org/10.1109/ICASSP.2014.6853678 https://webspace.eecs.qmul.ac.uk/s.e.dixon/pub/2014/MauchDixon-PYIN-ICASSP2014.pdf.
- ^ ↗ librosa-pyin-steps ^ ↗ librosa-pyin-returns librosa development team. librosa.pyin. librosa 0.11.0 documentation. https://librosa.org/doc/0.11.0/generated/librosa.pyin.html.
- ^ ↗ crepe-history-of-methods ^ ↗ crepe-baselines ^ ↗ crepe-results ^ ↗ crepe-noise Kim, Jong Wook; Salamon, Justin; Li, Peter; Bello, Juan Pablo (2018-04). CREPE: A Convolutional Representation for Pitch Estimation. 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). https://doi.org/10.1109/ICASSP.2018.8461329 https://arxiv.org/abs/1802.06182.
Discussion
No threads yet.
Sign in to start threads and post replies.