I haven’t used these microphones, but when I added an I2S microphone a few weeks ago, I had a hard time getting it to work with Mycroft. My solution was to install Picroft and choose the Google Voicehat option. The installer fails to finish cleanly, it constantly wanted to reboot and ask again what sound out to use. After a few reboots, I simply selected to default (1) sound out. This allowed the routine to finish. Now the I2S microphone and speaker work. Neither of which is the Google Voicehat.
However when I go into alsamixer the default audio device is PulseAudio. Just going to go out on a limb here and say that perhaps this might be my issue? Pulse is pointing to Alsa for devices and Alsa is pointing to Pulse as the default device…
So basically I disabled all the on board audio and left only the Respeaker card. After rebooting and getting back into the Mycroft CLI I noticed the Mic level was jumping around and changing which was something that wasn’t happening before.
So I now have Mycroft responding, well sort of. I can say “Hey Mycroft” then there is a long pause, the “I’m Listening” chime, then I can ask a question.
Mycroft never understands what I say, in fact I always get “List index out of range” errors in the CLI.
My Voice.log file:
2019-12-07 02:08:50.467 | INFO | 854 | main:handle_wakeword:59 | Wakeword Detected: hey mycroft
Playing WAVE ‘/home/pi/mycroft-core/mycroft/res/snd/start_listening.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
2019-12-07 02:08:56.162 | INFO | 854 | main:handle_record_begin:37 | Begin Recording…
2019-12-07 02:09:04.447 | INFO | 854 | main:handle_record_end:43 | End Recording…
2019-12-07 02:09:06.297 | ERROR | 854 | mycroft.client.speech.listener:transcribe:239 | list index out of range
2019-12-07 02:09:06.302 | ERROR | 854 | mycroft.client.speech.listener:transcribe:240 | Speech Recognition could not understand auto
My Audio.log file:
This is the closest entry I could find
2019-12-07 02:08:39.138 | INFO | 851 | mycroft.audio.speech:mute_and_speak:120 | Speak: I don’t understand, but I’m learning new things everyday.
Playing WAVE ‘/tmp/mycroft/cache/tts/Mimic/bbe44ad9dc362342ef2162a3d7fe94a6.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
The “List index out of range” sounds like your mic volume is to low. Have a look with “alsamixer”, change to view the Seed voice card and see what the levels are of the microphone. If they are low, you coudl raiase them and play around a bit to find the better optimal setting for them.
The ondemand governor means it increases and decreases the CPU clockspeed on demand. This is fine for most cases, but I have seen that with precise-engine it keeps throtling up and down as I believe the threshold for it is at 95%.
I have it set to performance, but we will skip that for now. I asked to double check it wasn’t configured to “powersafe”. Because that meant it wasn’t running at full speed.
Anyhow, if the listener records you perfectly and also prints it, but doesn’t know what to do with it,. that sounds like you changed the language of mycroft? Did you?
Well I wouldn’t say it records me perfectly. It pretty much ignores anything I say after “Hey Mycroft” if anyone else in my family says anything after the listening chime it will usually print what they say unless it’s a Mycroft command.
As for changing the language. I don’t think I changed anything but the voice and the wake word, which I quickly changed back when it didn’t work. Less things in the mix to sort out.
Sounds about right for anything I try.
So I just tried “Hey Mycroft” and then I didn’t say anything and I got the same error message as when I try to say something.
20:34:46.113 | ERROR | 854 | mycroft.client.speech.listener:transcribe:239 | list index out of range
`> ~~~~ | 854 | mycroft.client.speech.listener:transcribe:240 | Speech Recognition could not understand audio
I don’t know if that means anything or not.
ok edit 2, So I decided to watch the mic meter in the CLI, it jumps around with the house noises, spikes when I say 'Hey Mycroft" and then drops and freezes when it’s supposed to be listening to a spoken command. It’s almost like it’s getting muted. I assumed the muting mentioned in the CLI was for the output…
Boot up raspberry pi with power to both hat and board
Let it go through the first boot process
It will ask you after the first boot process if you want to go through the guided install or to just go straight to the command line. Choose to go straight to the command line.
From note (B), follow steps 2.1 and 2.2.
Run pactl list sinks and pactl list sources and note what number corresponds with the Description: seeed-2mic-voicecard Analog Stereo for the sources and sinks command (should be 1 and 2 respectively).
Run pactl set-default-sink $sink_card_number and pactl set-default-source $source_card_number where $sink_card_number and $source_card_number are replaced from the numbers you took note of in step 7 (again, should be 1 and 2 respectively).
Run sudo reboot for good measure.
Run sudo nano /etc/mycroft/mycroft.conf and edit the file to have the following code:
“Play_wav_cmdline”: “paplay %1”,
Confirm functionality by running ./mycroft-core/start-mycroft.sh audiotest -l from your home directory. When it says “DONE RECORDING. PLAYING BACK…”, let it try to run until it fails, do not try to control+c out of it. Sometimes it takes a few seconds to start the Daemon(?).
I had the same problem at one point where it would pick up when I said “Hey Mycroft”, but after that, it wouldn’t record anything I said. I think the problem is because one of the skills mutes a sound card or something by default after it hears the wake word, which causes the microphone to not pickup anything. After it’s done trying to record the utterance and it spits out that list index error, it goes back to normal because it unmutes the sound card. I’m not sure how to fix it outright, but I know after restarting and following the directions I outlined in my post it didn’t do that anymore.
I hope that helps I hope you get it working because I’ve been having trouble with it too. Right now it’s with getting Spotify to play from the same device, but I’m sure I’ll get it working eventually.
@mrhavoc9999 [quote=“mrhavoc9999, post:12, topic:7635”] set-default-sink $sink_card_number and pactl set-default-source $source_card_number
I did this bit and I am happy to report it is now working!
@rlongfield Great news. Interested to know if you had multiple sources/sinks or just one of both. If the latter is the case, still strange that it didn’t make the only available the default automatically.
To comment on your volume. Try setting everything up with alsamixer. Close it and run the command;
sudo alsactl store
It should save your settings to /var/ which get’s restored at a reboot.
Very strange that you have two sources, the first being a Monitor for the seed card…
I am a bit confused, which config files are now adjusted to what.
Could you walk us through which files you have editted with which content? This also for other users that might run into the same later on in time.
On a second note: Do you mind, me asking for a favour? I wonder if you have a spare SDcard at hand and would like to test an image for me? I am working on a hobby project that creates an out of the box experience for Mycroft. It is far from complete, but has respeaker support, although I am using the 4-mic hat, but the 2-hat should be supported as it uses the same drivers from seeed.
I just pushed a new alpha4 version online, and wondering if you could give it a go and report back. If so, this goes offtopic so perhaps better to move it to my thread here on the forums.