Mycroft with Respeaker 2-Mic

@j1nx
Probably a good idea to note what changes I’ve made in this process. At some point I’m going to do something dumb, break something, and then need to start over…

I’ll check on the SD card. I believe I have one but I’m not 100% sure. If I do I’d be happy to test out your build.

As Requested here is the extent of the files I edited and what was edited.

/boot/config.txt
from

`# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=i2s-mmap
dtparam=i2s=on

to

`# Enable audio (loads snd_bcm2835)
dtparam=audio=off
dtoverlay=i2s-mmap
dtparam=i2s=on
dtoverlay=seeed-2mic-voicecard

/etc/mycroft/mycroft.conf

“play_wav_cmdline”: “paplay %1”
“play_mp3_cmdline”: “mpg123 %1”

/etc/asound.conf

`# Use PulseAudio by default
pcm.!default {
type pulse
fallback “sysdefault”
hint {
show on
description “Default ALSA Output (currently PulseAudio Sound Server)”
}
}

ctl.!default {
type pulse
fallback “sysdefault”
}

/etc/pulse/daemon.conf

resample-method = ffmpeg
default-sample-format = s24le
default-sample-rate = 48000
alternate-sample-rate = 44100

/etc/pulse/default.pa

unload-module module-suspend-on-idle
unload-module module-role-cork
load-module module-role-ducking

pactl set-default-sink 0
pactl set-default-source 1

1 Like

So I installed some skills tonight and tried to have Mycroft respond to “Hey Jarvis”
Then I installed the Cocktails, Timer, Home Assistant, and Tune-In skills.

Then I tried to use Mycroft.

“Hey Jarvis” didn’t work so I switched back to “Hey Mycroft”

I rebooted and then tried a “Hey Mycroft”. I got the listening chime, I asked a question and watched the CLI. Mycroft parsed the question properly but did not play any audio despite the CLI showing it was saying something.

Things were working fine before I made the changes. I removed the skills I added and rebooted but still no audio is being played. Also I noticed in the CLI that the Mic is silenced after a question is asked and doesn’t start working until I type something into the CLI.

So quick update, I double checked all my previous changes and everything was still there.
Then I remembered that I changed the voice to British Male. I switched it back to American Male, rebooted, and Mycroft started working properly…

@rlongfield this post helped me setup as well, thanks!

I did encounter one problem: after about a minute mycroft’s audio stuff stops working. More precisely, the Mic indicator in the CLI drops to 0 and “say hello” prints “hello” but no sound comes out from the speakers.
If I do mycroft-start voice restart then things start working again, but die within a minute.

Fixed it by commenting out alternate-sample-rate in daemon.conf and its stable now.

3 Likes