Mycroft Community Forum

Picroft - No sound with 3.5mm jack output

Hello,

I’m trying to set up a Picroft on a Raspberry Pi 3B with a PS3 eye and a speaker connected with a 3.5mm jack. The microphone is working fine but I have no sound… Can someone help me?

Rémi

What have you tried so far? What was the result of that effort? What’s in the logs (/var/log/mycroft/*)?

I tried to change the default sink (because it offers me two) as shown in the Mycroft AI Audio Troubleshooting guide and I also tried to configure the sound output of the rapsberry (with the raspi-config menu) so that it uses headphones. But nothing worked, no sound comes out…

I have tried what is shown on this page (https://windowsreport.com/raspberry-pi-audio-not-working/) and I have some sound when I run “./hello_audio.bin”. But when I try something like “speaker-test -c2 -twav” (as recommended here https://www.tinkerboy.xyz/raspberry-pi-test-sound-output/), I have no sound…

Do you think this is a problem with playing .wav?

Is PulseAudio installed/used or plain ALSA? I.e. by default, Mycroft uses paplay to play wav files, so that would be a test that is coming closer. You say microphone is working fine, so you could try:

cd /tmp
arecord -d 3 test.wav # Then make some noise for 3 seconds
paplay test.wav
aplay test.wav # just to test plain ALSA as well

raspi-config btw produces the following asound.conf override for the current user (~/.asoundrc):

pcm.!default {
  type asym
  playback.pcm {
    type plug
    slave.pcm "output"
  }
  capture.pcm {
    type plug
    slave.pcm "input"
  }
}
pcm.output {
  type hw
  card $AUDIO_OUT
}
ctl.!default {
  type hw
  card $AUDIO_OUT
}

AUDIO_OUT is set to the sound card ID selected. As you said there were two, most likely those were HDMI sound on ID 0 and “headphones” (=3.5mm jack) on ID 1.

I played around with ALSA configs and Mycroft in the past (and do just now again) and I’m not sure whether the “asym” plugin is such a good idea here. You could test instead (cat for copy&paste to console):

cat << '_EOF_' > ~/.asoundrc
pcm.!default {
  type plug
  slave.pcm {
    type hw
    card 1
  }
}

ctl.!default {
  type hw
  card 1
}
_EOF_

Try card 0 as well, if the above does not work, or verify which ID is which card via aplay -l.

But as you see this is all about ALSA, while I have not really an idea how PulseAudio acts on top of that.