Projects Using the DECTalk Speech Synthesizer

DECTalk is a standalone speech synthesis box that currently lives in 481 Horticulture, attached to a 486 PC running Win 95. The PC communicates with the DECTalk box via serial lines; the DECTalk box, in turn, has a phone line (2-4264 or 800-236-4264). A program running on the PC manages the input over the phone line, allowing callers to select reports with their touch-tone pad.


Inputs (data sources)

Intermediates (programs and files

Outputs (products)

Maintenance: shutting down and bringing up for the season


ET Reports

ET reports are produced each night by the AWSWAIT.PL reporting system. I'm afraid I'm a leetle bit sketchy on where they come from.

Cranberry Frost Forecast

Cranberry frost forecasts are produced several times each day by Martha's system. The text forecast files are parsed by CRANTALK, whose source lives in \\bob\~wayne\cranberry. These forecasts, along with observed data stored in the miniSQL database ("cranberry", table "observed") on Bob, are assembled into DECTalk scripts by CRANTALK. The result is a file called "cran.rpt" in \\bob\~anderson\public_html\cranberry. A shell script, \\bob\bill\products\sh\sendcrantodectalk.sh, then uses FTP to transfer the result to the DECTalk PC.

Missing data: any value less than or equal to -150.0 in the forecast.log file will be spoken as "missing" by DECTalk.

Source Code

Source for the overall PC program, DECTALK.EXE, lives in theVersions revision-control system which is on \\leela\shared. The main file is DECTALK.PAS. Use Turbo Pascal 6.0 to compile it; a ZIP file with that software is on ipm-south.hort.wisc.edu\d$\Dev_tools\Borland(non-Java)\Bp6.

CRANTALK source is in \\bob\~wayne\cranberry. Crantalk.c is the main one; cransql.c and cransql.h define the interface to the miniSQL database, and also provide some names for the sites and such.

The Menu Structure: RPTINFO.TXT

Every time the DECTalk program starts up on the PC, it reads a file in the same directory called RPTINFO.TXT. This file contains a comment line, then a series of three-line tuples. Each set of three lines describes a report: the name of the report, the filename which contains is (which is in the RPT subdirectory of DECTalk), and the identifying string for accounting information. (Note: the first item isn't used for anything, though it could be; the names of the reports are currently in MENU.RPT). There can be a maximum of 9 different reports. When DECTalk starts talking to a caller, it reads them a file named MENU.RPT, which should describe the available reports. The key the caller presses to select a particular report depends on its position in RPTINFO.TXT; the first set of three lines there describes the report you get when you press 1, the next three lines are for 2, etc.

To create a new report:

  1. Edit MENU.RPT. Add a line for the new report.
  2. Edit RPTINFO.TXT. Add three lines: the name of the report, the file name which will contain it, and the description which is to appear in the accounting info.
  3. Create the new report in the RPT directory. You can refer to \\bob\bill\products\sh\sendtodectalk.sh for details on how to FTP up a file; the appropriate user and password lets you copy a file right to the RPT directory. NOTE: lines in the file must be relatively short, and must end with a period (see the comments at the start of the source code for details!)
  4. From the DECTalk PC, end the DECTalk process by closing its MS-DOS window. Then double-click the SUBMIT.BAT icon on the desktop. This will restart the program, causing RPTINFO.TXT to be reread.

MENU.RPT

This file is read to each caller (though it can be bypassed, see "How to Use" below). It usually contains a "hello" message, instructions on how to obtain each report, etc.. Note that the program prompts the user 3 times to press a key; if it doesn't get one, it just reads all the reports.

Reports

These live in the RPT directory. They can be straight text, or you can use the DECTalk documentation to spruce them up a bit (yeah, you try getting a 14-year-old synthesizer to pronounce "Manitowish" correctly!). The filename should be listed in RPTINFO.TXT.

Accounting

Each call to DECTalk is logged in RPT\DECUSED.TXT. The log line contains the report name (the accounting info from RPTINFO.TXT), and the date and time of the call. If the user doesn't press a key, "All" is given as the report name.

How To Use DECTalk

When DECTalk answers the phone, you'll hear a beep, a welcome message, and another beep. After either beep, you can press the appropriate number on your touch-tone keypad to select the report you want; by pressing it right after the first beep, you skip the info in MENU.RPT. If you press nothing, the program will tell you that no keypress was detected, and prompt you to try again. It repeats that message twice, then plays every report described by RPTINFO.TXT.

Shutting Down For The Season

The easiest way to shut down DECTalk is to edit MENU.RPT and RPTINFO.TXT to, respectively, inform the user that services have been suspended, and that no files are available. (RPTINFO.TXT must contain 1 line, but that can be anything; I suggest "shut down for now" with your initials and the date). This will keep people from running up long-distance bills by punching up all reports. Likewise, to bring down one service, you can edit it out of RPTINFO.TXT and edit MENU.RPT to match, or just edit the corresponding report in the RPT directory. You should look for the automated file-copies in \\bob\bill\products\pl\awswait.pl and ~anderson\cranberry\pl\cranwait.pl, and consider shutting them off too. Don't forget to shut down and restart DECTALK.EXE on the PC, so that the new RPTINFO.TXT info is reread.

Bringing DECTalk Back Up

Uncomment any shut-off file-copy services in AWSWAIT.PL and CRANWAIT.PL. Edit MENU.RPT and RPTINFO.TXT to reflect the current state of the reports. Shut down and restart DECTALK.EXE on the PC, so that the new info is reloaded into the running process. Dial 2-4264, test the reports, and away you go!