<div dir="ltr"><div><div>Arun,<br><br></div>Sorry for the delay.<br><br></div><div>Thanks for the answers.<br><br>"I'm not sure I follow correctly -- you're saying that if you do things<br>
this way, the AEC works fine?"<br><br></div><div>Yes, I follow correcty your instruction is working very good.<br><br></div><div><br><br></div><div>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.<br>I'm having difficult to configure the pulseaudio.<br><br><br></div><div>Thank you very much.<br></div><div><br>The gstreamer log:<br><br>root@colibri-imx6-jfl:~/wavs# ./teste_pulseaudio_echo.sh input.48.wav <br>Setting pipeline to PAUSED ...<br>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<br>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<br>Pipeline is live and does not need PREROLL ...<br>Setting pipeline to PLAYING ...<br>New clock: GstPulseSrcClock<br>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<br>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<br>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<br>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<br>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<br>^Chandling interrupt.<br>Interrupt: Stopping pipeline ...<br>Execution ended after 0:00:04.584419001<br>Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>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<br>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<br>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<br>Setting pipeline to NULL ...<br>Freeing pipeline ...<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-18 0:45 GMT-03:00 Arun Raghavan <span dir="ltr"><<a href="mailto:arun@arunraghavan.net" target="_blank">arun@arunraghavan.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Caio,<br>
<span class=""><br>
On Sat, 14 May 2016, at 02:19 AM, Caio wrote:<br>
> Arun,<br>
><br>
> Your test works very well! tks!<br>
> When I listen the cancelled.wav The audio start very low and after the<br>
> voice is very very low and some times disapers, now it's time to fix the<br>
> mechanical part (speaker / mic) and mic volume.<br>
<br>
</span>The AGC should kick in and fix that eventually.<br>
<div><div class="h5"><br>
> The audio is cracking , but I think there's some problem in my<br>
> configuration (I will need help to fix it).<br>
><br>
><br>
> The log.<br>
><br>
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Doing resync<br>
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback after capture (-1638515), drop<br>
> sink 104884<br>
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (146059), drop<br>
> source 9346<br>
> Jan 01 02:52:44 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (13025), drop<br>
> source<br>
> 832<br>
> Jan 01 02:52:45 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10100), drop<br>
> source<br>
> 646<br>
> Jan 01 02:52:46 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (9965), drop<br>
> source<br>
> 636<br>
> Jan 01 02:52:47 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10089), drop<br>
> source<br>
> 644<br>
> Jan 01 02:52:48 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10024), drop<br>
> source<br>
> 640<br>
> Jan 01 02:52:49 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi<br>
> wm8962-0] module-echo-cancel.c: Playback after capture (-34), drop sink<br>
> 22<br>
><br>
><br>
> This variable   PULSE_PROP="filter.want=echo-cancel"   fixed the problem.<br>
> When I was testing just like I wrote I had problems with echo.<br>
<br>
</div></div>I'm not sure I follow correctly -- you're saying that if you do things<br>
this way, the AEC works fine?<br>
<span class=""><br>
> pactl load-module module-echo-cancel source_name=echosource<br>
> sink_name=echosink aec_method=webrtc sink_master=mastersink<br>
> source_master=mastersource<br>
> gst-launch-1.0 filesrc location=some-voice-file.wav ! wavparse !<br>
>   pulsesink device="echosink" \<br>
>                        pulsesrc  device="echosource" ! wavenc ! filesink<br>
<br>
</span>Can you confirm that the streams were actually connected to those<br>
devices? Look at the output of pactl list sink-inputs and pactl list<br>
source-outputs.<br>
<span class=""><br>
> How I can configure webrtc or speex using enviroment vars (PULSE_PROP)?<br>
<br>
</span>You can't configure this via the environment. With filter.want, the<br>
default which is compiled in is used (webrtc if we have it, else speex).<br>
You can only control this if you manually load the module as you ahve<br>
above.<br>
<div class="HOEnZb"><div class="h5"><br>
-- Arun<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>----------------------------------------------<br>Caio Pereira<br></div><div>@caio_rtp<br></div></div></div>
</div>