[Speex-dev] Downsampling

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue Jun 7 13:57:44 PDT 2005


Hi,

For transforming stereo to mono, averaging is fine and that's what
everybody does. For sampling rate conversion, it's another matter (too
long for this email) and you should read a bit about it a perhaps grab a
library that does that.

As for echo cancellation, it will be less complex (and as good) on a
(cleanly) down-sampled signal (and certainly not on stereo).

	Jean-Marc

Le mardi 07 juin 2005 à 22:16 +0200, Thorvald Natvig a écrit :
> Ok, this is slightly offtopic, but relates to the quality of input for 
> speex :)
> 
> I'm working on echo cancellation by means of sampling the wave mix 
> of the sound card as well as the microphone. I originally had two sound 
> cards, which had some synchronization problems (now solved, more or 
> less), but I have also discovered a much better solution using ASIO 2.0, 
> which enables me to sample multiple sources on the same soundcard.
> 
> Unfortunately, ASIO is limited to the internal sampling frequency of the 
> sound card, which for my Audigy 2 is 48 khz, and only delivers stereo. As 
> I understand it, just picking every 3rd sample and averaging left and 
> right will introduce aliasing, so I added a FIR-filter to remove all 
> components above 7.5 khz before downsampling. While I can't say I really 
> notice any difference in audible audio quality, the samples seem to have 
> slightly better SNR when inspected in various audio programs.
> 
> However, I still downmix to mono by just averaging the left and right 
> samples, which (from my googling) I can tell will introduce aliasing but I 
> found no good highquality solution to this :(
> 
> The question is, is this FIR-decimator the best method to downsample? I 
> thought of converting the frame to the frequency domain, drop components 
> > 8khz and convert back, but I'm not sure if that would produce a 
> better signal or worse.
> 
> Also, would it be best to do echo cancellation and preprocessing at 48khz 
> and then decimate to 16khz, or (as I currently do) decimate first then do 
> echo cancellation and preprocessing?
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list