This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Enterprise Applications

OSS helps give voice to beach condition reporting system

By Robert D. Currier on June 19, 2007 (3:01:00 AM)

Share    Print    Comments   

Mote Marine Lab in Sarasota, Fla., has enjoyed great success with its Google Maps-based beach conditions reporting system. Covering the six public beaches of Sarasota county and operational for eight months, the system receives 1,200 hits per day and is regularly mentioned by local media. Pleased with the publicity, Mote scientists made plans to expand the coverage to Manatee and Collier counties. What they didn't realize was that the original design didn't provide easy access for a small but significant portion of the public: people who don't own computers.

Designed to give residents and visitors twice-daily red tide updates for local beaches, the reporting system uses Google Maps as its user interface, making access to a computer and the Internet mandatory. While initial comments were enthusiastic, Mote researchers heard concerns about access from a vocal group of people who didn't own a computer or have Internet access. As the designer of the system, I was asked to find a way to make the beach reports more accessible.

How do you make an Internet-centric reporting system easily accessible to non-computer users? By taking advantage of unused hardware and open source software. We used some shell scripts, a mothballed Multitech MT5600 modem, two applications written in Tcl, and vgetty, an open source utility that turns a compatible modem into a telephone answering machine.

Why didn't we choose an established open source PBX package like Asterisk? Money. Despite the comments we received, we were uncertain what level of calling volume we would have. Until we could justify a system with a higher cost, we elected to test the waters with a simple, low-cost configuration.

If your system doesn't have vgetty, you can download it. If you prefer not to build from source, you can install the mgetty-voice package using the appropriate package manager. Vgetty is included in most current Linux distributions as part of the mgetty+Sendfax package.

Hearing voices

The beach reporting system stores its data in a MySQL database. We wrote an application using Tcl and the mysqltcl library that extracts the latest beach condition data for each location and writes it out to a text file. Appropriate text is added to the raw database fields to make the message more understandable when being played. "Surf: calm" becomes "The surf is calm." We continue to make ongoing adjustments to the text content based on feedback from the public.

Next, we have to convert the text into an audio file. We explored several voice synthesis products, and settled on the "Callie" voice from Cepstral. Cepstral's product is not open source, but the high level of audio quality and the flexibility of the lexical dictionary made it worth the we paid.

Two of the beaches we monitor have unusual names: Manasota and Nokomis. Out of the box, Callie pronounced "Manasota" as "Minn-uh-so-ta" and "Nokomis" as "no-ko-Mees." With a quick edit of Callie's lexicon file we were able to achieve the correct pronunciations of "Mann-uh-So-ta" and "no-Ko-miss."

Vgetty requires that the format of the voice file match that of the modem. To modify the Cepstral-generated WAV files, we used the pvftool package that's included with the mgetty+Sendfax distribution. We use pvfspeed to drop the encoding speed of the WAV file to the required 7200bps, and pvftormd to transform the data to a Rockwell-compatible modem format. Our voice response system updates every hour, so we wrote a short shell script to automate the process and added it to our list of cron jobs.

To complete the system we needed to write an application that would play a standard greeting and interpret the DTMF tones generated when users pressed keys on their telephone. Vgetty makes this easy. The default configuration uses a script called voice.conf to handle communications with the vgetty's voice library. Substituting your own script gives you full access to the vgetty voice library through the file descriptors $VOICE_INPUT and $VOICE_OUTPUT.

Our Tcl application is a simple event loop that waits for the voice library to signal an incoming call. When the modem answers, the voice library plays a greeting that lists all the beaches being monitored and then waits for DTMF tones. When a tone is detected, the library passes the numerical value of the key pressed to the application via the $RECEIVED_DTMF variable. The matching voice file is then played, and the application returns to the main event loop until the user hangs up.

Surf's up

The voice response system has been in use for about six months, and during that time there hasn't been a significant red tide bloom, so we anticipated very little usage. We were surprised to find that we were averaging about 20 calls per day. What was going on?

When we developed the audio beach reports our target audience was members of the public without computers or Internet access. Ironically, anecdotal evidence suggests that the biggest users of the new system are full-fledged members of the wired world: cell phone owners. It turns out that the ability to make a quick phone call and get surf conditions and wind direction is handy for surfers and last-minute beach goers.

Although we were surprised by the results, we are pleased with the performance. Twenty calls per day isn't a blistering load, but vgetty and Cepstral Callie have run continuously without a failure. As red tide season approaches, we expect to see the call volume increase significantly. When that happens, it will be time to take another look at Asterisk and some professional telephony hardware. Until then, we'll just let Callie take your calls.

Bob Currier is a data technology specialist at Mote Marine Laboratory in Sarasota, Florida. He recently retired from a 20-year career at Duke University, where he served as director of data and telecommunications. His credits include features, reviews, and opinion pieces in Network World, ITWorld.com, Smart Computing, and PC Computing.

Bob Currier is a senior data engineer at Mote Marine Laboratory in Sarasota, Florida, where he manages a Linux server farm and writes code for a fleet of autonomous underwater vehicles. He is the author of more than 100 features, reviews, and opinion pieces in Linux.com, Network World, ZDnet.com, Smart Computing, and other trade publications.

Share    Print    Comments   

Comments

on OSS helps give voice to beach condition reporting system

There are no comments attached to this item.

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya