Adaptive Pre and Post Filters based on Perceptual Audio Coding Using Adaptive Pre- and Post-Filters and Lossless Compression by G. Schuller
Perceptual audio coding using adaptive pre-and post-filters and lossless compression
GDT Schuller, B Yu, D Huang, B Edler
IEEE Transactions on Speech and Audio Processing 10 (6), 379-390
- Adaptive Pre Filter followed by Quantization
- Interpolates Reflex coefficients across Frame
- Lattice FIR implementation
- Autocorrelation sequence is derived from psychoacoustic threshold
- Reflexion coefficients are derived from ACF using Levinson-Durbin Recursion
filt_lattice,filter_output,olap,filtered_spectrum,input_spectrum, norm_coeff, rate=adaptive_prefilter_quant(N,P,olap,q)
The filtered signal is written to the wavfile filt_quantized.wav
Arguments:
N = frame size = 128
P = filter order , usally 10 or 11
overlap = interpolation depth for filter coefficients. For a frame size of 128, you can choose
overlap in the range 16-32, though it supports values from 1-63.
q = is used to change quantization level of the filtered signal, can give values 2,4,8,...512.
( \hat(x) = q* trunc (x/q )) ie filter output is divided by q, truncates, and then multiplied by q.
Returns:
filt_lattice=filter coefficients (ki)
filter_output=filtered signal
olap = extend of interpolation used
filtered_spectrum = DFT Spectrum of the filtered signal
input_spectrum = DFT Spectrum of the input signal
norm_coeff = normalized coefficients
rate = sampling rate of the audio output
Reconstruct signal back from pre-filtered signal.
reconst = post_filter(fil_coef,filtered,olap,fs,norm_coeff)
Arguments:
fil_coef = filter coeefficinet matrix obtined from pre filter
filtered = filtered signal from pre filter
olap = ineterpolation depth used in pre filter
fs = sampling frequency, used in wavewrite
norm_coeff = normalized coefficients
Returns:
The reconstructed signal is returned in reconst.
Reconstructed signal is written to reconstructed.wav
Interactive jupyter notebooks to test and demonstrate the pre- and post- filters.
You can visit this notebook at: Filter Application Example
In case you run into problems running jupyter widgets try:
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
- K Suresh sureshk@ieee.org
- R Profeta renato.profeta@tu-ilmenau.de
- G Schuller gerald.schuller@tu-ilmenau.de