Topic: talking alarms?
I looked so I guess it doesn't exist. It would be so great to have scheduled alarms with programmable messages that are "read" aloud. Would be amazingly helpful for me but it doesn't seem to exist. Any ideas?
You are not logged in. Please login or register.
chumbysphere forum → Widgets → talking alarms?
I looked so I guess it doesn't exist. It would be so great to have scheduled alarms with programmable messages that are "read" aloud. Would be amazingly helpful for me but it doesn't seem to exist. Any ideas?
Well, it can be done with some hacking.
A while back, on a lark, I ported one of the common text->speech systems (I think it was Festival Lite) - it was a pretty easy port, but unfortunately I didn't save the instructions. Combine that with the "custom alarm actions" that are documented on the wiki, then you could do it.
do you have a link to festival light?
another thought, depending on what you want the talking alarms to say, would be to just record what you want with the chumby mic, then using the custom alarms, just play back the resultant wave files, this, assumes, of course, you only had a set number of things, not dynamically changing.
Two talking clocks exists at this moment: Talking Clock and Rectangular Talking Clock. I know these do not do what you are wanting. However, maybe you can talk one of them to make some enhancements. In the first case, they have already built flite (text to speech) that works great on the Chumby. I would guess that you may even be able to use existing items to "read" text to you at specific times.
Here's something else to try - use the Google text-to-speech engine:
1) Create a My Streams MP3 entry with the URL:
http://translate.google.com/translate_tts?tl=en&q=wake%20up%20lazy%20bones
2) Set an alarm to play that stream
I haven't tried it, but if it works, you should be able to change the text to say whatever you want, making sure you properly escape punctuation (ie use "%20" for spaces).
Duane, did your port of Flite work on an Infocast? The Talking Clock app doesn't speak on my Infocast.
I never tried it on the Infocast - this was done a couple of years ago on Ironforge.
Alas. I'm getting the error
audio_open_alsa: failed to set sample rate near 16000. Invalid argument.
When I run the flite executables. flite_time displays the text it would have said, then throws the error.
Have you seen this alsa error before?
By the way Duane, I tried translate.google.com in My Streams and it works great. When I tell the custom alarm to play the stream, it just does a "beep-beep-beep" style alarm. Maybe I did something wrong, but do not see what I could have done.
Any help with this Duane?
Alas. I'm getting the error
audio_open_alsa: failed to set sample rate near 16000. Invalid argument.When I run the flite executables. flite_time displays the text it would have said, then throws the error.
Have you seen this alsa error before?
What binaries were you trying to run? I cross-compiled flite and it seems to work fine on one of my c1s, but not my other one.
alsa-lib:
./configure --host=arm-linux --disable-python --prefix=$(pwd)/install; make; make isntall
flite:
export CFLAGS=-I$(pwd)/../alsa-lib-1.0.24.1/install/include
export LDFLAGS=-L$(pwd)/../alsa-lib-1.0.24.1/install/lib/
export LIBS=-lasound
./configure --host=arm-linux --prefix=$(pwd)/install --with-audio=alsa
make && make install
That ran fine on my c1 at home (that i use for mostly dev stuff), the voices are somewhat robotic sounding, but everything works fine with alsa on mine. Then, my c1 at work doesn't work. I get:
oss_audio: failed to open audio device /dev/dsp
My first build I didn't grab alsa-lib and it defaulted to an oss build which worked, only after killing the flash player since it had a hold on /dev/dsp.
Can anybody shed some light on the difference between 1.0.7 (broken) and engineering_regression_1.0.2726 (working) and why that engineering version wouldn't be updated automatically? I suspect I put the custom firmware on there for the ntpd time drift months ago, but assumed it would update itself to newer versions as they were released.
Another point of fact, I don't show anything opening /dev/dsp, (no lsof, but using "ls -l /proc/*/fd | grep dsp") and that's for OSS, which this binary is compiled to use alsa and works on the c1 at home. This is baffling me at this point and time, but I'm new to dealing w/ audio systems in linux.
@MaterDaddy: I first tried the flite files includes with the Talking Clock app, and followed your directions to compile flite from scratch. The Infocast returns the same error:
audio_open_alsa: failed to set sample rate near 16000. Invalid argument.
The control panel was not running.
This is a somewhat old topic, but I found a simple solution for talking alarm.
1) create /psp/cgi-bin/gt :
#!/usr/bin/perl
print "Content-Type: audio/mp3\r\n\r\n";
@lt = localtime();
$t = sprintf("%d:%d", $lt[2], $lt[1]);
$t .= '..%20';
open(T, "/usr/bin/wget -q -U 'Lynx 1.2.3.4' -O - 'http://translate.google.com/translate_tts?tl=en&q=$t$t$t$t' |");
binmode(T);
while (read(T, $buf, 1024)) {
print $buf;
}
close(T);
This script gets MP3 data talking the current time 4 times.
You may change the 'tl=' option for your language.
2) chmod a+x /psp/cgi-bin/gt
3) create a new entry in Music/My Streams:
Name: Thanks Google!
URL: http://127.0.0.1/cgi-bin/custom/gt
Type: MP3
4) use this stream for your alarm.
Hey, thanks for the help! It may be old, but I'm sure someone will eventually stumble across this thread again via a Google search, and they'll be very happy to find your solution
Thanks to satou_takashi for a solution when connected to the Internet.
For my projects, I was trying to get a workable on-board software solution, but ran out of time.
I revised my code to cache MP3 data in order to avoid unintended DDoS attacks to Google :-)
#!/usr/bin/perl
print "Content-Type: audio/mp3\r\n\r\n";
@lt = localtime();
$f = sprintf("/mnt/usb/%d_%d.mp3", $lt[2], $lt[1]);
if (-f $f) {
open(T, $f);
$c = 0;
} else {
open(F, ">$f");
$c = 1;
$t = sprintf("%d:%d", $lt[2], $lt[1]);
$t .= '..%20';
open(T, "/usr/bin/wget -q -U 'Lynx 1.2.3.4' -O - 'http://translate.google.com/translate_tts?tl=ja&q=$t$t$t$t' |");
}
while (read(T, $buf, 1024)) {
print $buf;
print F $buf if $c;
}
close(T);
close(F) if $c;
Please modify "/mnt/usb/" where to save the MP3 files.
After getting enough files, it works without Google text-to-speech service.
chumbysphere forum → Widgets → talking alarms?
Powered by PunBB, supported by Informer Technologies, Inc.