<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40" dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"DejaVu Sans";
panose-1:2 11 6 3 3 8 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" style="text-align:left; direction:ltr;"><div>Currently, my setup is on a pi4, not a pi3, maybe that makes a difference.</div><div>I record sound from usb webcam directly from the pulseaudio source (usb3 port).</div><div><div>Bus 001 Device 003: ID 045e:075d Microsoft Corp. LifeCam Cinema<br>
I know it is not a well supported webcam on linux but it works well enough for now. I had to plug it on usb3 for it to work correctly.</div><div>I won't have much time to test today, but i'll do more tomorrow.</div><div><br></div><div>I said the sound if fine and cancelled correctly. However in the journal i get quite a lot of :</div><div><br></div></div><div><div>May 24 05:07:59 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:07:59 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-233332), drop sink 59808</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (6198), drop source 792</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (40575), drop source 5192</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:08:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (20057), drop source 2564</span>
<br>May 24 05:08:44 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-6488), drop sink 1736</span>
<br>May 24 05:08:45 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-293), drop sink 152</span>
<br>May 24 05:08:54 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-45), drop sink 88</span>
<br>May 24 05:09:08 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-73), drop sink 96</span>
<br>May 24 05:10:21 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:10:21 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (6823), drop source 872</span>
<br>May 24 05:10:22 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:10:22 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (67265), drop source 8608</span>
<br>May 24 05:10:22 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Doing resync</span>
<br>May 24 05:10:22 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (3225), drop source 412</span>
<br>May 24 05:10:23 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (12683), drop source 1620</span>
<br>May 24 05:10:24 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (8742), drop source 1116</span>
<br>May 24 05:10:25 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (9509), drop source 1216</span>
<br>May 24 05:10:26 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (10054), drop source 1284</span>
<br>May 24 05:10:27 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback too far ahead (10024), drop source 1280</span>
<br>May 24 05:10:29 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-44), drop sink 88</span>
<br>May 24 05:10:37 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-137), drop sink 112</span>
<br>May 24 05:10:43 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-284), drop sink 152</span>
<br>May 24 05:11:03 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-86), drop sink 96</span>
<br>May 24 05:11:14 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-70), drop sink 96</span>
<br>May 24 05:11:26 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-216), drop sink 128</span>
<br>May 24 05:11:39 rpi4.dyn.empire.lan pulseaudio[2298]: <span style="font-weight: bold; color: rgb(255, 84, 84);">Playback after capture (-126), drop sink 112</span><br></div></div><div><br></div><div>On Sat, 2020-05-23 at 18:30 +0000, Stuart Naylor wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div class="WordSection1">
<p class="MsoNormal">I just tried a totally different sound input 2x I2S mics on the Pi3 Gpio (Pi3 this time)<br>
<br>
Did the tsched thing and without but no luck.<br>
<br>
<span style="font-size:10.0pt;font-family:"DejaVu Sans",sans-serif;color:#333333;background:white">load-module module-udev-detect tsched=0<br>
<br>
If you really want AEC on a pi via software just for now best I have been able to achieve is detailed here.<br>
</span><a href="https://community.rhasspy.org/t/2x-1-80-i2s-mems-mics-pi-3-5mm-ec-but-buy-adafruit-if-you-can/1015"><span style="color:#954F72">https://community.rhasspy.org/t/2x-1-80-i2s-mems-mics-pi-3-5mm-ec-but-buy-adafruit-if-you-can/1015</span></a><br>
Its Alsa has to have a single sound card clock.<br>
<br>
Even though listed as x2 soundcards its the same I2s clock on the Pi.<br>
USB soundcards are the same as one clock so synced with playback/capture<br>
Respeaker work but hate the drivers.<br>
<br>
If you have USB say PS3eye and Pi 3.5mm the speexdsp can not handle the unsynced clock drift and basically doesn’t work.<br>
<br>
But right sound source and the above so far is best method on the Pi, dunno why or what is happening with WebRTC but the results are bad.<br>
<br>
Stuart</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:pulseaudio-discuss-request@lists.freedesktop.org">pulseaudio-discuss-request@lists.freedesktop.org</a><br>
<b>Sent: </b>23 May 2020 13:00<br>
<b>To: </b><a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<b>Subject: </b>pulseaudio-discuss Digest, Vol 109, Issue 16</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Send pulseaudio-discuss mailing list submissions to<br>
pulseaudio-discuss@lists.freedesktop.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
or, via email, send a message with subject or body 'help' to<br>
pulseaudio-discuss-request@lists.freedesktop.org<br>
<br>
You can reach the person managing the list at<br>
pulseaudio-discuss-owner@lists.freedesktop.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of pulseaudio-discuss digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: pa echo-cancel module and alsa (Monkey Bizness)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 22 May 2020 20:06:19 +0200<br>
From: Monkey Bizness <monkey@infra-monkey.com><br>
To: "pulseaudio-discuss@lists.freedesktop.org"<br>
<pulseaudio-discuss@lists.freedesktop.org><br>
Subject: Re: [pulseaudio-discuss] pa echo-cancel module and alsa<br>
Message-ID:<br>
<2d4b5114769a3e27b327c945eff56abb6b1c7c10.camel@infra-monkey.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Stuart,<br>
I've tried to specify sink_master=alsa_output.default which is the sink<br>
create by the alsa-sink module but wierdly my echoCanel_sink is slaved<br>
to the alsa_input of the usb webcam.... <br>
I'll probably do more testing and file a bug report is needed.<br>
Anyhow, I could work around the race for default sink by disabling the<br>
manual module-alsa-sink and adding the "tsched=off" option to load-<br>
module module-udev-detect tsched=offI just hope it doesn't mess with<br>
the usb mic. The capture was working well. If it is messed up i'll have<br>
to go back to setting the sinks manually or find a way to deal with it<br>
through autodetect module.<br>
Now the autodetected sinks use this option. The echo-cancel module uses<br>
the autodetected sink and source and default masters. This means i<br>
don't have to modify the alsa configuration.The set-default-sink and<br>
set-default-source are now correctly used.<br>
I can see some drops sink and drop source in the pa logs.I'll<br>
investigate into that and there must be some tweaking to do. <br>
webrtc seems to have some interesting additional features i want to try<br>
like noise suppression and mobile loud-speakerphone profile i want to<br>
try out.I couldn't find any docs on the speex module so i didn't really<br>
look into it <br>
So far so good.<br>
PS i just started with all the pulseaudio and aec so i'll do as much<br>
testing and reading. I'll come back with more results soon.<br>
Thanks for the advice.<br>
Monkey<br>
On Fri, 2020-05-22 at 13:28 +0000, Stuart Naylor wrote:<br>
> You are supposed to be able to define the master source & sink<br>
> <br>
> <br>
> <br>
> <br>
> My usual is <br>
> <br>
> <br>
> <br>
> >>>load-module module-echo-cancel use_master_format=1<br>
> aec_method=webrtc aec_args=?analog_gain_control=0<br>
> digital_gain_control=1 agc_start_volume=85?<br>
> source_name=echoCancel_source sink_name=echoCancel_sink<br>
> >>> <br>
> >>>set-default-source echoCancel_source<br>
> >>>set-default-sink echoCancel_sink<br>
> <br>
> <br>
> use_master_format=1 just seemed easier than the problems I had in<br>
> attaining a working defined sink/source<br>
> <br>
> I have forgot where I found the details for master_sink &<br>
> master_source parameters maybe its in the code but going to have a<br>
> good look again at PA webrtc.<br>
> <br>
> <br>
> <br>
> I also got into some problems as wanted to have asound.conf that<br>
> would use pulse.<br>
> <br>
> <br>
> <br>
> Using pulseaudio_alsa and<br>
> <br>
> <br>
> <br>
> >>># Use PulseAudio by default<br>
> >>>pcm.!default {<br>
> >>>type pulse<br>
> >>>fallback "sysdefault"<br>
> >>>hint {<br>
> >>> show on<br>
> >>> description "Default ALSA Output (currently PulseAudio Sound<br>
> Server)"<br>
> >>>}<br>
> >>>}<br>
> >>> <br>
> >>>ctl.!default {<br>
> >>> type pulse<br>
> >>> fallback "sysdefault"<br>
> >>>}<br>
> <br>
> <br>
> <br>
> But seemed to get stuck in this tail chasing of default sound on<br>
> reboots.<br>
> <br>
> <br>
> <br>
> As said this weekend going to have another good look at PA Webrtc AEC<br>
> on the Pi but I found when using the Pi output and usb mic the clock<br>
> drift was quite excessive.<br>
> <br>
> I am using soundcards with a singular clock and card for sink/source<br>
> and getting similar results which has me head scratching.<br>
> <br>
> You can wire up 2x I2s mics to a Pi quite easily and that would share<br>
> the same clock as the Pi output (doesn?t work pi4 sadly)<br>
> <br>
> <br>
> <br>
> I will look forward to how you get on as my SpeexEc results have been<br>
> quite good on the Pi and expected PA WebRTC AEC to be better but<br>
> actually seems worse.<br>
> <br>
> PS both of us are setting autogain and from speex that isn?t really a<br>
> good idea as it makes thing much harder for the adaptive FFT routine.<br>
> <br>
> AGC needs really long attack/delay values in fact with voice in<br>
> manner of speech its hard to use AGC and not just amplify noise.<br>
> <br>
> Really the gain shouldn?t be there are its problematic anyway.<br>
> <br>
> <br>
> <br>
> Stuart<br>
> <br>
> <br>
> <br>
> <br>
> Sent from <br>
> Mail for Windows 10<br>
> <br>
> <br>
> <br>
> <br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200522/5cf73dcc/attachment-0001.htm">https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20200522/5cf73dcc/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
pulseaudio-discuss@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss">https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
<br>
<br>
------------------------------<br>
<br>
End of pulseaudio-discuss Digest, Vol 109, Issue 16<br>
***************************************************<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<pre>_______________________________________________</pre><pre>pulseaudio-discuss mailing list</pre><a href="mailto:pulseaudio-discuss@lists.freedesktop.org"><pre>pulseaudio-discuss@lists.freedesktop.org</pre></a><pre><br></pre><a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss"><pre>https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</pre></a><pre><br></pre></blockquote></body></html>