Echo Cancellation using PulseAudio (IMX6Sabre SD)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Echo Cancellation using PulseAudio (IMX6Sabre SD)

4,013 Views
caiopereira
Contributor III

Hello,

 

I'm trying to validate the aec echo cancellation using PulseAudio in an IMX6Sabre SD Dual Lite board.

In my  TestBed I'm using two IMX6Sabre SD boards, each board has the same software/configuration installed and located in different rooms ( to isolate the audio) and are connected to the same Ethernet Switch .

To build the Image I used Yocto 1.7 (PulseAudio 5.0) compiled with Speex and WebRTC plugin.

I'm using Gstreamer1.0 to simulate a call to other board.

During the test we have 2 person , 1 in each room to test the call.

 

I'm using the systemd , the parameters to load the pulseaudio ( the pulseaudio configuration files are attached)

[Unit] Description=pulseaudio server Requires=dbus.service After=dbus.service  [Service] Type=simple ExecStart=/usr/bin/pulseaudio -p /usr/lib/pulse-5.0/modules/ -n -F /etc/pulse/am_poc.pa --system Restart=always RestartSec=5 TimeoutSec=5  [Install] WantedBy=multi-user.target

 

To load the echo cancelling plugin I was using :

pactl load-module module-echo-cancel source_name=echosource sink_name=echosink aec_method=speex sink_master=mastersink source_master=mastersource

The aec_method I tested with speex and webrtc , all modules have been successfully loaded.

 

 

Gstreamer Script to simulate a voice call (gstreamer_call.sh)

#!/bin/sh IPDEST=$1  case "$2" in    start)          echo "Starting gstlaunch"                 gst-launch-1.0 -v \                         pulsesrc device="echosource"  \                 ! alawenc ! rtppcmapay ! udpsink port=4000 host=$IPDEST &                 gst-launch-1.0 -v udpsrc caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA" port=4000 ! \                         rtppcmadepay ! alawdec ! audioconvert ! audioresample ! \                         pulsesink device="echosink" \                 &       stop)           echo "Stopping gstlaunch"                 killall gst-launch-1.0            ;;         *)           echo "Usage: $0 <ipaddress> start|stop"           exit 1           ;; esac

 

 

To start a call

Board 1 IP 192.168.1.10:

./gstreamer-call.sh 192.168.1.20 start

 

Board 2 IP 192.168.1.20

./gstreamer-call.sh 192.168.1.20 start

 

After running the script, the conversation starts.

 

After starts the conversation it's possible to note the echo  in the 2 boards.

 

  • The board 1 could listen your own echo
  • The board 2 could listen your own echo.

 

We test with aec_method speex and webrtc, I try to configure the alsamixer sound parameters with no success.

 

I would like to ask for a help to solve this problem. After solve the echo cancellation using the Sabre SD board I will test and validate in my own board . (I know that the echo cancellation has some directives about  physical position fo mic and speaker, but I'm using the Sabre SD as a reference).

 

Someone know how to validate the AEC echo cancelling Plug-in? or debug the plug-in if this plug-in is running or there's some audio problem?

 

Thank you very much.

 

Best Regards,

 

Caio Pereira

                gst-launch-1.0 -v \
                        pulsesrc device="echosource"  \
                ! alawenc ! rtppcmapay ! udpsink port=4000 host=$IPDEST &
                gst-launch-1.0 -v udpsrc caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA" port=4000 ! \
                        rtppcmadepay ! alawdec ! audioconvert ! audioresample ! \
                        pulsesink device="echosink" \
                &

Original Attachment has been moved to: am_poc.pa.zip

Original Attachment has been moved to: client.conf.zip

Original Attachment has been moved to: daemon.conf.zip

Labels (4)
0 Kudos
Reply
2 Replies

2,333 Views
p12patel
Contributor II

hello

did anyone succeed in echo cancellation using pulse audio on imx6 ?

0 Kudos
Reply

2,333 Views
jimmychan
NXP TechSupport
NXP TechSupport

Seems this issue is not much related to i.MX.

Anyway, I 'google' some information for you. hope this useful for you.

1. https://bugs.freedesktop.org/show_bug.cgi?id=58226

2. http://stackoverflow.com/questions/22726143/how-can-i-get-a-stream-of-all-sounds-recorded-from-the-m...

seems they are two different methods. But the basic idea is same that it will only cancel echos of sounds passed into it.

0 Kudos
Reply