Playing sound files on the Debian Slug
1) Have the Slug report temperatures etc verbally
2) Perhaps play music from a list
I use this USB sound device - Listed on eBay UK as
"USB 2.0 3D AUDIO SOUND CARD ADAPTER FOR PC / LAPTOP UK"
About £3.50 including postage - UK sourced.
There are many complex "help" pages on the Net that assume you
are expert in Linux. However the following seems to be sufficient.
The driver for the above USB device is built in - It is recognised by the system.
To Play .wav files
On a terminal type -
apt-get install alsa-utils
apt-get install alsa-base
aplay 100.wav 30.wav 8.wav - this plays the 3 wav files in sequence
apt-get install sox
To play MP3 files
apt-get install madplay
apt-get install mpg123
mplayer plays .wav files but not MP3
MOC Music on Console
apt-get install moc
mocp loads the screen into the terminal display (ssh not ttyS0 on RS232)
it says it needs ncurses - not sure if it loads ncurses itself
I did apt-get install libncurses5-dev
Not sure now which added ncurses... - but it is present
The ssh terminal screen is almost GUI - easy navigation and play
Text to speech - "flite"
apt-get install flite
flite -t "words to speak "
flite -t greenhouse
flite -t 4567
flite -t "hello my friend" -o hellofriend.wav
flite man pages - contain -
Output flite version number.
Output usage information.
Explicitly set output filename.
Explicitly set input filename.
Explicitly set input text string.
Explicitly set input text string and synthesize as phones.
-s, --set FEATURE=VALUE
Set feature (guesses type).
Set int feature.
Set float feature.
Set string feature.
Text to speech - "espeak"
apt-get install espeak
espeak -h gets help
LKG8A6E00:/# espeak -s 140 "The greenhouse temperature is 45.6. It is very hot."
Expression 'ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 390
despite the error it runs well "- s 140" sets speed a bit slower than the default 160