Solved

play sounds through modem

Posted on 2006-06-27
6
331 Views
Last Modified: 2013-11-13
Hello

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
jculkincys
0
Comment
Question by:jculkincys
  • 2
6 Comments
 
LVL 24

Accepted Solution

by:
slyong earned 250 total points
ID: 16998150
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 (http://alpha.greenie.net/vgetty/).  Depending on your ditro, you might want to get the binary version.  For example the rpm can be found as mgetty-voice (http://rpmfind.net/linux/rpm2html/search.php?query=mgetty-voice).

2) Once that is installed, you need a Perl Module called Modem::Vgetty.  You can get it via CPAN or RPM (http://dries.ulyssis.org/rpm/packages/perl-Modem-Vgetty/info.html).

3) Next, a Perl script to dial out and say something into the modem can be found here: http://www.webreference.com/perl/tutorial/14/2.html.  Take note that you actually run the command "vm shell -l ttyS0 -S simple_alert.pl" 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: http://uphone.org/diy/wavtormd) to convert from wav into rmd which is what vgetty need:

#!/bin/bash
#converts wav file to rmd  
#making sure wav file is
#8000khz and mono
#echo which .wav file would you like to convert to .rmd?
#read WAVNAME

# 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
0
 
LVL 2

Author Comment

by:jculkincys
ID: 17000615
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?
http://www.newegg.com/Product/Product.asp?Item=N82E16825152001

FYI:
I don't need to record sounds, just play them.
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 250 total points
ID: 17001525
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.

http://www.newegg.com/Product/Product.asp?Item=N82E16825137111

http://www.3gplaza.com/estore/control/Computer3G/productdetails?id=48035 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.

http://www.newegg.com/Product/Product.asp?Item=N82E16825131003

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

http://www.newegg.com/Product/Product.asp?Item=N82E16825131005

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

(   (()
(`-' _\
 ''  ''
0
 
LVL 24

Expert Comment

by:slyong
ID: 17004402
Hi jculkincys,

I am not sure about the modem from neweggs.  This is a list of modems that are testing with vgetty http://mgetty.greenie.net/modembase/bin/overview.pl?language=en look for the voice capability with *****
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Among others, I monitor the Windows Installer zone and Installer zone. I find that many of the questions could be answered much more quickly if a Windows Installer verbose log were submitted with the question.   However, I do not always have t…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now