Abstract
Accurate fundamental frequency ($f_0$) estimation, or pitch tracking, is critical for applications ranging from speech recognition to clinical diagnostics. Traditional methods often struggle with noise sensitivity and temporal inconsistencies, leading to octave and voicing errors. This paper presents a fully Bayesian pitch tracking algorithm that integrates a parametric harmonic model with first-order Markov processes to enforce temporal smoothness. By jointly estimating pitch, harmonic order, and voicing state, the proposed system achieves significant improvements in robustness and accuracy over state-of-the-art neural networks and non-parametric methods.
Introduction
Estimating the fundamental frequency of audio signals is a foundational task in signal processing. However, two primary challenges remain: high sensitivity to background noise and "independence errors." Most harmonic model estimators process audio frames independently, ignoring the physical continuity of speech and music. This lack of temporal context often results in "octave errors"—where a harmonic is mistaken for the base frequency—and "voicing errors"—where active speech is misidentified as silence.
To address these issues, we propose a tracker that incorporates historical state information to make probabilistic inferences about the current frame, ensuring a more stable and accurate pitch trajectory.
Methodology
The core of the proposed approach is a fully Bayesian harmonic model. Unlike non-parametric methods such as YIN or RAPT that rely on signal correlations, our method models the signal as a sum of harmonics (sine and cosine waves).
Markov Process Priors
To enforce temporal continuity, the algorithm employs first-order Markov chains to model the transitions of three key state variables: pitch ($\omega_n$), harmonic order ($K_n$), and voicing state ($u_n$).
This structure ensures that the estimated pitch does not jump erratically between frames, reflecting the physical constraints of sound production. The model utilizes Zellner’s g-prior, which facilitates an analytical, closed-form solution for the likelihood function, avoiding computationally expensive simulations.
Experimental Evaluation
The algorithm was rigorously evaluated using three distinct datasets:
- Keele Pitch Database: 10 spoken sentences with ground truth pitch from electroglottography (EGG).
- Parkinson’s Disease Database: 130 sustained /a/ vowels, testing precision in a clinical context.
- University of Iowa Musical Instrument Samples: Flute recordings to evaluate performance on musical signals.
To handle non-white noise (e.g., "babble" noise), a linear prediction-based prewhitening step was included to flatten the noise spectrum before pitch estimation.
Results and Discussion
The Bayesian tracker was benchmarked against established methods, including PEFAC, YIN, and the deep-learning-based CREPE.
Quantitative Performance
On the Keele database, the proposed method reduced Mean Absolute Errors (MAE) by 15% and Gross Errors by 20%. In clinical testing with the Parkinson’s database under 0 dB white noise, the improvements were even more pronounced, with a 36% reduction in MAE and a 26% reduction in Gross Errors.
Qualitative Smoothness and Joint Estimation
A central finding is that joint estimation is superior to tracking pitch in isolation. By simultaneously monitoring the harmonic order and voicing state, the model effectively rejects noise. Visual analysis of spectrograms confirms the algorithm's superior stability. While competing methods exhibit "jitter" or octave jumps in high-noise conditions, the Bayesian tracker maintains a smooth, continuous trajectory.
Conclusion
By combining a parametric harmonic model with temporal priors in a Bayesian framework, this research provides a robust solution to long-standing issues in pitch tracking. The model's "memory" provides a hang-over effect that prevents the tracker from losing the signal during brief silences. While computationally more intensive than simple autocorrelation, the gains in accuracy and clinical precision are substantial. Future work may explore higher-order Markov models to capture more complex prosodic patterns.
The authors have provided a MATLAB implementation of the algorithm for research and reproduction purposes.
Summary updated