[pulseaudio-discuss] Test and Evaluate Echo Cancellation in an Embedded Device

Caio caiortp at gmail.com
Fri May 27 18:28:24 UTC 2016


Arun,

Sorry for the delay.

Thanks for the answers.

"I'm not sure I follow correctly -- you're saying that if you do things
this way, the AEC works fine?"

Yes, I follow correcty your instruction is working very good.



But Now I'm trying to avoid the "audio underrun" (the audio is cracking).
When I use the paplay the audio is ok and the cpu is around 14%, when I
start the test the cpu goes to 26% and the audio start to cracking.
I'm having difficult to configure the pulseaudio.


Thank you very much.

The gstreamer log:

root at colibri-imx6-jfl:~/wavs# ./teste_pulseaudio_echo.sh input.48.wav
Setting pipeline to PAUSED ...
0:00:00.093887667  1258  0x1bac100 WARN                 basesrc
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0/1.4.1-r0/gstreamer-1.4.1/libs/gst/base/gstbasesrc.c:3460:gst_base_src_start_complete:<filesrc0>
pad not activated yet
0:00:00.094892667  1258  0x1bb5750 FIXME                default
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0/1.4.1-r0/gstreamer-1.4.1/gst/gstutils.c:3643:gst_pad_create_stream_id_internal:<wavparse0:src>
Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstPulseSrcClock
0:00:00.098627667  1258  0x1bb5780 FIXME                default
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0/1.4.1-r0/gstreamer-1.4.1/gst/gstutils.c:3643:gst_pad_create_stream_id_internal:<pulsesrc0:src>
Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
0:00:01.350294000  1258  0x1bb5750 WARN           audiobasesink
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst-libs/gst/audio/gstaudiobasesink.c:1288:gst_audio_base_sink_skew_slaving:<pulsesink0>
correct clock skew 22728553 > 20000000
0:00:01.904267667  1258  0x1bb5750 WARN           audiobasesink
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst-libs/gst/audio/gstaudiobasesink.c:1288:gst_audio_base_sink_skew_slaving:<pulsesink0>
correct clock skew 21428670 > 20000000
0:00:03.019438001  1258  0x1bb5750 WARN           audiobasesink
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst-libs/gst/audio/gstaudiobasesink.c:1288:gst_audio_base_sink_skew_slaving:<pulsesink0>
correct clock skew 20980685 > 20000000
0:00:03.947815667  1258  0x1bcb5a0 WARN                   pulse
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0-plugins-good/1.4.1-r0/gst-plugins-good-1.4.1/ext/pulse/pulsesink.c:678:gst_pulsering_stream_underflow_cb:<pulsesink0>
Got underflow
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.584419001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:04.692690334  1258  0x1bc8430 WARN                audiosrc
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-mx6qdl-angstrom-linux-gnueabi/gstreamer1.0-plugins-base/1.4.1-r0/gst-plugins-base-1.4.1/gst-libs/gst/audio/gstaudiosrc.c:244:audioringbuffer_thread_func:<pulsesrc0>
error reading data -1 (reason: Success), skipping segment
0:00:04.694879001  1258  0x1bac100 WARN                  wavenc
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0-plugins-good/1.4.1-r0/gst-plugins-good-1.4.1/gst/wavenc/gstwavenc.c:922:gst_wavenc_change_state:<wavenc0>
warning: Wav stream not finished properly
0:00:04.694963334  1258  0x1bac100 WARN                  wavenc
/home/icchw/oe-core/build/out-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/gstreamer1.0-plugins-good/1.4.1-r0/gst-plugins-good-1.4.1/gst/wavenc/gstwavenc.c:922:gst_wavenc_change_state:<wavenc0>
warning: Wav stream not finished properly, no EOS received before shutdown
Setting pipeline to NULL ...
Freeing pipeline ...


2016-05-18 0:45 GMT-03:00 Arun Raghavan <arun at arunraghavan.net>:

> Hi Caio,
>
> On Sat, 14 May 2016, at 02:19 AM, Caio wrote:
> > Arun,
> >
> > Your test works very well! tks!
> > When I listen the cancelled.wav The audio start very low and after the
> > voice is very very low and some times disapers, now it's time to fix the
> > mechanical part (speaker / mic) and mic volume.
>
> The AGC should kick in and fix that eventually.
>
> > The audio is cracking , but I think there's some problem in my
> > configuration (I will need help to fix it).
> >
> >
> > The log.
> >
> > Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Doing resync
> > Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback after capture (-1638515), drop
> > sink 104884
> > Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (146059), drop
> > source 9346
> > Jan 01 02:52:44 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (13025), drop
> > source
> > 832
> > Jan 01 02:52:45 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (10100), drop
> > source
> > 646
> > Jan 01 02:52:46 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (9965), drop
> > source
> > 636
> > Jan 01 02:52:47 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (10089), drop
> > source
> > 644
> > Jan 01 02:52:48 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback too far ahead (10024), drop
> > source
> > 640
> > Jan 01 02:52:49 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> > wm8962-0] module-echo-cancel.c: Playback after capture (-34), drop sink
> > 22
> >
> >
> > This variable   PULSE_PROP="filter.want=echo-cancel"   fixed the problem.
> > When I was testing just like I wrote I had problems with echo.
>
> I'm not sure I follow correctly -- you're saying that if you do things
> this way, the AEC works fine?
>
> > pactl load-module module-echo-cancel source_name=echosource
> > sink_name=echosink aec_method=webrtc sink_master=mastersink
> > source_master=mastersource
> > gst-launch-1.0 filesrc location=some-voice-file.wav ! wavparse !
> >   pulsesink device="echosink" \
> >                        pulsesrc  device="echosource" ! wavenc ! filesink
>
> Can you confirm that the streams were actually connected to those
> devices? Look at the output of pactl list sink-inputs and pactl list
> source-outputs.
>
> > How I can configure webrtc or speex using enviroment vars (PULSE_PROP)?
>
> You can't configure this via the environment. With filter.want, the
> default which is compiled in is used (webrtc if we have it, else speex).
> You can only control this if you manually load the module as you ahve
> above.
>
> -- Arun
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>



-- 
----------------------------------------------
Caio Pereira
@caio_rtp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160527/f9eae3db/attachment-0001.html>


More information about the pulseaudio-discuss mailing list