Has anybody setup a USB Sound device so WAV files can be played from a shell script?
I have done some searching but can not find what I am looking for. Most people seem to be using their USB Sound device to play music. I need to play WAV files and/or Text to speech. Most things I have found assume you are running X11 and are/or using a music player of some kind. I need to be able to put a command in a shell script. An example I found was:
aplay -Dpulse ring.wav
But I get the follwowng error:
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused
aplay: main:608: audio open error: Connection refused
I have tried to run pulseaudio --start
But that complains it should not be run as root. If this needs to be put in a rc script, it will probably fail there since it will be running as root.
So what have others done to get alsa and pulseaudio running so command line calls can be made to play WAV files?
I need to know what packages to install via pacman and what to put in configuration files and how to make it start at boot time.