MycroftAI / enclosure-picroft

Mycroft interface for Raspberry Pi environment
https://mycroft.ai/documentation/picroft
GNU Lesser General Public License v3.0
803 stars 191 forks source link

usb audio speaker output not working with picroft on pi3 #64

Closed schuylerfried closed 5 years ago

schuylerfried commented 6 years ago

When I follow the standard procedure listed for setting up a usb speaker:

Typically the USB audio should be connected to hwplug:1,0 but to verify run the following:

aplay -L

Find the hwplug output for the device you want to use, take this and update the >/etc/mycroft/mycroft.conf file accordingly:

"play_wav_cmdline": "aplay -Dhw:0,0 %1" this line now becomes "play_wav_cmdline": "aplay ->Dplughw:1,0 %1"

You can now run ./auto_run.sh to start the program back up and test and ensure the output comes >through the USB speakers.

When I run aplay -L, I see a device at slot Device_1,0

plughw:CARD=Device_1,DEV=0 USB2.0 Device, USB Audio Hardware device with all software conversions

I can get a test waveform to play on said USB device through running the command aplay -D plughw:Device_1,0 /usr/share/sounds/alsa/Side_Left.wav. However, when I replace the play wav command... hw:0,0 line in /etc/mycroft/mycroft.conf with plughw:Device_1,0, audio still plays out the audio jack.

Here is a copy of the two audio output lines in the .conf file:

"play_wav_cmdline": "aplay -D plughw:Device_1,0 %1", "play_mp3_cmdline": "mpg123 -a plughw:Device_1,0 %1",

Additionally, when I ran auto_run.sh, I noticed a line that said:

20:26:07.427 - mycroft.configuration.config:load_local:124 - DEBUG - Configuration /home/pi/.mycroft/mycroft.conf not found, so I tried copying the .conf file to /home/pi/.mycroft to see if that would solve the problem, but still nothing out of the USB speaker.

Any suggestions?

janz93 commented 6 years ago

FYI: Currently, inside that mattermost chat there is a discussion that there are problems to get the 2018-03-14 image to work with USB, Bluetooth or HDMI. @penrods is currently working on creating a new image.

krisgesling commented 5 years ago

Hi @schuylerfried, just reviewing some issues that have been open for a while. Did you manage to get your USB speaker working?

For now I'll close this issue as over the last few months we have improved the usb audio configuration considerably. If you do need a hand though just let me know either here or in the Forums.