Warped Linear Prediction

Link to GitHub repo. This project contains a collection of Jupyter notebooks to demonstrate Warped Linear Prediction techniques in DSP, including filter design and audio codecs.


I was looking to implement Tolonen and Karjalainen's summary autocorrelation method in "A computationally efficient multipitch analysis model." I needed a WLP pre-whitening filter as a first step to the algorithm. To that end, I gathered as many resources (papers, online lectures, blog posts, etc.) as I could find on Warped Linear Prediction. I chose Jupyter notebooks to show my work and annotate my thought process as I tried to develop an understanding of how to implement WLP.


As a final artifact to demonstrate the correct working of the WLP filter, I designed my own version of a WLPAC (Warped Linear Prediction audio codec), loosely based on the Harma and Laine's "WLPAC - a perceptual audio codec in a nutshell."

In [1]:
from wlpac import wlpac_encode, wlpac_decode
import scipy.io, scipy.io.wavfile

wlpac_encode('speech_m.wav', 'speech_m.wlpac', quality=0.3)
wlpac_decode('speech_m.wlpac', 'speech_m_roundtrip.wav')

fs, x = scipy.io.wavfile.read('speech_m.wav')
fs, x_wlpac = scipy.io.wavfile.read('speech_m_roundtrip.wav')
Wrote speech_m.wlpac with quality 0.3, 35.93% smaller
In [2]:
from IPython.display import Audio

Audio(x, rate=fs)
In [3]:
Audio(x_wlpac, rate=fs)