[Speex-dev] Backup Echo Suppression

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Tue Jul 3 19:57:23 PDT 2007


> I just mean, if the echo canceler is using timing information to try to
> find the echo, then it probably won't work, but if it just works on each
> pair of buffers, then it will, and it sounds like that is how it works,
> which is good to know, thanx.

Sure. But note that if your clock rate is constant over time (reasonable
assumption) and you have no dropouts, then you can infer the timing info
from the sample position.

> So even though it is difficult, I think that echo canceler 2.0 should be
> able to tolerate things like multiple audio sources (5.1 etc), even
> multiple mics, from multiple sound cards. 

Sure, I was also planning to include a new kitchen-sink-based cold
fusion device. Multi-channel AEC is hard. It's actually the subject of
my post-doc and no it's not going into Speex any time soon (not up to me).

>> If you think it's easy, then I guess I'll be waiting for your patch...
> 
> Hah ya blah.  One way to go about exploring something like that would be
> in something like Matlab that makes brainstorming easy.  The covariance
> thing is actually only 1 line of code in Matlab, but it can be
> intensive.  It would be better to use FFTs from elsewhere in speex if
> you have them, but I dunno how your underlying implementation works.

I know how to use Matlab and I know how to compute a cross-correlation
in the frequency domain, thank you very much. It's the next step that's
slightly less obvious.

> It is actually very likely that input and output are on the same card at
> 44100 Hz.  What's problematic is getting the right sized hardware
> buffers.  I wrote a whole library to nibble and give me the 160 I need,
> but I have no idea what is happening under the hood, or if I can even
> ask apple for the same size input and output buffers, because I am using
> their classic sound engine which is archaic by today's standards.  I
> could probably switch to using core audio or quicktime to get the right
> buffers, it's just a lot of work.  It sounds like all of that isn't
> necessary though, if as you said above, nibbling won't affect things
> because it doesn't use timestamps.

Ever heard of something called ring buffers? Should solve your problems
of soundcard not returning (or requesting) the "right" number of samples.

	Jean-Marc



More information about the Speex-dev mailing list