This idea was come my mind when forgot freezer open , and temps rise and that's not good so. what we need so we get talking nethome.
1. buy some speakers which connect 3.5mm jack.
2. apt-get update and apt-get upgrade
3. apt-get install mplayer
My self I buy 10 euros Samsung active speakers which take power usb , and has 3.5mm jack.
second I look google some idea how raspi can talk and find way use google translate speech via raspi command line and look this is so simple. here is sh scripts which talk my freezer temp out as speakers.
Code: Select all
!/bin/bash
lampo=$(cat /onewire/devices/10.68F1D8020800/temperature)
lampo=$(printf "%.1f" $lampo )
lampo1=${lampo//./,}
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=fi&q=$*"; }
say $* $lampo1
first variable is my freezer temp what I read cat command.
second variable convert temp only 2 decimal
3 variable change . , because finland speech we use , not .
first say line is google url which play answer via mplayer.
there is end of line section tl=fi change this en and you get English speak.
google accept only 100 bytes data so you cant talk whole book or log .
Enjoy and listen how your nethome talk for you