From: drowe67 Date: Sun, 13 Sep 2009 01:43:11 +0000 (+0000) Subject: experimenting with attenuation m=1 harmonic to improve males - works well but messes... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=54a7a987651c270fec5df5aaa5be5029b7758434;p=freetel-svn-tracking.git experimenting with attenuation m=1 harmonic to improve males - works well but messes up clean speech with F0 present in original git-svn-id: https://svn.code.sf.net/p/freetel/code@59 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2/src/quantise.c b/codec2/src/quantise.c index e24fe087..d00036b5 100644 --- a/codec2/src/quantise.c +++ b/codec2/src/quantise.c @@ -358,4 +358,18 @@ void aks_to_M2( model->A[m] = Am; } *snr = 10.0*log10(signal/noise); + + /* attenuate fundamental by 30dB if F0 < 150 Hz. LPC modelling often makes + big errors on 1st harmonic, which is usually at very low level due to + analog HPF. + + Another option is to use a single bit to swith thos attenuation + in and out based on measured error an encoder. That way + non-HPF speech won't be impaired. + */ + + if (model->Wo < PI*150.0/4000) { + model->A[1] *= 0.032; + } + }