Microphone issues

Hey there,

I finally found the time to assemble the Mycroft AI Dev Kit. Camera, speakers, fan, touch screen are all working fine. However, I get no reaction on any “Hey mycroft” command.

Where is the microphone located on the Mark 2 dev kit? Could I have missed an essential cable?

Debugging steps that I did via ssh:

  1. Interact with mycroft via mycroft-cli-client → works
  2. Try to record and playback some sound: “arecord -d 5 test-mic.wav” followed by “aplay test-mic.wav” → no output
  3. Check alsamixer → microphone on full volume
  4. Try to create a loopback with “pactl load-module module-loopback” → no output
  5. Try to record and playback: “hey mycroft, record for 1 minute” (“Recording audio for fifty nine seconds”) “hey mycroft, play recording” (answer: “Just one moment while I look for that” and then in a different voice: “Sorry, I don’t know how to play recording”)

Am I missing something? Are there other debugging steps I could take?

PS: Not sure if its worth to create different threads for these things. When I write “hey mycroft” in the cli Mycroft gives me a description of the Google assistant. What’s the point of this?

the daughter board that plugs into the pi with the led’s is the also the mic board.

The LEDs work fine and everything else but the microphone operates fine. So, I don’t think this can be the daughter board.

I went through the site: Audio Troubleshooting - Mycroft AI

I don’t recognize anything out of the ordinary. Any ideas?

I ran some debug scripts to get more info. Just for the record.

Script: http://www.alsa-project.org/alsa-info.sh
Alsa Log: upload=true&script=true&cardinfo=!!################################!!ALSA In - Pastebin.com

Script: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info
Pulseaudio: ________________> pulseaudio_ps_domycroft 221 0.0 0.7 1144424 14456 ? - Pastebin.com

Unfortunately, I am not knowledgeable in this domain to know what the data means. Anyone?

Make sure you do not load this module;

module-suspend-on-idle

(Your sources are suspended)

Also make sure that you use parecord en paplay commands as the arecord and aplay are alsa based. Alsa grabs the card and occupies it so other programs can’t use it.

Or if you want to use arecord, make sure all mycroft services are stopped otherwise mycroft occupies the card and arecord doesn’t work because of it.

Hi j1nx,

thanks for your answer.

So, few things that I noticed.

First, all sources listed with pacmd list-sources end on “-fallback” (e.g., alsa_input.platform-asoc-simple-card.0.stereo-fallback). This seems odd. I think there should be a regular “alsa_input.platform-asoc-simple-card.0.stereo”.

Second, when I try to record with this device with

parecord --channels=1 -d alsa_input.platform-asoc-simple-card.0.stereo-fallback test.wav

Then, I get a file with 4 kbytes independent of the duration of the recording. In contrast, when I record alsa_input.platform-asoc-simple-card.0.stereo-fallback.monitor the file grows to hundreds of Kb quickly.

Third, I was also able to play a sound with stereo-fallback, record it with stereo-fallback.monitor and then play the recording. So, I don’t think that mycroft blocks audio access.

Fourth, I find no information on the microphone in dmesg:

dmesg | grep -C1 -E 'ALSA|HDA|sof|HDMI|snd[_-]|sound|hda.codec|hda.intel'
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] software IO TLB: mapped [mem 0x27000000-0x2b000000] (64MB)
[    0.000000] Memory: 1621500K/2018304K available (9788K kernel code, 1110K rwdata, 2872K rodata, 1088K init, 1131K bss, 134660K reserved, 262144K cma-reserved)
--
[   44.901403] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI fe203000.i2s not registered - will retry
[   44.919325] asoc-simple-card asoc-simple-card.0: snd-soc-dummy-dai <-> fe203000.i2s mapping ok
[   44.919335] asoc-simple-card asoc-simple-card.0: ASoC: no DMI vendor name

To me, the most likely cause is an hardware problem. After all, I have used the default image and haven’t done any changes yet. If all the LEDs etc are working, then I’d guess that the daughter board is connected correctly. So, my I assume the damage must be on the daughter board.

I’ve reinstalled the same image. Still no microphone.

Hey sorry, I missed this thread before.

I’ll follow up via email but I wanted to flag for anyone finding this in the future that the usual Audio Troubleshooting guide won’t work for the Mark II. It was written for general Linux installations.

Hopefully we can work out what’s going on with your mics though.

Edit: I’ve added some warnings and links to the troubleshooting pages specifically for the Mark II

After many many further unsuccessful attempts, I thought I’d use a USB mic just to workaround the issue for now. Turns out that the MyCroft image doesn’t pick up on USB devices (at least both my mic and my phone).

I’ve also installed a vanilla Ubuntu on the Dev Kit. Then, the USB devices work, but I have no clue how to set up the daughter board. So, no speakers and no microphone.

So yeah, I am completely confused now. Does Mycroft block USB devices? Why?