Mycroft Community Forum

No audio output on Picroft

I’m using a ReSpeaker 6-mic array with a Raspberry Pi 3 Model B V1.2. I downloaded the latest Picroft image but the ReSpeaker wouldn’t work (silent test recordings, no mic level in Mycroft CLI), so I had to install the modules using the instructions here:

I was then able to record and play back audio using the following commands:

$ arecord -Dac108 -f S32_LE -r 16000 -c 4 test.wav
Recording WAVE ‘test.wav’ : Signed 32 bit Little Endian, Rate 16000 Hz, Channels 4
^CAborted by signal Interrupt…
(.venv) pi@mycroft:~ $ aplay test.wav

ETA - this also works if I just type in ‘arecord test.wav’

Mycroft now shows mic input and responds to the wake word and commands, but there is no audible output. When I run the mic test, I get the following error when it tried to play back what was recorded:

ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
aplay: main:788: audio open error: No such device
An error occured while playing back audio (1)

It would seem that Mycroft is not using a valid sound card for the output. I used the following troubleshooting guide to try and resolve this:

I set both the input (source) and output (sink) and then rebooted the Pi, but it didn’t make any difference.

Thanks in advance for any help!

Aha! I found the solution here:

My mycroft.conf now looks like this, and it works perfectly!

{
“play_wav_cmdline”: “aplay %1”,
“play_mp3_cmdline”: “mpg123 -a %1”,
“max_allowed_core_version”: 19.2
}

1 Like

Does it respond to the wakeword when music is playing? In other words, does it actually implement the echo cancellation sufficiently well to hear you across the room? This is basically why I stopped working on mycroft - I found it unusable without echo cancellation.

I haven’t got music playback working yet, but I’ll test this once I have.

Does it work now? Did you able to fix the audio-playback issues?