GStreamer Echo Cancellation

Hey guys!

Anyone tried the GStreamer Echo Cancellation?

How does it compare to PulseAudio’s or VoiceEngine EC in terms of CPU usage and quality?

Cheers

Hi fastjack,

not at the moment - i use “pure” arecord for the input. But the possiblity is quite nice - how can i implement it to my satellites? I configure my satellites via ansible - so as soon as you can give me a how to i can test it on a raspi zero, 3+ and an old mac mini (with linux installed of cause).

Kind Regards and Stay Healthy

Chewy

I actually just read about it online.

I never used GStreamer so I do not know how to configure it yet.

Like some users on this forum I’m searching for a way to do AEC so I can have audio playback (music, radio, audiobooks) and still get the wakeword detected.

I’ve tested the Respeaker Mic Array v2 that provides a very decent AEC algorithm but for a very high price (63€ in France).

I’ve been looking at PulseAudio but I found it to be quite heavy on the CPU during AEC.

I’ve been following @rolyan_trauts experiments with I2C MEMS Microphones and VoiceEngine EC (I did not find the time to try and reproduce his tests yet).

Next in line is GStreamer… but before digging too deep I wanted to know if someone has already used it successfully for AEC.

I just presumed its the same implementation of webrtc but via gstreamer.
For some reason the linux versions of webrtc do not seem to work well on Arm but that is from pulseaudio as irrespective of high load the results are poor.

Only thing that I have found with good load is https://github.com/voice-engine/ec as because it only works whilst media is playing so diversification of load also helps more.
It also works at a source/sink level and can be used as an alsa-plugin or pulseaudio so it doesn’t define your audio system as a gstreamer plugin would.

I2S mems I don’t really bother with anymore as I am finding analogue electret noise reducing mics in conjunction with a soundcard the lowest cost, easy and best option.
With a bit of a google and a soldering iron summing arrays or stereo usb soundcards are quite easy to provide.

The noise reducing / directional electrets differ from omni-directional ones by purely having holes in the backplane so creating pressure on the backside of the diaphragm which results in a antiphase reduction/cancelling.

They are approx $2 or less with mic modules approx the same and result in a mic that is far more sensitive than just a passive mic into a soundcard.

https://github.com/voice-engine/ec if you spend a little time working out the setup produces really good results for ‘barge in’ and that is really all you need.
Webrtc does really good cancellation but fails at relatively modest levels of echo whilst the above based on the SpeexDSP’s AEC algorithm should really be called echo attenuation but it works with much larger echo volumes whilst still attenuating enough that the near audio is predominant enough for recognition to work without introducing a vocoding type effect that others seem to that changes the near audio where recognition starts to fail, so no barge in.

Its not how it sounds to us that matters its how near the MFCC spectrogram is to the matching recognition one that counts.

If you can get a low enough SNR with your mic did notice some analogue mems that where pretty good (but no noise reduction) then summing them does sum the SNR but gives approx a 3db gain above the additional SNR and might be worth playing with.