I am using picroft and everything seems to be working. However when I am playing spotify mycroft will not respond to anything. Once the song stops via stopping or it being over, I will get a response for my previous queries that were stated during the song.
Unfortunately the Rpi does not have built in Echo Cancellation so, yes this is expected behavior.
There is information scattered throughout the forum on this.
Look at some of the work being done with respeaker as it might give you some ideas.
That should now set the default source to echo cancelled pulseaudio -k to kill pulseaudio the daemon should restart auto 1-2 secs most
From the Archwiki
Possible ‘aec_args’ for ‘aec_method=webrtc’
Here is a list of possible ‘aec_args’ for ‘aec_method=webrtc’ with their default values :
analog_gain_control=1 - Analog AGC - ‘Automatic Gain Control’ done over changing the volume directly - Will most likely lead to distortions.
digital_gain_control=0 - Digital AGC - ‘Automatic Gain Control’ done in post processing (higher CPU load).
experimental_agc=0 - Allow enabling of the webrtc experimental AGC mechanism.
agc_start_volume=85 - Initial volume when using AGC - Possible values 0-255 - A too low initial volume may prevent the AGC algorithm from ever raising the volume high enough .
high_pass_filter=1 - ?
noise_suppression=1 - Noise suppression.
voice_detection=1 - VAD - Voice activity detection.
extended_filter=0 - The extended filter is more complex and less sensitive to incorrect delay reporting from the hardware than the regular filter. The extended filter mode is disabled by default, because it seemed produce worse results during double-talk .
intelligibility_enhancer=0 - Some bits for webrtc intelligibility enhancer.
drift_compensation=0 - Drift compensation to allow echo cancellation between different devices (such as speakers on your laptop and the microphone on your USB webcam). - only possible with “mobile=0”.
beamforming=0 - This can significantly reduce background noise. See 
mic_geometry=x1,y1,z1,x2,y2,z2 - Only with “beamforming=1”.
target_direction=a,e,r - Only with “beamforming=1”. Note: If the module does not want to load with this argument, set azimuth (a) to the desired value, but set elevation (e) and radius ® to 0.
high_pass_filter=1, voice_detection=1, extended_filter=0 are questionable if the actual provide benefit.
VAD I thought is a Voice Active Detection filter but with nothing to use that signal prob pointless.
intelligibility_enhancer=0 isn’t implemeneted.
drift_compensation=0 Never tried.
I do use the rest and because I have a PS3 eye with a linear 4 mic array approx 20mm apart I have beamforming set. Noticed it seems to like an escape character of \ before the next parameter so my setup.
Thanks for the reply, I am not sure how echo cancellation comes into it. So to be clear there is not supposed to be any reply to any voice commands while spotify is playing ? I am almost positive this used to work when I had this set up before.
You might be better just grabbing and flashing Rasbian desktop to a card and just playing.
sudo apt-get install pavucontrol the simple gtk pulseaudio volume/config app.
You can view conf, current inputs and outputs there.
Pain to install desktop just for test, but to be able to see it all in one utility makes it a lot easier.
If it works there it will work in the raspbian lite mycroft image which is the same but desktopless.
Guess you could install the desktop if that makes it easier for you.
I just played with it once as now know it works
Add those parameters 1 by one and see what you think just doing a pulseaudio -k after each change to sudo /etc/pulse/default.pa
Turned up today and speaker was just connect bluetooth but mic is not there. Windows it works auto on connection.
So its on a back burner until I find what settings bluez and pulse need for it, as I love linux but sometimes it can just really get on your nerves that a conf is needed somewhere and you have to go trawling google.
Thanks for the information. That is a huge issue really. I’d say 95%+ of my usage of mycroft is for spotify. I was hoping to replace alexa because, well it’s amazon and I try and support OSS as much as I can.
I hope this gets figured out at some point, but back to alex for now.
I’m new here but I think you’ll want to check this setting in your mycroft.conf:
// Stop listing to the microphone during playback to prevent accidental triggering
// This is enabled by default, but instances with good microphone noise cancellation
// can disable this to listen all the time, allowing 'barge in' functionality.
"mute_during_output" : true,
The rpi hardware just doesn’t have what it takes for true echo cancellation. There are hardware microphones available that also have speaker loopback channels for handling true echo cancellation. The previous links on respeaker provides information. Keep in mind this is still very much a work in progress project. The mark 2 supports EC as well.
I and others investigated this quite a while ago now with limited success. It wasn’t hardware specifically that was the issue but cpu resources that were the problem. The software EC took quite a few cpu resources to accomplish the task which is why it is not enabled by default and. A bounty exists to solve the problem. Maybe with the extra horsepower of the pi 4 things would be better but i have not tried. If you have success the community would be interested in how you achieve it.
I am using a Pi4 and the Webrtc AEC uses about half the load Precise does from top.
Dunno about pi3 but thought it would… ?
With the desktop test I suggested with pulse audio running I seemed to be getting about .5 load that is also with a 4 array beamforming running.
If that adds an extra… but definately on a Pi4 it copes easily.
I think pulseaudio with aec was adding about 10-14% load but would have to go back and check as I mainly remember it was half what Precise produced.