No sound from Mycroft but mpg123 works fine

Raspberry Pi image install:

Mycroft responds on the command line to the microphone, so that works OK. I can run mpg123 with a radio stream, no problem. No sound from Mycroft. To be sure, I ran:
pactl list short sinks
and from that list I ran:
pactl set-default-sink 0
(0 being the appropriate USB sound card option). mpg123 still working. Tried a reboot, still not a peep from Mycroft, no ding, no nothing.

Any suggestions of what to pursue next, please!

Out of curiosity, does it respond when you ask the time, specifically? I’m having some trouble with TTS, but I’ve only just started troubleshooting. Don’t even know if it’s at my end yet.

Hey there, welcome to the Forums :slight_smile:

You mentioned this is a USB sound card and mpg123 is working from the commandline. I would try setting the play commands in your Mycroft configuration:

Details here:

ChanceNCounter: Not tried the time as yet, but it responds in text to the weather but no sound :frowning:

gez-mycroft: Thanks for the advice. I followed the link. I have got a bit further. I did the ‘audiotest’. It recorded to /tmp/test.wav. I played it back using ‘aplay’. The volume was very low compared to running mpg123. So I upped the pulse audio volume to 500% and then the volume was about the same. Mycroft doesn’t play back the audio in the audiotest. So, now I am thinking that Mycroft has the wrong sound device set. It certainly isn’t using the default pulse audio device.

I just did a minor revamp of the Troubleshooting docs so things might have moved over the last 24 hours. Checkout the audio troubleshooting page.

To use pulse for output I think you want the play command to be: paplay rather than aplay

gez-mycroft: I looked at that and, the suggestion about missing out the arguments for aplay and mpg123 in the configuration was something I was about to try. Yes, that worked. I tried, unsuccessfully to find out exactly what -Dhw:0,0 meant. I’m guessing that one of the zeros refers to the reference of the device, 0 in my case being correct. However, if the other zero is volume then that would explain why nothing is heard. Anyway, all working now thanks. Now the experimentation starts!

I believe the numbers refer to the card number and device number

If you run:

aplay --list-devices

You will receive a list of the devices registered with ALSA and you can see the card and device numbers in the output eg:

**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Maybe this helps (last post):