play sounds through modem


what the best/easiest way to play sounds through a modem.

Current we have a monitoring system that can run scripts when an event happens - like a failed ping. I want to make a script that does something like this

echo "atdt15554443333" >/dev/modem
#we might have to loop this a few times - since it will be hard to tell if the person has picked up
echo "System Down" | festival > /dev/modem
echo "+++ath0" >/dev/modem

Ideally I would like to use festival's text to speech capabiliy but I could deal with piping an mp3 as well.

Thanks for your help in advance
Who is Participating?

Improve company productivity with a Business Account.Sign Up

slyongConnect With a Mentor Commented:
Hi jculkincys,

There are pieces to glue the solution that you want together.  However, I know of it but never really try it myself and might not be able to guide you through fully.  This is what you need:

1)  First piece of puzzle is that you need vgetty (  Depending on your ditro, you might want to get the binary version.  For example the rpm can be found as mgetty-voice (

2) Once that is installed, you need a Perl Module called Modem::Vgetty.  You can get it via CPAN or RPM (

3) Next, a Perl script to dial out and say something into the modem can be found here:  Take note that you actually run the command "vm shell -l ttyS0 -S" to call the Perl script but not running the Perl script direct.

4) Final piece of the puzzle.. you need to use Festival TTS, you can use text2wave in Festival to convert first the text file into wav.  You can either hack up the whole thing into the Perl script in (3) or using another bash script.  This is a script (ref: to convert from wav into rmd which is what vgetty need:

#converts wav file to rmd  
#making sure wav file is
#8000khz and mono
#echo which .wav file would you like to convert to .rmd?

# text2wave first...
if [ -z "$1" ]; then echo "usage is: texttormd textfile" exit fi
text2wave $1 -o tmp_text2wave
WAVNAME=$1 sox -v 2 tmp_text2wave -r 8000 -c 1 temp_$WAVNAME
wavtopvf temp_$WAVNAME | pvfspeed -s 8000 | pvftormd US_Robotics 1 > $WAVNAME.rmd  

# remove .wav suffix
NAME=$(echo $WAVNAME.rmd | sed -e "s/.wav.rmd/.rmd/")
mv $WAVNAME.rmd $NAME rm temp_$WAVNAME

# play thru modem
# vm play -s -v $NAME.rmd

Good luck.. and hope this gives you some help
jculkincysAuthor Commented:
Alright thanks alot I will look into all of that.

One quick follow up -
Do you think this modem would be capable of accomplishing this?

I don't need to record sounds, just play them.
pjedmondConnect With a Mentor Commented:
Looking at the spec, I'd have thought it would......(Important point is here to have a PCI modem or external modem that does the signal processing on the board. ***Avoid*** any PCI board that says "soft-modem"!! **avoid**any that say windows drivers only, **avoid** any that say anything about the main CPU controlling the data flow) rather than the cheap 'cut down' cards that require the processor to do much of the work.

However, from the feedback at the bottom of that page, I'd steer clear of it, and spend an extra $5 on a reputable brand. for further details - should manage 8KHz sampling

appears to have the necessary functionality, but you need to be really careful, as many of them are cut down versions which require the CPU to do some of the necessary work. A number of the $10-$20 modems also appear to have the necessary on-board controllers, but remarkably, many of them are still 'winmodems'.

If you're paying $6 for the delivery, you might as well get a decent modem. To be 100% sure that you've got a 'hardware modem' then you should buy an external modem.

seems to be recommended for this type of thing in a number of Linux forums, and:

should also be fine. Generally if they say that they have a 16550/A Compatible UART, then they should be fine for your needs.

(   (()
(`-' _\
 ''  ''
Hi jculkincys,

I am not sure about the modem from neweggs.  This is a list of modems that are testing with vgetty look for the voice capability with *****
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.