Solved

play sounds through modem

Posted on 2006-06-27
6
326 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

One of the most frequently asked questions on EE in the "Windows Installer" zone is how to eliminate self-triggered installation of some product.  The problem occurs when, suddenly, whenever a certain application is launched, or even when a folder i…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

18 Experts available now in Live!

Get 1:1 Help Now