This is the DECtalk PC driver for the Linux kernel, version 0.95 Original 386BSD source: Copyright (c) 1996 Brian Buhrow Rewritten for Linux: Copyright (c) 1997 Nicolas Pitre Maintained by: Nicolas Pitre This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. What it is ========== This is a device driver for the Linux kernel to make use of the DECtalk PC and DECtalk PC2 voice synthesizers from Digital Equipment Corp. Unlike the portable DECtalk Express wich connects to a serial port, the DECtalk PC/PC2 is an ISA card and requires a special driver to access it under Linux. This is what this package is intended to be. Additionnal interaction with the driver is required to get some speech. For example, a package like Emacspeak or any other screen reading software should be used to make a valuable usage of this driver. You can also make your own programs to use this driver. Explanation of how to program it is provided later in this document. Requirements ============ You requires at least the following: * A DECtalk PC or DECtalk PC2 board, * The firmware files that comes with it. The required firmware files for the DECtalk PC/PC2 are: kernel.sys dtpc.dic or dtpcdic.dic lts.exe ph.exe cmd.exe usa.exe Those files are placed in the c:\dectalk or c:\dectalk2 directory by the DOS installation normally supplied with the card. If you don't have those files, you can get them from: http://www.ultranet.com/~rongemma/tips_upt.htm#Updates In time of this writing, the following files are available: pc1v42b.exe for the DECtalk PC pc2v42cc.exe for the DECtalk PC2 You should install the right package on a DOS drive and retrieve the firmware files mentionned above. Compilation and instalation =========================== Edit the makefile to choose the major number you want to use. If you don't know what it's all about, leave it to the default value. To make the binaries, type: make at the shell prompt. To create the device inode (required), type: make dev Note that you must be root to issue the 'make dev' command. Those two commands above are required only the first time. The following files will be created: dtpc.o : the DECtalk PC module driver dtload : the firmware loader dtdemo : a simple demo program Each time the Linux kernel is booted, the dtpc.o module should be loaded into the kernel and the firmware files should be uploaded onto the card. To load the driver module into the kernel, type: insmod ./dtpc.o To load the firmware into the card, you can use the supplied dtstart shell script. It assumes the firmware files are located in the current directory. Type: dtstart Then the DECtalk should speak something like "DECtalk PC for Linux is ready!". Your DECtalk is ready to use! To make a short test, you can do the following: cp README /dev/dtpc0 and it should read this file to you. To make it stop, type: echo "\003" > /dev/dtpc0 The files vermont.txt and hawaii.txt are provided to show a singing demonstration. You just have to copy them into the DECtalk PC device like above and that's it. For a more complete demonstration and testing of the DECtalk PC you can run the dtdemo program wich is mostly the same as the one found with the DOS driver installation. Using the DECtalk PC driver =========================== You can use the DECtalk PC through the device /dev/dtpc0 as well as you would do for a DECtalk Express on a serial port. The same commands are available. The manual on how to program the DECtalk PC/Express and other useful informations can be found at: http://www.ultranet.com/~rongemma/indext.htm The list of DECtalk commands is also normally supplied with the DOS driver installation. You may look for a file like command.txt. Just to show a quick use of the DECtalk PC from the shell, here's how you can listen to this file and get the phonemic translation. Type those three lines or place them in a script: echo "[:log pho on]" > /dev/dtpc0 cat README > /dev/dtpc0 & cat /dev/dtpc0 > phonemes [press CTRL-C when speech ends] And this is only one example ! Usage with Emacspeak -------------------- To use Emacspeak with your DECtalk PC, you should configure it just like if you were using a DECtalk Express except for the device variable. It should look like: DTK_PORT=/dev/dtpc0 You might ear some error messages when Emacspeak starts. This is because the dtk_exp driver sends DECtalk Express specific commands at initialisation time. Don't worry about them. All the rest should go well in general. Unfortunately, it seems that typing echo pronounce extra spaces with some buggy DECtalk PC firmware. I haven't tried Emacspeak a lot myself with the DECtalk PC so any comments are welcome. More specific programming ------------------------- The DECtalk PC device file fakes a serial port. So it blindly accepts some ioctls related to termios. Those are actually ignored but programs written for the DECtalk Express are just happy. The following system calls are supported: open() close() read() write() select() ioctl() See their man pages for details. The O_NONBLOCK flag may be used to avoid blocking reads and writes. Concurrent reads or writes i.e. more than one process writing to or reading from the DECtalk PC device at the same time may give undefined results. The following ioctls are available to user programs in the form ioctl( fd, function, arg ) by including dtpc_ioctl.h: function description -------------- -------------- DTFLUSH Asynchronously flushes speech, arg is ignored. DTFLUSHCHAR Flushes current speech and say character given as arg. DTPAUSE Pauses speech, arg is ignored. DTRESUME Resumes speech, arg is ignored. DTVOLUP Increments the volume by a number given as arg. If arg = 0, default is 5. DTVOLDOWN Decrements the volume by a number given as arg. If arg = 0, default is 5. DTVOLSET Sets the volume level given as arg. You can have a look at the dtdemo.c file for an implementation example. Credits ======= Brian Buhrow : Original 386BSD source on which this driver was based on. Jim Danley : Contributed the Linux 2.2.x port. Nicolas Pitre nico@cam.org May 02, 1999