emacspeak-ss-1.12.1/0000755000175000017500000000000011364603002012327 5ustar jrvjrvemacspeak-ss-1.12.1/CREDITS0000664000175000017500000000101506663643606013372 0ustar jrvjrvThanks to... Bob Gildea for getting me interested in speech output, and for loaning me synthesizers for testing the software. (Bob is blind. I have normal sight, myself.) T. V. Raman who wrote Emacspeak. Jack Chen for contributing the Accent server. Oscar Fernandez for contributing servers for the Spanish Ciber 232 and Ciber 232 Plus synthesizers, and the Spanish PC Hablado notebook. - Jim Van Zandt emacspeak-ss-1.12.1/blurbs/0000755000175000017500000000000011364603002013620 5ustar jrvjrvemacspeak-ss-1.12.1/blurbs/dtpc-ss.blurb0000664000175000017500000000011006622411142016222 0ustar jrvjrvblurb: DoubleTalk PC program: doubletalk tcl: tcl device: DoubleTalk PC emacspeak-ss-1.12.1/blurbs/lite-ss.blurb0000664000175000017500000000007606622411142016240 0ustar jrvjrvblurb: LiteTalk program: doubletalk tcl: tcl device: LiteTalk emacspeak-ss-1.12.1/blurbs/apollo-ss.blurb0000664000175000017500000000007606622411251016572 0ustar jrvjrvblurb: Dolphin Apollo program: apollo tcl: tcl device: Apollo emacspeak-ss-1.12.1/blurbs/hablado.blurb0000664000175000017500000000013106663644552016264 0ustar jrvjrvblurb: Spanish PC Hablado notebook program: hablado tcl: tcl device: PC Hablado notebook emacspeak-ss-1.12.1/blurbs/braille-lite-ss.blurb0000664000175000017500000000011106622411142017636 0ustar jrvjrvblurb: Braille Lite program: braillenspeak tcl: tcl device: Braille Lite emacspeak-ss-1.12.1/blurbs/braillenspeak-ss.blurb0000664000175000017500000000012106622411142020106 0ustar jrvjrvblurb: Braille 'n Speak program: braillenspeak tcl: tcl device: Braille 'n Speak emacspeak-ss-1.12.1/blurbs/dtlt-ss.blurb0000664000175000017500000000011006622411142016237 0ustar jrvjrvblurb: DoubleTalk LT program: doubletalk tcl: tcl device: DoubleTalk LT emacspeak-ss-1.12.1/blurbs/ciber232.blurb0000664000175000017500000000010306663666324016205 0ustar jrvjrvblurb: Spanish Ciber 232 program: ciber tcl: tcl device: Ciber 232 emacspeak-ss-1.12.1/blurbs/tns-ss.blurb0000664000175000017500000000011306622411142016077 0ustar jrvjrvblurb: Type 'n Speak program: braillenspeak tcl: tcl device: Type 'n Speak emacspeak-ss-1.12.1/blurbs/accent-ss.blurb0000664000175000017500000000007406622411142016536 0ustar jrvjrvblurb: Accent SA program: accent tcl: tcl device: Accent SA emacspeak-ss-1.12.1/blurbs/ciber232plus.blurb0000664000175000017500000000011506663644436017114 0ustar jrvjrvblurb: Spanish Ciber 232 Plus program: ciber tcl: tcl device: Ciber 232 Plus emacspeak-ss-1.12.1/OtherSynthesizers0000664000175000017500000000431306724323720016003 0ustar jrvjrv Support for Other Synthesizers I have written servers for the synthesizers I have to test with. I am happy to incorporate into this package servers contributed by others (like the Accent support contributed by Jack Chen). Each server is a Tcl script which reads commands from standard input and writes to the synthesizer. The script has a common part, all.in, and a part like doubletalk.in which is unique to each synthesizer. The unique part must define these five functions, which are called from all.in: tts_initialize Initialize a number of synthesizer-unique elements in the global array tts. For example, set the element tts(stop) to the synthesizer command to immediately stop speech. tts(paul) should be the command for the default voice. tone_command freq dur Return a string containing the synthesizer escape codes to generate a tone of frequency freq (in Hertz, default 440) and duration dur (in milliseconds, default 50). If the synthesizer cannot generate tones, this may return an empty string, or possibly the word "beep". silence_command dur Return a string containing the synthesizer escape codes to pause speech for duration dur (in milliseconds, default 50). rate_command wpm Return a string with the synthesizer escape codes to set the speech rate to wpm (in words per minute). Any rate should be legal. If the user asks for too slow or fast a rate, just set the device to the slowest or fastest supported rate respectively. punctuation_command val Return a string with the synthesizer command to set which punctuation marks are spoken. It should depend on the global variable tts(punctuations), which takes the values "all", "some" and "none". Put these definitions into a file with a name like foo.in in the emacspeak-ss source directory, and add the base name ("foo") to the SERVERS list in Makefile.in . Build and install the new server with these commands: ./configure make make install When you have everything working, send me a copy of foo.in (and README.foo if needed), and I'll add it to the collection. If you find it necessary to change something in all.in, let me know. I'm sure we can come to some agreement. - Jim Van Zandt emacspeak-ss-1.12.1/README.accent0000664000175000017500000000110306663646245014466 0ustar jrvjrv This version is a very first go at this driver, and must be further developed to improve on several of the major features of T. V. Raman's and Jim Van Zandt's drivers. See the TODO file if you would like to help modify this. If you decide to modify this, please contact me...so I can incorporate any changes on future releases. - Jack Chen The serial port is set to 9600 n 7 1, to match the default configuration for the Accent SA. Jack Chen published the accent server here: http://www.research.digital.com/wrl/people/jackchen/accent.html emacspeak-ss-1.12.1/testit0000755000175000017500000000371711206070363013604 0ustar jrvjrv#!/bin/sh # testit - record configuration relevant to running emacspeak # usage: run this script and examine the output file "log.tcl" # author: Jim Van Zandt rm -f log* date >log.tcl uname -a >>log.tcl echo >>log.tcl echo "----- device files: is the relevant file readable and writeable?" >>log.tcl ls -l /dev/ttyS? /dev/dtlk /dev/audio* >>log.tcl 2>&1 echo "current user is `whoami`, who is a member of these groups: `groups`" >>log.tcl echo >>log.tcl efile=`which emacs` echo "----- \"which emacs\" = $efile" >>log.tcl emacs --version | head -1 >>log.tcl echo >>log.tcl efile=`which emacspeak` echo "----- \"which emacspeak\" = $efile" >>log.tcl head -25 $efile >>log.tcl echo >>log.tcl efile=`which tcl` ver=`echo 'echo $tcl_patchLevel'|$efile` echo "----- \"which tcl\" = $efile, which is patch level $ver" >>log.tcl echo >>log.tcl echo "----- exported Emacspeak environment variables" >>log.tcl set | egrep '(EMAC|DTK)' >>log.tcl if [ -f /etc/emacspeak.conf ]; then echo >>log.tcl echo "----- /etc/emacspeak.conf" >>log.tcl cat /etc/emacspeak.conf >>log.tcl; fi echo >>log.tcl efile=`which strace` echo "----- \"which strace\" = $efile" >>log.tcl if [ "$efile" = "" ]; then echo "strace not installed" >>log.tcl echo "please install strace before running testit" exit 1 fi strace -V >>log.tcl strace -o log -ff -F -r -t -s 120 emacspeak --batch --eval "\"(print 'ok)\"" . for file in log \ `grep -l 'execve.*tcl.*tcl' log* | head -1` \ `grep -l 'execve.*ping-apollo' log* | tail -1`; do prog=`grep execve $file|sed -e 's/^.*("//' -e 's/".*$//'|tail -1` echo >>log.tcl echo "----- $file $prog" >>log.tcl grep '\$Id' $file |head |sed -e 's/^.*\$Id/$Id/' -e 's/\.\.\..*$/.../' >>log.tcl echo >>log.tcl grep execve $file >>log.tcl echo "..." >>log.tcl #egrep '(read|write|select)' $file |tail -400 >>log.tcl tail -400 $file >>log.tcl done echo the emacspeak session log files are summarized in log.tcl emacspeak-ss-1.12.1/README.doubletalk0000664000175000017500000000117707215066145015357 0ustar jrvjrv The DoubleTalk server works with the following synthesizers: DoubleTalk PC (internal DoubleTalk) version 5.20 or later, DoubleTalk LT (connected to a serial port) version 4.20 or later, or LiteTalk version 2.10 or later. For the internal DoubleTalk, you also need the device driver. It is now part of the official Linux kernel sources. Use version 2.2.17 or later, and configure with "Double Talk PC internal speech card support" either compiled into the kernel or installed as a module (dtlk.o). The DoubleTalk server sets the serial port to 9600 n 8 1. - Jim Van Zandt emacspeak-ss-1.12.1/interleave0000775000175000017500000000032706550274072014433 0ustar jrvjrv#!/bin/sh # interleave - combine generic and specific speech server code # usage: interleave all.in xx.in >xx awk 'NR==1,/^#include/{if($1~/^#include/)exit;print}' $1 cat $2 awk 'NR==1,/^#include/{next}{print}' $1 emacspeak-ss-1.12.1/ciber.in0000644000175000017500000000550310372504772013762 0ustar jrvjrv# ciber.in - Interfacing Emacspeak to a Spanish Ciber 232 & 232 Plus -*-tcl-*- # # $Id: ciber.in,v 1.1 2006/02/09 00:15:35 jrv Exp jrv $ # # For any question of Ciber server contact with Oscar Fernandez # You can write in Spanish or English. # # {{{ Copyright: # # This software is Copyright 1998 James R. Van Zandt, all rights reserved # # 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; version 2 dated # June, 1991, or 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # }}} # {{{ procedures proc version {} { global tts q {this is Ciber, unknown version } d } # Return a command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { global tts queue return "" } proc silence_command {{duration 50}} { return "" } # Return speech rate command # Argument is desired rate in words per minute. proc rate_command {r} { set rmin 0 set rmax 9 if {$r>$rmax} {set r [expr (($r-230)/50)+1]} if {$r<$rmin} {set r $rmin} if {$r>$rmax} {set r $rmax} return "@b$r" } # Return punctuation mode command proc punctuation_command {} { global tts set mode $tts(punctuations) set punctuation(all) "@h0@s0@g0@f0" set punctuation(some) "@h0@s1@g1@f1" set punctuation(none) "@h1" echo "Puntuacion @h$punctuation($mode)" return "$punctuation($mode)" } proc tts_initialize {} { global tts set tts(charmode) "" set tts(stop) "\x1b" set tts(textmode) "" set tts(silencecmd) "" set tts(resetcmd) "@m@k0@g0" set tts(somepunct) "" set tts(mark) "@\x06" set tts(flush) "\x1b" set tts(tone_440_10) "" set tts(tone_660_10) "" set tts(dennis) "@c0@q0@r4" set tts(henry) "@c0@q0@r6" set tts(frank) "@c0@q1@r4" set tts(kit) "@c0@q1@r6" set tts(paul) "@c0@q0@r2" set tts(ursula) "@c1@q0@r2" set tts(rita) "@c1@q0@r4" set tts(betty) "@c1@q1@r6" set tts(wendy) "@c1@q1@r8" set tts(version) "Ciber server from emacspeak-ss version @version@" set tts(initstring) "@m@k0@g0Ciber" } # }}} # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/README0000644000175000017500000001405107000226517013214 0ustar jrvjrvemacspeak-ss - Emacspeak speech servers for several synthesizers OVERVIEW The Emacspeak by T. V. Raman software package provides speech output for Emacs, and includes "speech servers" for the DECtalk speech synthesizers. This package provides servers for several additional synthesizers: DoubleTalk PC and AT from R. C. Systems Braille 'n Speak, Type 'n Speak, and Braille Lite from Blazie Engineering Accent SA Apollo 2, JUNO, and JUNO-sp from Dolphin. Spanish ciber 232 Spanish ciber 232 Plus Spanish PC Hablado notebook The servers are named "doubletalk", "braillenspeak", "accent", "apollo", "ciber", and "hablado" respectively. None of these programs are normally run by the user directly. Instead, they are run by Emacs. That is: Emacs runs the emacspeak code, which executes tcl, which interprets the server code. HISTORY T. V. Raman wrote the interface between his Emacspeak and the DECtalk in TCL. I have adapted it for the DoubleTalk, LiteTalk, and Braille 'n Speak synthesizers. Jack Chen has adapted it for the Accent. Oscar Fernández Arcis adapted it for the ciber and PC Hablado devices. T. V. Raman bears no responsibility for this code. Questions, problems, or suggestions should be sent to the server author (Jack, Oscar, or me), not him. For the most recent version of this code, check the BLinux FTP archives: ftp://leb.net/pub/blinux/emacspeak/blinux You can also look on my web page: http://www.mv.com/ipusers/vanzandt/ Matt Campbell has RPMs here: http://www.crosswinds.net/~mattcamp/emacspeak.html See also the README files for the individual servers. For general information on Emacspeak, please consult the Emacspeak home page: http://www.cs.cornell.edu/Info/People/raman/emacspeak/emacspeak.html There is also an Emacspeak mailing list. To subscribe, send a message to: emacspeak-request@cs.vassar.edu with a subject of: subscribe PREPARATION Before you can use any of these servers, you have to install emacspeak. If you have a recent Slackware Linux cdrom, you will find an emacspeak package in the /contrib directory. You can install and configure it with commands something like this: # installpkg /cdrom/contrib/emacspeak.tgz # /var/adm/setup/setup.emacspeak There are also Red Hat and Debian packages at the usual ftp sites for those distributions, at leb.net, and on my web page (see above). INSTALLATION Configure the source code with the command ./configure If you want the files installed in some place other than the default of /usr/share/emacs/site-lisp/emacspeak/, you may specify a value for "prefix". The default is equivalent to "./configure --prefix=/usr". Build with make For most synthesizers, this only combines the synthesizer-independent code with the synthesizer-specific code. The servers are implemented in tcl which needs no compilation. The exception is the apollo, which needs a small helper program written in C. Install by becoming the superuser and typing make install This copies the servers into /usr/share/emacs/site-lisp/emacspeak/. TESTING You have to set the environment variable DTK_PROGRAM to point to the correct server before you start. For bash, you may use one of these in .profile: export DTK_PROGRAM=doubletalk export DTK_PROGRAM=braillenspeak export DTK_PROGRAM=accent For csh, use one of these in .login: setenv DTK_PROGRAM doubletalk setenv DTK_PROGRAM braillenspeak setenv DTK_PROGRAM accent You can not just set DTK_PROGRAM to the full path to the server. The path must be relative to /usr/share/emacs/site-lisp/emacspeak/ (or wherever emacspeak is installed). If you want to test a server before installing it, you may use something like this: DTK_PROGRAM=../../../../../home/jrv/speech/emacspeak-ss-0.3/doubletalk Under Linux, the DoubleTalk server uses the first of the following devices: the value of the environment variable DTK_PORT if it is set, or /dev/dtlk if it exists and can be read from and written to, or /dev/ttyS0. The other servers use the first of the following devices: the value of the environment variable DTK_PORT if it is set, or /dev/ttyS0. If you connect the synthesizer to one of the first four serial ports (/dev/ttyS0 through /dev/ttyS3), turn it on, and execute this script: find-ss then the synthesizer should speak the name of the port. If you have a synthesizer connected to a serial port other than the first one (/dev/ttyS0 under Linux, which is COM1 under DOS), then set DTK_PORT. For example, for the second serial port, which is COM2 under DOS, you would use this: export DTK_PORT=/dev/ttyS1 You may want to add this line to .profile in your home directory, or /etc/profile so all users inherit those environment settings. With csh you could put setenv DTK_PORT /dev/ttyS1 in .login . If the port is set up for the right speed, you can check the connection and port number with echo under bash: echo $'this is a test\r' >/dev/ttyS1 (When text in single quotes is preceded by a dollar sign, bash expands escape sequences in the text. Here, I am using this feature to generate a carriage return). You can similarly test the internal DoubleTalk like this: echo $'this is a test\r' >/dev/dtlk Start Emacspeak with the command emacspeak which is a shell script installed in /usr/local/bin or /usr/bin. PROBLEMS Neither the Braille 'n Speak nor the Accent synthesizers have tones. If other things are not working, please review the file TROUBLESHOOTING first. If that does not help, please let me know. For problems with the Accent server, please also write to Jack Chen . When you write, please include the output of the "testit" script, if possible. Otherwise, include as many of these as you can: Linux distribution (Red Hat, Slackware, Debian, custom, etc.) Linux kernel version emacspeak version number emacspeak-ss version number synthesizer type (e.g. DoubleTalk PC or LT), serial number, and ROM version number. - Jim Van Zandt emacspeak-ss-1.12.1/install-sh0000755000175000017500000001124506551263701014350 0ustar jrvjrv#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 emacspeak-ss-1.12.1/database.in0000664000175000017500000000235207101716151014433 0ustar jrvjrvTo: database@gnu.org Subject: emacspeak-ss %%name: emacspeak-ss %%short-description: Emacspeak speech server for several synthesizers %%full-description: emacspeak-ss is an interface between Emacspeak and any of several speech synthesizers: DoubleTalk PC version 5.20 or later (internal), DoubleTalk LT version 4.20 or later (serial port version), LiteTalk version 4.20 or later, Braille 'n Speak, Type 'n Speak, Braille Lite, Apollo 2 from Dolphin, or Accent SA. If you have a DoubleTalk PC, you also need the dtlk device driver - either the module from the dtlk package, or compiled into your kernel. The dtlk driver is part of the standard Linux kernel sources. %%category: access,emacs %%license: GPL %%maintainer: James R. Van Zandt %%updated: @TODAY@ %%interface: text interactive %%doc: user introduction and reference included %%developers: James R. Van Zandt %%source: http://www.mv.com/ipusers/vanzandt/emacspeak-ss-*.tar.gz %%debian: ftp://ftp.debian.org/pub/linux/distributions/debian/dists/stable/main//binary-*/editors/emacspeak-ss_*.deb %%source-language: tcl %%use-requirements: emacs,emacspeak,tcl,tclx %%build-prerequisites: emacs %%version: @VER@ released on @TODAY@ emacspeak-ss-1.12.1/pchablado.in0000644000175000017500000000531410372505003014577 0ustar jrvjrv# pchablado.in - Interfacing Emacspeak to a Spanish PC Hablado -*-tcl-*- # # $Id: pchablado.in,v 1.1 2006/02/09 00:15:35 jrv Exp jrv $ # # For any question of PC Hablado server contact with Oscar Fernandez # # You can write in Spanish or English. # # {{{ Copyright: # # This software is Copyright 1998 James R. Van Zandt, all rights reserved # # 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; version 2 dated # June, 1991, or 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # }}} # {{{ procedures proc version {} { global tts q {this is PC Hablado, unknown version } d } # Return a command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { global tts queue return "" } proc silence_command {{duration 50}} { return "" } # Return speech rate command # Argument is desired rate in words per minute. proc rate_command {r} { set rmin -100 set rmax 100 if {$r>$rmax} {set r [expr (($r-230)/2)-100]} if {$r<$rmin} {set r $rmin} if {$r>$rmax} {set r $rmax} return "<* E VM$r *>" } # Return punctuation mode command proc punctuation_command {} { global tts set mode $tts(punctuations) set punctuation(all) "" set punctuation(some) "" set punctuation(none) "" return "" } proc tts_initialize {} { global tts set tts(charmode) "<* S ON *>" set tts(stop) "\x9f" set tts(textmode) "<* S OFF *>" set tts(silencecmd) "" set tts(resetcmd) "<* D *>" set tts(somepunct) "" set tts(mark) "\x9d" set tts(flush) "\x9f" set tts(tone_440_10) "" set tts(tone_660_10) "" set tts(dennis) "" set tts(henry) "" set tts(frank) "" set tts(kit) "" set tts(paul) "" set tts(ursula) "" set tts(rita) "" set tts(betty) "" set tts(wendy) "" set tts(version) "PC Hablado server from emacspeak-ss version @version@" set tts(initstring) "<* D *>PC Hablado" } # }}} # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/configure0000775000175000017500000007361511206340352014255 0ustar jrvjrv#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_default_prefix=/usr # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file= # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi VERSION=1.12.1 ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:563: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:616: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@VERSION@%$VERSION%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 emacspeak-ss-1.12.1/braillenspeak.in0000644000175000017500000000761710372504647015523 0ustar jrvjrv# braillenspeak.in - Interfacing Emacspeak to a Braille 'n Speak -*-tcl-*- # # $Id: braillenspeak.in,v 1.5 2006/02/09 00:15:35 jrv Exp jrv $ # # {{{ Copyright: # # This software is Copyright 1998 James R. Van Zandt, all rights reserved # # 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; version 2 dated # June, 1991, or 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # }}} # {{{ procedures proc version {} { global tts q {this is Braillenspeak, unknown version } d } # Return a command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { global tts queue return "" } proc silence_command {{duration 50}} { set silence "" loop i 0 [expr duration/10] { append silence "$tts(silencecmd)" } return silence } # Braille 'n Speak - specific functions # # ^exE Speech rate. x = '01' thru '16' # ^eC Speech rate set to 10 (for compatibility to Echo) # ^eA Set to Total Punctuation (everything, even spaces. Mostly unusable). # ^eM Set to Most Punctuation (best mode for Synthesizers). # ^eS Set to Some Punctuation # ^eZ Set to No Punctuation # ^exP Set Pitch to x, x = '01' to '63' # ^exV Set Volume to x, x = '01' to '16' # ^exT Set Frequency (Tonal Quality) to x, x = '01' to '25' # ^f index marker # # # Return speech rate command # Argument is desired rate in words per minute. proc rate_command {r} { # The following formula is a simple fit to these indices and # corresponding rates (words per minute) for a Braille 'n Speak, # measured 5/28/98. # 1 49 # 7 71 # 8 80 # 9 100 # 10 123 # 11 142 # 12 180 # 13 240 # 14 355 # 15 395 # 16 436 set rmin 49 set rmax 437 if {$r<$rmin} {set r $rmin} if {$r>$rmax} {set r $rmax} set a 202000 set b 1500000 set c 9370 set index [int [floor [expr (1+$a*$r)/($b+$c*$r)]]] return [format "\5%02dE" $index] } # Return punctuation mode command proc punctuation_command {} { global tts set mode $tts(punctuations) set punctuation(all) M set punctuation(some) S set punctuation(none) Z return "\5$punctuation($mode)" } proc tts_initialize {} { global tts # DoubleTalk commands set tts(charmode) "" set tts(stop) "\030" # FIXME what standard interword pause? set tts(textmode) "" set tts(silencecmd) "" set tts(resetcmd) "" set tts(somepunct) "\005M" set tts(mark) "\006" set tts(flush) "\r" set tts(tone_440_10) "" set tts(tone_660_10) "" set tts(dennis) "\0056T\00510P" set tts(henry) "\0056T\0058P" set tts(frank) "\0056T\0056P" set tts(kit) "\0058T\00510P" set tts(paul) "\0058T\0058P" set tts(ursula) "\0058T\0056P" set tts(rita) "\00510T\00510P" set tts(betty) "\00510T\0058P" set tts(wendy) "\00510T\0056P" set tts(version) "braille n speak server from emacspeak-ss version @version@" set tts(initstring) \ "$tts(paul) This is the Braille 'n Speak server dtk-bs.\ speakers report\r\ $tts(paul)Paul\r, $tts(dennis)Dennis\r, $tts(henry)Henry\r, $tts(frank)Frank\r, $tts(kit)Kit\r, $tts(ursula)Ursula\r, $tts(rita)Rita\r, $tts(betty)Betty\r, $tts(wendy)Wendy. $tts(paul)\r\n" } # }}} # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/TROUBLESHOOTING0000644000175000017500000001517107420137272014557 0ustar jrvjrv TROUBLESHOOTING 1a. If you have a synthesizer connected to a serial port, set up the port: stty sane 9600 raw -echo crtscts /dev/ttyS1 If this fails, you can obviously try /dev/ttyS0 and other ports. also, try /dev/cua0. (maybe this is necessary for older kernels?) you can similarly test the internal doubletalk like this: echo $'this is a test\r' >/dev/dtlk the "echo" test shows that the synthesizer or speaker is connected where you think it is. There are several more things to check: 3. Does the speech server know where the synthesizer is? one test is to type set | grep DTK_PORT If the "tcl doubletalk" command fails, then your DTK_PORT environment variable may not be set, or is not exported. Do that with these commands: DTK_PORT=/dev/ttys0 export DTK_PORT and repeat the test. With bash, you can also combine these commands like this: export DTK_PORT=/dev/ttys0 4. Now check whether tcl is installed and working. cd to the directory with the speech servers. If you have the source distribution, you know where that is. If you have installed a binary package, you can ask the package maintenance program. On debian, the servers should be in /usr/share/emacs/site-lisp/emacspeak/servers. You can start the speech server using tcl but not emacspeak, like this: tcl doubletalk (of course, substitute "accent" or whatever, as appropriate.) The server should introduce itself by saying "This is the DoubleTalk speech server..." and you will be left at the tcl prompt. At this point you can use any of the tcl commands defined in the speech server. For example, tts_say {hello world} should say the words. To return to the shell prompt, use the command "exit". You can also use the server to speak a single statement like this: echo "tts_say {hello world}" | tcl ./doubletalk 4. The next question is whether emacspeak knows what driver to use. Using a set command as above, check that the environment variable DTK_TCL has the value "doubletalk", "accent", or "braillenspeak". If not, set it with the commands DTK_TCL=doubletalk export DTK_TCL 5. Next, be sure the driver can be found. cd to /usr/share/emacs/site-lisp/emacspeak and type ls doubletalk accent braillenspeak If one of the files is not found, you probably did not complete the installation of the driver. As root, you need to change to the driver directory and type the command make install 6. Next, you may not have the startup script in your path. Type which emacspeak You should get a reply like /usr/bin/emacspeak otherwise, you have not installed the emacspeak package correctly. If so, then you should also be able to type emacspeak and start emacs with speech support. Once you have it working, you will probably want to add appropriate commands to one of your startup scripts. For example: path=$path:/usr/local/bin DTK_PORT=/dev/ttys0 export DTK_PORT DTK_TCL=doubletalk export DTK_TCL For reference, here's where bash looks for startup command (quoting from the bash man page): When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. Once you have made these additions, switch to another virtual console with alt-f2, log in again, and test the setup with emacspeak You can always switch back to the first virtual console with alt-f1. The different virtual consoles all share the same file system, of course. However, they have different processes, and can have different environment variables and current directories. 7. If emacspeak gives you the message "process speaker not running", you need some trace data to diagnose the real problem. Make sure you have strace installed, then try running emacspeak like this: strace -o log -ff -t -s 80 emacspeak readme strace logs system calls, which include all the data read or written by the server. There is one log file for each process created. The first file, for the process executing the emacspeak script, is named "log". The other files have names which include the process number, like log.1180. To see what process each log comes from, look for the execve system call near the beginning of the log file. The interesting file is the one for the tcl process that executes the server script, which should include a line like this: log.1181:21:08:31 execve("/usr/bin/tcl", ["/usr/bin/tcl", "/usr/share/emacs/site-lisp/emacspeak/dtk-pgm"...], [/* 26 vars */]) = 0 (the emacs process log is normally the biggest one. The one with the next higher process id is normally the one for tcl.) Then, check the "write" commands in the last 30 or so lines in the file. Tcl probably wrote an error message describing the problem. The script "testit" in the source distribution attempts to automate this. (It may be installed in /usr/share/doc/emacspeak-ss/testit.) It combines deletion of old log files, running emacspeak under strace, determining which log file came from tcl, and extracting the last few things it wrote (whether to the speech device, to stdout, or to stderr). Its output is written to the file log.tcl . I have had the system lock up while recording system calls in this way. This happened when I went into info mode with C-h I and tried to access one of the info files. However, the same commands worked fine when I was not recording system calls. I have not experienced lockups with the latest version of the server. It is sometimes necessary to kill the emacspeak process from another virtual terminal, and to type "reset" on the original virtual terminal to recover the proper screen display. Incidently, strace is very valuable for other things too. The classic problem it helps solve is where a program reports that it cannot find a file. By running it under strace, you can find out the exact file name and which directories the program was looking in. You then know where you can install the file (or a symbolic link). All this can be done without access to the source code for the program. emacspeak-ss-1.12.1/setup0000644000175000017500000000024410600616635013422 0ustar jrvjrvexport DTK_PROGRAM=doubletalk export DTK_TCL=/usr/bin/tclsh8.4 export EMACSPEAK=log export DTK_PORT=/dev/ttyS0 export DTK_PORT=/dev/dtlk export DTK_PORT=/dev/ttyS2 emacspeak-ss-1.12.1/COPYING0000644000175000017500000004307606551263450013407 0ustar jrvjrv GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. emacspeak-ss-1.12.1/accent.in0000644000175000017500000001234110372505345014126 0ustar jrvjrv# accent.in - Interfacing Emacspeak to an Accent via TCL. -*-tcl-*- # Keywords: Emacspeak, Accent, TCL # # Original program by T. V. Raman. # Modifications for the DoubleTalk by Jim Van Zandt # Modifications for the Accent SA and compatibles by Jack Chen # # # $Id: accent.in,v 1.10 2006/02/09 00:20:50 jrv Exp jrv $ # # Author's note: Accent does not have a tone generator, so all references # to this can be safely ignored. # {{{ Copyright: # Copyright (c) 1995, 1996, 1997 T. V. Raman, Adobe Systems # Incorporated. # All Rights Reserved # Copyright (c) 1994, 1995 by Digital Equipment Corporation. # All Rights Reserved. # # #Copyright 1998 Digital Equipment Corporation. This software is a #research work and is provided "as is." Digital disclaims all express and #implied warranties with regard to such software, including the warranty #of fitness for a particular purpose. In no event shall Digital be #liable for any special, direct, indirect, or consequential damages or #any other damages whatsoever, including any loss or any claim for loss #of data or profits, arising out of the use or inability to use the #software even if Digital has been advised of the possibility of such #damages. This software shall not be further distributed without prior #written permission from Digital Equipment Corporation. # }}} # {{{ beginning of Accent - specific functions proc version {} { global tts q {this is Accent, unknown version } d } # Return a Accent SA command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { global tts queue #todo: accent has no tones #want to fake it return "beeeep" } proc silence_command {{duration 50}} { #todo: want to make silences. #silence pauses not implemented by accent #we make a space pause increase and space pause decrease for each 10 #duration set silence "" loop i 0 [expr duration/10] { append silence "$tts(silencecmd_begin)" } append silence " " loop i 0 [expr duration/10] { append silence "$tts(silencecmd_end)" } return silence } #helper function for rate_command proc rate_command_initialize {} { global rate_command_initialized? global rate_command_ranges #This variable gives the lower limits for each words per minute range. #if array(1)==100 and we have a value of 150, then 1 is the mapped speech #rate for accent. #Note for the accent, all speech rates slower than 8 are of no use because #there is not much difference and they are extremely slow. set rate_command_initialized? 1 set rate_command_ranges(8) 60 set rate_command_ranges(9) 100 set rate_command_ranges(A) 140 set rate_command_ranges(B) 180 set rate_command_ranges(C) 230 set rate_command_ranges(D) 280 set rate_command_ranges(E) 330 set rate_command_ranges(F) 380 set rate_command_ranges(G) 480 set rate_command_ranges(H) 530 return "" } proc return_rate_command_range {r} { global rate_command_ranges foreach i {H G F E D C B A 9 8} { if {$rate_command_ranges($i)<=$r} { return $i } } #the rate is lower than our lowest so we return our lowest return 0 } # Return speech rate command for Accent. # Argument is desired rate in words per minute. proc rate_command {r} { global rate_command_initialized? if {${rate_command_initialized?} ==0} { rate_command_initialize } set retval [eval return_rate_command_range {$r}] return [format "\033R%s" $retval] } # Return punctuation mode command for Accent proc punctuation_command {} { global tts global ESC set mode $tts(punctuations) set punctuation(all) "${ESC}OP${ESC}OR" set punctuation(some) "${ESC}OP${ESC}Or" set punctuation(none) "${ESC}Op" return $punctuation($mode) } proc tts_initialize {} { global tts global rate_command_initialized? global ESC # Accent defaults to 9600 n 7 1 exec stty cs7 < $tts(port) # Accent commands set ESC "\033" set CTRLF "\006" set CTRLX "$ESC=x" set rate_command_initialized? 0 set tts(charmode) "${ESC}Ot" set tts(stop) "${ESC}=x" set tts(textmode) "${ESC}OT" set tts(silencecmd_begin) "${ESC}+S" set tts(silencecmd_end) "${ESC}-S" set tts(resetcmd) "${ESC}=X" set tts(somepunct) "${ESC}OP${ESC}Or" set tts(mark) "$CTRLF" set tts(flush) "\r" set tts(tone_440_10) [tone_command 440 10] set tts(tone_660_10) [tone_command 660 10] set tts(paul) "${ESC}P0${ESC}V5" set tts(henry) "${ESC}P1${ESC}V5" set tts(dennis) "${ESC}P2${ESC}V4" set tts(frank) "${ESC}P4${ESC}V4" set tts(betty) "${ESC}P5${ESC}V6" set tts(ursula) "${ESC}P6${ESC}V7" set tts(rita) "${ESC}P7${ESC}V7" set tts(wendy) "${ESC}P8${ESC}V9" set tts(kit) "${ESC}P9${ESC}V9" set tts(version) "accent server from emacspeak-ss version @version@" set tts(initstring) \ "${ESC}=R${ESC}=A${ESC}=V${ESC}=F${ESC}=OA${ESC}=B${ESC}=M${ESC}=Y${ESC}YX \ This is the Accent SA speech server.\r\ " } # }}} end of Accent - specific functions # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/all.in0000644000175000017500000004364410600615740013446 0ustar jrvjrv#!/usr/bin/tclsh8.4 package require Tclx # all.in - Generic Emacspeak server code -*-tcl-*- # Keywords: Emacspeak, TCL, speech, server # # Original program by T. V. Raman. # Modifications to make generic copyright 1998 by James R. Van Zandt # , all rights reserved. # # $Id: all.in,v 1.19 2007/03/23 00:14:24 jrv Exp jrv $ # # Copyright (c) 1995, 1996, 1997 T. V. Raman, Adobe Systems # Incorporated. # All Rights Reserved # Copyright (c) 1994, 1995 by Digital Equipment Corporation. # All Rights Reserved. # # This file is not part of GNU Emacs, but the same permissions apply. # # GNU Emacs 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, or (at your option) # any later version. # # GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # # command abbreviations # This version uses shortened dtk command strings to improve performance # when running remote sessions. # These short-cuts are documented here to preserve ones sanity. # :sa == :say # c == clause # w == word # le == letter # :to == :tone # :ra == :rate # :index == :i # reply == r # :punct == :pu # a == all # s == some # }}} # Fetch the device-specific code #include # {{{ These are wrappers which accommodate versions of emacspeak before 8.0 proc dectalk_set_punctuations {mode} { tts_set_punctuations $mode return "" } proc dectalk_set_speech_rate {rate} { tts_set_speech_rate $rate return "" } proc dectalk_set_character_scale {factor} { tts_set_character_scale $factor return "" } proc dectalk_say {text} { tts_say $text return "" } proc dectalk_speak {text} { tts_speak $text return "" } proc dectalk_resume {} { tts_resume return "" } proc dectalk_pause {} { tts_pause return "" } proc dectalk_split_caps {flag} { tts_split_caps $flag return "" } proc dectalk_capitalize {flag} { tts_capitalize $flag return "" } proc dectalk_allcaps_beep {flag} { tts_allcaps_beep $flag return "" } proc dectalk_reset {} { tts_reset } # this was replaced by d in version 12.0 proc tts_speak {text} { q $text speech_task } # }}} # {{{ These are the current functions proc tts_set_punctuations {mode} { global tts set tts(punctuations) $mode return "" } proc tts_set_speech_rate {rate} { global tts set factor $tts(char_factor) set tts(say_rate) [round \ [expr $rate * $factor ]] set tts(speech_rate) $rate return "" } proc tts_set_character_scale {factor} { global tts set tts(say_rate) [round \ [expr $tts(speech_rate) * $factor ]] set tts(char_factor) $factor return "" } proc tts_say {text} { global tts regsub -all {\[:version speak\]} $text $tts(version) text set tts(not_stopped) 1 set fl $tts(flush) puts -nonewline $tts(write)\ "$text$fl" # "\[_]\[:sa w]$text " tts_gobble_acknowledgements return "" } # formerly called tts_letter proc l {text} { global tts set tts(not_stopped) 1 # set r $tts(speech_rate) # set f $tts(say_rate) set ra [rate_command $tts(say_rate)] tts_gobble_acknowledgements 0.001 puts -nonewline $tts(write)\ "$tts(charmode)$text\r" # "\[_]\[:ra $f :sa le]$text" return "" } # formerly called tts_speak proc d {} { speech_task } proc tts_resume {} { global tts queue_restore if {[queue_empty?]} { set fl $tts(flush) puts -nonewline $tts(write) "No speech to resume$fl" set tts(not_stopped) 1 } else { speech_task } return "" } proc tts_pause {} { global tts queue_backup s return "" } # formerly called tts_stop proc s {} { global tts if {$tts(not_stopped)} { set st $tts(stop) set tm $tts(textmode) set ra [rate_command $tts(speech_rate)] puts -nonewline $tts(write) "$st$ra$tm" set tts(not_stopped) 0 # select [list $tts(read)] {} {} {} # read $tts(read) 1 set tts(talking?) 0 queue_clear #tts_gobble_acknowledgements } } # formerly called tts_tone proc t {{frequency 440} {duration 50}} { global tts queue set command [tone_command $frequency $duration] set queue($tts(q_tail)) [list t $command] incr tts(q_tail) return "" } proc sh {{duration 50}} { global tts queue set silence [silence_command duration] set queue($tts(q_tail)) [list t $silence] incr tts(q_tail) return "" } proc tts_split_caps {flag} { global tts set tts(split_caps) $flag return "" } proc tts_capitalize {flag} { global tts set tts(capitalize) $flag return "" } proc tts_allcaps_beep {flag} { global tts set tts(allcaps_beep) $flag return "" } proc read_pending_p {file_handle} { set status [lsearch [select [list $file_handle] {} {} 0] $file_handle] expr $status >= 0 } proc tts_get_acknowledgement {} { global tts if {$tts(requires_poll)} { return [tts_poll] } # echo " entering tts_get_acknowledgement" # note that we cannot use stdin here due to a tcl bug. # in tcl 7.4 we could always say file0 # in 7.5 and above (only tested in 7.5 and 8.0) # we need to say sock0 when we are a server set input $tts(input) # wait until either emacs or synthesizer write something set status [select [list $tts(read) $input ] {} {} {}] # echo " status=$status" set code "" if {[lsearch $status $input] >=0} { set tts(talking?) 0 } else { set r $tts(read) while {[lsearch [select [list $r] {} {} 0.1] $r] >= 0 } { append code [read $r 1] } } # echo " leaving tts_get_acknowledgement" return $code } # Gobble up any garbage the Dectalk has returned. proc tts_gobble_acknowledgements {{delay 0.01}} { global tts set r $tts(read) while {[lsearch [select [list $r] {} {} 0.001] $r] >= 0 } { read $r 1 } } proc tts_reset {} { global tts s tts_gobble_acknowledgements set tts(not_stopped) 1 puts -nonewline $tts(write) \ "$tts(resetcmd) Restoring sanity to the speech device.\r" } # queue a rate command proc r {rate} { global queue tts set rate [rate_command $tts(speech_rate)] set queue($tts(q_tail)) [list s $rate] incr tts(q_tail) return "" } # }}} # {{{ speech task proc speech_task {} { global queue tts set tts(talking?) 1 set tts(not_stopped) 1 set np $tts(paul) set ra [rate_command $tts(speech_rate)] set length [queue_length] tts_gobble_acknowledgements set pu [punctuation_command] puts -nonewline $tts(write) \ "$tts(textmode)$np$ra$pu" # "\[_]\[:sa c]\[:np]\[:ra $r]\[:pu $mode]" loop index 0 $length { set event [queue_remove] set event_type [lindex $event 0] switch -exact -- $event_type { s { set text [clean [lindex $event 1]] puts -nonewline $tts(write) \ "$tts(mark)$text$tts(flush)" # "\[:i r 1]$text\[_.]\013" set retval [tts_get_acknowledgement ] } t { set text [fixtone [lindex $event 1]] puts -nonewline $tts(write) "$tts(mark)$text" # "\[_.]$text\[_.] " set retval [tts_get_acknowledgement ] } a { set sound [lindex $event 1] catch "exec $tts(play) $sound >& /dev/null &" errCode } default { } } if {$tts(talking?) == 0} {break;} } set tts(talking?) 0 return "" } # }}} # {{{ queue: # preprocess element before sending it out: proc clean {element} { global queue tts if {[string match all $tts(punctuations)] } { regsub -all {@} $element \ { at } element regsub -all {\#} $element \ { pound } element regsub -all {\*} $element \ { star } element regsub -all {[%&;()$+=/]} $element { \0 } element regsub -all {\.,} $element \ { dot comma } element regsub -all {\.\.\.} $element \ { dot dot dot } element regsub -all {\.\.} $element \ { dot dot } element regsub -all {([a-zA-Z])\.([a-zA-Z])} $element \ {\1 dot \2} element regsub -all {[0-9]+} $element { & } element } else { if {[string match some $tts(punctuations)] } { regsub -all {@} $element \ { at } element } else { regsub -all {@} $element \ { } element } regsub -all {\.,} $element \ {} element regsub -all {([0-9a-zA-Z])(["!;/:()=])+([0-9a-zA-z])} $element \ {\1 \2 \3} element regsub -all {([a-zA-Z])(,)+([a-zA-z])} $element \ {\1 \2 \3} element regsub -all {([a-zA-Z])(\.)([a-zA-z])} $element \ {\1 dot \3} element # regsub -all {``} $element {[_<1>/]} element # regsub -all {''} $element {[_<1>\\]} element # regsub -all { '} $element {[_']} element # regsub -all {' } $element {[_']} element # regsub -all -- {--} $element { [_,]} element regsub -all -- {-} $element { } element } if {$tts(capitalize) } { regsub -all {[A-Z]} $element "$tts(tone_440_10)&" element # {[_ :to 440 10]&} element } if {$tts(split_caps) } { if {$tts(allcaps_beep)} { set tone "$tts(tone_660_10)" set abbrev_tone "$tts(tone_660_10)" } else { set tone "" set abbrev_tone "" } set allcaps [regexp {[^a-zA-Z0-9]?([A-Z][A-Z0-9]+)[^a-zA-Z0-9]} $element full match ] while {$allcaps } { # if {[string length $match] <=3} { # set abbrev "$abbrev_tone$match" ## regsub -all {[A-Z]} $abbrev {&[*]} abbrev ## regsub -all A $abbrev {[ey]} abbrev # regsub $match $element $abbrev element # } else { regsub $match $element "$tone[string tolower $match]" element # } set allcaps [regexp {[^a-zA-Z0-9]([A-Z][A-Z0-9]+)[^a-zA-Z0-9]} $element full match ] } # regsub -all {[A-Z]} $element {[_<5>]&} element # regsub -all {([^ -_A-Z])([A-Z][a-zA-Z]* )} $element\ # {\1[_<1>]\2[,] } element # regsub -all {([^ -_A-Z])([A-Z])} $element\ # {\1[:pause 1]\2} element } # substitute for voice commands # the first substitution is a special case for indentation in tcl-mode regsub -all {\[:np :dv sm 40 ri 40 hr 7 sr 10 \]} $element \ $tts(henry) element # $tts(betty) element regsub -all {\[:np[^]]*\]} $element $tts(paul) element regsub -all {\[:nh[^]]*\]} $element $tts(henry) element regsub -all {\[:nd[^]]*\]} $element $tts(dennis) element regsub -all {\[:nf[^]]*\]} $element $tts(frank) element regsub -all {\[:nb[^]]*\]} $element $tts(betty) element regsub -all {\[:nu[^]]*\]} $element $tts(ursula) element regsub -all {\[:nr[^]]*\]} $element $tts(rita) element regsub -all {\[:nw[^]]*\]} $element $tts(wendy) element regsub -all {\[:nk[^]]*\]} $element $tts(kit) element regsub -all {\[:n[^]]*\]} $element $tts(paul) element # map any unrecognized voice to Dennis regsub -all {\[ :dv[^]]*\]} $element $tts(dennis) element return $element } # rewrite DECtalk tone commands for the speech device proc fixtone {element} { global queue tts while {[regexp {\[:to ([0-9]+) ([0-9]+)]} $element match freq duration]} { set cmd [tone_command $freq $duration] regsub {\[:to ([0-9]+) ([0-9]+)]} $element $cmd element } return $element } proc tts_sync_state {punct capitalize allcaps splitcaps rate} { tts_set_punctuations $punct tts_capitalize $capitalize tts_allcaps_beep $allcaps tts_split_caps $splitcaps tts_set_speech_rate $rate } # currently we use an inlined version of this test in speech_task proc queue_empty? {} { global tts expr $tts(q_head) == $tts(q_tail) } proc queue_nonempty? {} { global tts expr $tts(q_head) != $tts(q_tail) } proc queue_length {} { global tts expr $tts(q_tail) - $tts(q_head) } proc queue_clear {} { global tts queue if {$tts(debug)} { puts -nonewline $tts(write) "$tts(q_head) e\013" } unset queue set queue(-1) "" set tts(q_head) 0 set tts(q_tail) 0 return "" } # formerly called queue_speech --queue speech event proc q {element} { global queue tts env set queue($tts(q_tail)) [list s $element] incr tts(q_tail) set mod [expr ($tts(q_tail) - $tts(q_head)) % 50] if {[info exists env(EMACSPEAK_DIR)] } { set sound "$env(EMACSPEAK_DIR)/sounds/drip.au" } else { set sound "drip.au" } if {$mod == 0} { set tone [tone_command 500 20] puts -nonewline $tts(write) "$tone$tty(flush)" catch "exec $tts(play) $sound >& /dev/null &" errCode } return "" } # queue a sound event proc a {sound} { global queue tts set queue($tts(q_tail)) [list a $sound] incr tts(q_tail) return "" } proc queue_remove {} { global tts queue set element $queue($tts(q_head)) incr tts(q_head) return $element } proc queue_backup {} { global tts backup queue if {[queue_empty?]} { set tts(backup_head) 0 set tts(backup_tail) 0 return } unset backup set backup(-1) "" set head [expr max($tts(q_head) - 2, 0)] set tail $tts(q_tail) loop i $head $tail 1 { set backup($i) $queue($i) } set tts(backup_head) $head set tts(backup_tail) $tail } proc queue_restore {} { global tts backup queue unset queue set queue(-1) "" set head $tts(backup_head) set tail $tts(backup_tail) loop i $head $tail 1 { set queue($i) $backup($i) } set tts(q_head) $head set tts(q_tail) $tail } # }}} # {{{ sounds: # play a sound over the server proc p {sound} { global tts catch "exec $tts(play) $sound >& /dev/null &" errCode speech_task } # }}} # {{{self test proc tts_selftest {} { loop i 1 10 { q "This is test $i. " } d } # }}} # {{{guessing os and port proc which_os {} { global env #if env variable DTK_OS is set, use it; if {[info exists env(DTK_OS)] } { return $env(DTK_OS) } set machine [exec uname -a] #os hostname version set fields [split $machine ] set os [lindex $fields 0] set host [lindex $fields 1] set version [lindex $fields 2] switch -exact -- $os { ULTRIX - OSF1 {return DEC} SunOS { #are we solaris if {[string match 5.* $version] } { return Solaris } else { #we are sunos 4 return SunOS } } Linux - default { return Linux } } } proc which_port {{os Linux}} { global env if {[info exists env(DTK_PORT)] } { set port $env(DTK_PORT) puts stdout "Set port to $port" } else { switch -exact -- $os { DEC { set port /dev/tty00 } SunOS - Solaris - solaris { set port /dev/ttya } Linux - default { set port /dev/ttyS0 } } } return $port } # }}} # {{{ globals # optional debugging output if {[info exists env(DTK_DEBUG)] } { set tts(debug) 1 } else { set tts(debug) 0 } # flag to avoid multiple consecutive stops set tts(not_stopped) 1 # set the machine and I/O port set machine [which_os] set port [which_port $machine] set tts(port) $port set tts(read) [open $port r] set tts(write) [open $port w] #set up stty settings switch -exact -- $machine { DEC { #osf and ultrix exec stty sane 9600 raw -echo < $port exec stty ixon ixoff < $port } solaris - Solaris { exec /usr/bin/stty sane 9600 raw < $port exec /usr/bin/stty -echo < $port exec /usr/bin/stty ignpar < $port exec /usr/bin/stty ixon ixoff < $port } SunOS { exec stty sane 9600 raw -echo -echoe -echoke echoctl > $port exec stty ixon ixoff > $port } Linux - default { if {[expr ![regexp /dev/dtlk.* $port]]} { exec stty sane 9600 raw -echo crtscts < $port exec stty -echo < $port exec stty ixon ixoff < $port } } } if {$tts(debug)} { set tts(dfile) [open "log.debug" w] fcntl $tts(dfile) nobuf 1 } # set up the right kind of buffering: fcntl $tts(read) nobuf 1 fcntl $tts(write) nobuf 1 # split caps flag: set tts(split_caps) 1 # Capitalize flag set tts(capitalize) 0 # allcaps beep flag set tts(allcaps_beep) 0 set tts(talking?) 0 set tts(speech_rate) 425 set tts(char_factor) 1.2 set tts(say_rate) [round \ [expr $tts(speech_rate) * $tts(char_factor)]] set tts(q_head) 0 set tts(q_tail) 0 set tts(backup_head) 0 set tts(backup_tail) 0 set tts(punctuations) some set queue(-1) "" set backup(-1) "" # play program if {[info exists env(EMACSPEAK_PLAY_PROGRAM)] } { set tts(play) $env(EMACSPEAK_PLAY_PROGRAM) } else { set tts(play) "play" } # }}} set tts(requires_poll) "0" tts_initialize # {{{ Initialize and set state. # working around tcl 7.5 set tts(input) stdin if {[string match [info tclversion] 7.5] || [string match 8.0 [info tclversion]] } { if {[info exists server_p]} { set tts(input) sock0 } else { set tts(input) stdin } } # do not die if you see a control-c signal ignore {sigint} # gobble up garbage that is returned on powerup tts_gobble_acknowledgements puts -nonewline $tts(write) $tts(initstring) # Start the main command loop: commandloop # }}} # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/INSTALL0000644000175000017500000001705106551263450013377 0ustar jrvjrvBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. emacspeak-ss-1.12.1/README.pchablado0000664000175000017500000000404306663643366015155 0ustar jrvjrv Introduction ------------ The pchablado server is designed to support the Spanish PC Hablado notebook. The synthesizer must be connect to a serial port, and be set for 9600 n 8 1. This version not support braille keys from notebook. Requirements ------------ - PCHablado version 1.74 or above (to check the version press cor-p,v from the editor). Commnications Terminal Configuration ------------------------------------ Go to the communication terminal pressing cor-o,t from the editor. Now, press p to setup the serial port parameters (press cor-4 or cor-1 to go over the parameters and cor to change the value of each parameter). Only those parameters which are fundamental for working with SAPI are mentioned: - Flow Control: It should be hardware. Anyway, it never should be xon/xoff due to the data generated by the Braille keyboard might interfere with the protocol. - Duplex: It must be Half. Press cor-4-6 to save and exit. Synthesis Mode Configuration ----------------------- ----- Go to the synthesis mode options menu pressing cor-3-4-5 from the communications terminal. Only those parameters which are fundamentals for working with SAPI are mentioned. - Echo: Pressing 'e' the kind of echo is configured. To work with server, the echo must be configured as 'Program echo'. This way, the synthesis tracking system (indexing) is enabled. - Braille Keyboard: Pressing 'b' the kind of Braille keyboard is configured. PCHablado allows to configure its Braille keyboard as 6 dots Braille keyboard or 8 dots Braille keyboard. To work with SAPI, it must be set up to 6 dots Braille keyboard. NOT SUPPORTED IN THIS SERVER VERSION! Press cor-z to save and exit. PC Hablado Mode --------------- When the configuration is finished, PCHablado must be set into the Synthesizer Mode. To go to this mode, press v from the communications terminal. If you have any question contact with Oscar Fernandez For last version of this server, get from ftp.once.es/accessibility/emacspeak - Oscar Fernandez emacspeak-ss-1.12.1/configure.in0000644000175000017500000000062011206070477014647 0ustar jrvjrvdnl Process this file with autoconf to produce a configure script. AC_INIT() VERSION=1.12.1 AC_SUBST(VERSION) dnl emacspeak installs here AC_PREFIX_DEFAULT(/usr) dnl Checks for programs. AC_PROG_INSTALL AC_PROG_LN_S dnl Checks for libraries. dnl Checks for header files. dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. AC_OUTPUT(Makefile) emacspeak-ss-1.12.1/find-ss0000775000175000017500000000072506561215123013634 0ustar jrvjrv#!/bin/bash # try to send a string to the synthesizer via four different serial ports for x in 0 1 2 3; do (DTK_PORT=/dev/ttyS$x echo "trying $DTK_PORT" stty sane 9600 raw -echo crtscts <$DTK_PORT &&\ stty -echo <$DTK_PORT &&\ stty ixon ixoff <$DTK_PORT &&\ echo "this is /dev/t t y s $x" $'\r' >$DTK_PORT )& # if one of the above commands hangs, kill the process sleep 2; kill $! >/dev/null 2>&1 done emacspeak-ss-1.12.1/Makefile.in0000644000175000017500000000514211364602775014416 0ustar jrvjrv# -*- makefile -*- prefix = @prefix@ man1dir=@mandir@/man1 exec_prefix = @exec_prefix@ bindir=$(prefix)/share/emacs/site-lisp/emacspeak/ libdir=$(prefix)/lib/emacs/common/emacspeak/ INSTALL=@INSTALL@ VERSION=@VERSION@ SRC=*.in ping-apollo.c setup testit configure install-sh ChangeLog \ CREDITS README* INSTALL TODO COPYING interleave find-ss \ TROUBLESHOOTING OtherSynthesizers blurbs/*.blurb OBJS=ping-apollo IN=*.in SERVERS=doubletalk accent braillenspeak apollo ciber pchablado all: $(SERVERS) ping-apollo BLURBS= accent-ss.blurb \ apollo-ss.blurb \ braille-lite-ss.blurb \ braillenspeak-ss.blurb \ ciber232.blurb \ ciber232plus.blurb \ dtlt-ss.blurb \ dtpc-ss.blurb \ hablado.blurb \ lite-ss.blurb \ tns-ss.blurb $(SERVERS): $(IN) for x in $(SERVERS); do \ ./interleave all.in $$x.in | sed 's/@version@/@VERSION@/' > $$x; \ chmod +x $$x; \ done ping-apollo: ping-apollo.c #check: gsub-t # gsub-t tempfile # echo 'dectalk_speak ' >>tempfile # echo 'exit' >>tempfile # emacspeak-ss $@ Makefile: Makefile.in configure ./configure configure: configure.in autoconf dist:$(SRC) emacspeak-ss.tar.gz FILE=all.in emacspeak-ss.tar.gz: $(SRC) for x in $(SRC); do \ if git diff $$x >/dev/null 2>&1; then true; else \ echo $$x has changed since being checked in; exit 1; \ fi; \ if [ $$x != ChangeLog ]; then \ if [ $$x -nt ChangeLog ]; then \ echo $$x has changed since ChangeLog was changed; exit 1; \ fi \ fi \ done; \ distname=emacspeak-ss-$(VERSION); \ rm -fr $$distname; \ mkdir $$distname; \ mkdir $$distname/blurbs; \ for file in $(SRC); do \ ln $$file $$distname/$$file \ || { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \ done; \ chmod -R a+rX $$distname; \ tar -chz -f $$distname.tar.gz $$distname; \ rm -fr $$distname emacspeak-ss-1.12.1/README.apollo0000664000175000017500000000221606656707214014521 0ustar jrvjrvThe apollo server is designed to support the following Dolphin series 2 speech synthesizers: Apollo 2, JUNO, and JUNO-sp. The synthesizer must be connected to a serial port, and be set for 9600 n 8 1 (the factory default). If you have the usual 9 pin male connector on your serial port, you need a cable with a 9 pin female connector on each end, wired straight through. (That is: 1-1, 2-2, 3-3, 4-4, 5-5, 6-6, 7-7 and 8-8. Pin 9 need not be connected.) The Apollo server exhibits a quirk which I do not understand, but which does not appear to affect normal use. The symptom is that when run under strace (using the "testit" script, for example), the server fails on alternate executions: fail - succeed - fail - succeed. This led me in a merry chase during debugging. If you do have cause to send me a debugging log, please make it one from a "success". The failures are pretty obvious - no speech at all. Remember that the speech rate you give after the C-e d r command is the desired speed in words per minute. 250 is a good place to start. I have not yet tuned the speech rate calculation, so the actual rate may vary somewhat from what you request. emacspeak-ss-1.12.1/README.ciber0000644000175000017500000000055706663643366014330 0ustar jrvjrv The ciber server is designed to support the Spanish Ciber 232 synthesizer and Ciber 232 Plus Models. The synthesizer must be connect to a serial port, and be set for 9600 n 8 1. If you have any question contact with Oscar Fernandez For last version of this server, get from ftp.once.es/accessibility/emacspeak - Oscar Fernandez emacspeak-ss-1.12.1/TODO0000664000175000017500000000013606577001620013031 0ustar jrvjrv ( ) remeasure speaking rates of DoubleTalk PC and LT, and revise the rate_command function. emacspeak-ss-1.12.1/ping-apollo.c0000664000175000017500000000505406632623742014741 0ustar jrvjrv/* ping-apollo - exchange data with Apollo speech synthesizer */ #include #include #include #include #include #include #define DEFAULT_DEVICE "/dev/ttyS0" #define MAXCHARS 128 static int readable (int fd, int usec); /* write usage message and exit with status n. Write message to stderr if n is nonzero, otherwise to stdout. */ void usage(int n) { fprintf(n?stderr:stdout, "ping-apollo - exchange data with Apollo synthesizer\n" "usage: ping-apollo data-to-write [device]\n" "default device is /dev/ttyS0\n"); exit(n); } /* return nonzero if file descriptor fd could be read without blocking. */ static int readable (int fd, int usec) { int retval; fd_set rfds, wfds, efds; struct timeval tv; FD_ZERO(&rfds); FD_SET(fd, &rfds); FD_ZERO(&wfds); FD_ZERO(&efds); tv.tv_sec = usec/1000000; /* wait the specified time for the files to become readable */ tv.tv_usec = usec%1000000; retval = select(fd+1, &rfds, &wfds, &efds, &tv); return retval; } int main(int argc, char **argv) { unsigned long status=0; int fd; int numchars=0; char *devname=DEFAULT_DEVICE; char buf[MAXCHARS+1]; if (argc < 2) usage(1); if (argc > 2) devname=argv[2]; fd = open(devname,O_RDWR); if (fd == -1) { fprintf(stderr, "cannot open %s\n", devname); exit(1); } ioctl(fd, TIOCMGET, &status); status |= TIOCM_RTS; ioctl(fd, TIOCMSET, &status); /* assert RTS i.e. raise RTS line (required before the Apollo will read) */ usleep(10000); /* 100 usec is enough */ write(fd, argv[1], strlen(argv[1])); { unsigned lsr; /* wait until UART transmit buffer is empty */ while(1) { ioctl(fd, TIOCSERGETLSR, &lsr); /* get line status register */ if (lsr) break; usleep(10000); } } usleep(10000); /* 100 usec is enough */ status &= ~TIOCM_RTS; ioctl(fd, TIOCMSET, &status); /* un-assert RTS i.e. raise RTS line (required before the Apollo will write) */ /* fprintf(stderr, "status=%lx RTS=%d DTR=%d DSR=%d\n", status, (status&TIOCM_RTS)!=0, (status&TIOCM_DTR)!=0, (status&TIOCM_DSR)!=0); */ /* 100000: stops after first punctuation 70000: stops after first punctuation 30000: stops after first punctuation 10000: stops after first punctuation */ while(readable(fd, 10000) && numchars < MAXCHARS) { if (read(fd, buf+numchars++, 1) < 0) { perror("read-apollo"); exit(1); } } buf[numchars]=0; printf("%s", buf); return 0; } emacspeak-ss-1.12.1/README.braillenspeak0000664000175000017500000000347706745751657016072 0ustar jrvjrv To use the Braille 'n Speak server, you must set up the serial port on your device (9600 N 8 1 with software handshake) and put it into "speech box mode". These are the commands for the Braille 'n Speak: status menu p chord (3-4 chord) next item 4 chord previous item 1 chord say again 1-4 chord next choice spacebar exit status menu e chord (1-5 chord) To set one parameter, the experienced user may find it more convenient to enter the status menu with a p chord (3-4 chord) then issue one of the following commands. Each command also exits the status menu, so to change another parameter, another p chord is required. 9600 baud b 9 (dots 1-2, 3-5) no parity p n (dots 1-2-3-4, 1-3-4-5) duplex none d n (dots 1-4-5, 1-3-4-5) data bits item dots 4-5-6 8 data bits st-sign-chord, 8 (dots 4-5-6, 2-3-6) 1 stop bit s 1 (dots 2-3-4, 2) software handshaking h s (dots 1-2-5, 2-3-4) Finally, enter speech box mode as follows: speech parameters menu 3-4-5 chord speech box mode 1-2-3-4-5-6 chord (all buttons down) block handshaking b (dots 1-2) When you want to leave speech box mode speech box mode off 1-2-3-4-5-6 chord (all buttons down) exit e chord (1-5 chord) Jan McSorley notes: "When your BNS is set up to the serial port, everything that comes across the port is written to whatever file the BNS happens to be open when you turn the Speech Box Mode on. The newer BNS models have an automatic file bigger/smaller feature so that they can accommodate large amounts of data, but most BNS models require you to pre-set your file size. It's probably a good idea for people to either create a file with a least 2 pages of storage space, or open their clipboard and make sure that the clipboard file is at least 2 pages in size." - Jim Van Zandt emacspeak-ss-1.12.1/doubletalk.in0000644000175000017500000002125110372504772015022 0ustar jrvjrv# doubletalk.in - DoubleTalk specific Emacspeak server code -*-tcl-*- # # $Id: doubletalk.in,v 1.10 2006/02/09 00:15:35 jrv Exp jrv $ # # {{{ Copyright: # # This software is Copyright 1998 James R. Van Zandt, all rights reserved # # 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; version 2 dated # June, 1991, or 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # }}} # {{{ beginning of DoubleTalk - specific functions proc version {} { global tts q {this is $tts(device_version) } d } # Return a DoubleTalk command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { global tts queue # early versions did not implement tones if [expr $tts(has_sine_tones) == 0] return "" # express duration in sec set duration [expr $duration*.001] # The DoubleTalk tone generator is controlled by the three # parameters n, Kd, and K1. The frequency of the tone in Hz is # K1*603/(155-n), and the duration in seconds is Kd*(155-n)*.256/617. # The three parameters are subject to these constraints: 1 <= n <= 99, # 1 <= K1 <= 255, and 1 <= Kd <= 255. These permit frequencies up to # 2746 Hz and durations from 23 msec to 16.29 sec. Here, we use 'tau' # to stand for (155-n). # first priority: hardware limits set taumin 56 set taumax 154 # second priority: reach specified frequency # (provided the above limits are respected) set taumin [max $taumin [min [expr 603./$frequency] $taumax]] set taumax [min $taumax [max [expr 255*603./$frequency] $taumin]] # third priority: reach specified duration # (provided the above limits are respected) set taumin [max $taumin [min [expr 617.*$duration/.256/255] $taumax]] set taumax [min $taumax [max [expr 617.*$duration/.256] $taumin]] if {$taumin == $taumax} { set tau $taumin set K1 [min 255 [max 1 [int [expr $tau*$frequency/603.+.5]]]] } else { ## Find good values of tau and K1. K1/tau should approximate ## frequency/603. We express the latter as a continued fraction, and (if ## possible) use one of its approximates. In other words, we express ## frequency/603 in the form t0 + 1/(t1 + 1/(t2 + 1/(t3 + ...))) where ti ## is an integer. To form an approximate of this continued fraction, we ## ignore everything after one of the '+' signs, and reduce to a regular ## fraction. The more terms we include, the more accurate the ## approximate is. For example, pi = 3 + 1/(7 + 1/(15 + 1/(1 + 1/(293 + ## ...)))). The first four approximates are: 3, 22/7, 333/106, and ## 355/113. ## ## An approximate is accurate to about the same number of digits as it ## has. The last approximate shown above for pi is accurate to 7 decimal ## places. Our numerator and denominator can have 8 bits, so we can hope ## for about 16 bits of accuracy, or almost 5 decimal digits. We can't ## really do this well, since tau is always restricted to the interval ## 56...154, and sometimes a much smaller interval. ## ## Here, we use a recurrence relation which lets us calculate ## successive approximates in the forward direction. set ratio [expr $frequency/603.] if {$ratio > 1.} { set num0 1 set den0 0 # num1/den1 is the first approximate set num1 [floor $ratio] set den1 1 set ratio [expr $ratio-$num1] } else { set num0 0 set den0 1 set ratio [expr 1./$ratio] # num1/den1 is the first approximate set num1 1 set den1 [floor $ratio] set ratio [expr $ratio-$den1] } while {$ratio > 0} { set ratio [expr 1./$ratio] if {$ratio > 1000.} break set term [floor $ratio] set ratio [expr $ratio-$term] set num2 [expr $num0+$num1*$term] set den2 [expr $den0 + $den1*$term] if {$num2 > 255} break if {$den2 > $taumax} break; set num0 $num1 set num1 $num2 set den0 $den1 set den1 $den2 } if {$den1 < $taumin} { set scale [ceil [expr $taumin*1./$den1]] set num1 [expr $num1*$scale] set den1 [expr $den1*$scale] } if {$den1 > $taumax} { # There was no approximate whose # denominator, nor an integer # multiple of one, is in the allowed # range. We fall back on a simpler # approximation. set tau [expr ($taumin+$taumax)/2.] set K1 [int [expr $frequency*$tau/603.+.5]] } else { set K1 [max 1 [min 255 [int [expr $num1+.5]]]] set tau [max $taumin [min $taumax $den1]] } } set n [int [expr 155.5-$tau]] set Kd [max 1 [min 255 [int [expr 617*$duration/$tau/.256 + .5]]]] # The DoubleTalk can generate a second simultaneous sine wave with # frequency determined by K2. K2=0 would disable the second # source. However, we cannot set K2=0 since the null byte would # terminate the string. Instead, we make both the same. set K2 $K1 # # The first is easier to read, but the second is the correct command string # return [format "\\1 %dJ %o %o %o" $n $Kd $K1 $K2] return [format "\1%dJ%c%c%c\r" $n $Kd $K1 $K2] } # Return silence command # Argument is desired pause in msec proc silence_command {{duration 50}} { set silence "" loop i 0 [expr duration/10] { append silence "$tts(silencecmd)" } return silence } # Return speech rate command # Argument is desired rate in words per minute. # measured speaking rates are as follows: # DoubleTalk PC, max rate (code=9): 480 words/78 sec = 370 wpm # DoubleTalk LT, max rate (code=9): 490 words/80 sec = 367 wpm # # measurements are with punctuation=none. # proc rate_command {r} { set rmin 100 set rmax 236 if {$r<$rmin} {set r $rmin} if {$r>$rmax} {set r $rmax} set index [int [floor [expr .5+($r-$rmin)*9/($rmax-$rmin)]]] return [format "\1%dS" $index] } # Return punctuation mode command proc punctuation_command {} { global tts set mode $tts(punctuations) set punctuation(all) 5 set punctuation(some) 5 set punctuation(none) 7 return "\001$punctuation($mode)B" } proc tts_initialize {} { global tts env # interrogate the DoubleTalk if {[info exists env(DTK_PORT)] } { set port $env(DTK_PORT) } else { set port "" } if {[regexp {dev/dtlk} $port]} { set version "5.20" # echo "internal doubletalk at $port is assumed to be version $version" } else { set r $tts(read) while {[lsearch [select [list $r] {} {} 0.1] $r] >= 0 } { read $r 1 } puts -nonewline $tts(write) "\001?" set status "" while {[lsearch [select [list $r] {} {} 0.1] $r] >= 0 } { append status [read $r 1] } set version $status echo "doubletalk status report is $version" regsub {^..} $version "" version regsub {^([0-9\.]*).*$} $version {\1} version } set tts(device_version) $version echo "the DoubleTalk is version $version" set tts(has_sine_tones) [expr $version+0 >= 4.20] # echo "has_sine_tones=$tts(has_sine_tones)" # DoubleTalk commands set tts(charmode) "\0015C" set tts(stop) "\030" # FIXME what standard interword pause? set tts(textmode) "\0015T" set tts(textmode) "\0010T" set tts(silencecmd) "\00116*" set tts(resetcmd) "\001@" set tts(somepunct) "\0015B" set tts(mark) "\00176I" set tts(flush) "\r" set tts(tone_440_10) [tone_command 440 10] set tts(tone_660_10) [tone_command 660 10] set tts(paul) "\0010O" set tts(henry) "\0011O" set tts(dennis) "\0012O" set tts(frank) "\0013O" set tts(betty) "\0014O" set tts(ursula) "\0010O\00175P" set tts(rita) "\0011O\00175P" set tts(wendy) "\0012O\00175P" set tts(kit) "\0013O\00175P" set tts(version) [format "doubletalk with ROM version %s, doubletalk server from emacspeak-ss version @version@" $tts(device_version) ] set tts(initstring) "\001@\ \0010T\ \0010Y\ \0015B\ \0015S\ This is the DoubleTalk speech server for Emacspeak.\ speakers report\r\ \00116*\0010T\r\ \0010O Paul \r\ \00116*\ \0011O Vader\r\ \00116*\0010T\r\ \0012O Bob\r\ \00116*\0010T\r\ \0013O Pete\r\ \00116*\0010T\r\ \0014O Larry\r\ \00116*\0010T\r\ \0010O \r\n" } # }}} end of DoubleTalk - specific functions # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/apollo.in0000644000175000017500000001514510372504647014170 0ustar jrvjrv# apollo.in - Apollo specific Emacspeak server code -*-tcl-*- # # $Id: apollo.in,v 1.10 2006/02/09 00:15:35 jrv Exp jrv $ # # {{{ Copyright: # # This software is Copyright 1998 James R. Van Zandt, all rights reserved # # 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; version 2 dated # June, 1991, or 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., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # }}} # {{{ beginning of Apollo - specific functions proc version {} { global tts q {this is @$ } d } # Return a Apollo command string to generate a tone with the # specified frequency (in Hz) and duration (in msec). proc tone_command {{frequency 440} {duration 50}} { # the Apollo does not have tones, so we use the "buzzer" sound effect return "@T5" # FIXME should implement different length buzzers } # Return silence command # Argument is desired pause in msec # @Tx pauses about 100 msec proc silence_command {{duration 50}} { set silence "" loop i 0 [expr (duration+50)/100] { append silence "$tts(silencecmd)" } return silence } # Return speech rate command # Argument is desired rate in words per minute. # 1 -> 80 wpm, 9 -> 580, default=3. We assume a linear relationship. proc rate_command {r} { set rmin 80 set rmax 580 if {$r<$rmin} {set r $rmin} if {$r>$rmax} {set r $rmax} set index [int [floor [expr ($r+14)/62 ]]] return [format "@W%d" $index] } # Return punctuation mode command proc punctuation_command {} { global tts set mode $tts(punctuations) set punctuation(all) 1 set punctuation(some) 1 set punctuation(none) 0 return "@P$punctuation($mode)" } # return either when input can be read from parent process, or when # synthesizer reports no marks in its queue proc tts_poll {} { global tts set input $tts(input) while {1} { # wait up to 50 msec for input from # parent process set status [select [list $input ] {} {} 0.05] if {[lsearch $status $input] >=0} { set tts(talking?) 0 set code "" break } # poll the synthesizer set code [tts_ping "@I?"] # The synthesizer responds with four # bytes of the form Iabx, where a and # b are ASCII characters representing # the one byte hex mark counter (least # significant nibble first), and x # is either T or M depending on # whether the synthesizer is talking # or muted. We quit if the counter is # zero and the synthesizer is muted. if {[regexp {I00M} $code]} {break} } return $code } # write the argument to the synthesizer, and return its response if any proc tts_ping {query} { global tts set status [exec /usr/lib/emacs/common/emacspeak/ping-apollo "$query" $tts(port) ] return $status } proc tts_initialize {} { global tts # Apollo commands # @Th # This command can be inserted in your text to produce sound effects. The # sound effects available are: # # h duration type of effect # 0 very short whoosh # 1 short " # 2 medium " # 3 long " # 4 very short buzzer # 5 short " # 6 medium " # 7 long " # 8 very short warble 1 # 9 short " # A medium " # B long " # C very short warble 2 # D short " # E medium " # F long " # @Ec echos character c # Sending a @c? command to the synthesiser will produce a reply # consisting of three characters. The first of these is the setting # identifier, such as B for breathiness, followed by two characters # (bytes) representing the hexadecimal value of that setting. For # example, to ask the synthesiser for its current volume setting, send # @A?. The synthesiser will reply with the message A60, where 6 is the # current volume level. # @A? volume # @B? breathiness # @C? battery level (Juno or Juno-SP) # @D? end of phrase pause setting # @F? pitch centre point setting # @H? Hypermode setting # @K? speaker table setting # @M? mark-space ratio setting # @P? punctuation setting # @Q? inter-word pause setting # @R? prosody setting # @S? spell mode setting # @V? voice setting # @W? speed setting # @X? phonetic mode setting # @=? slot number of the currently selected ROM # @$? voice source and filter setting tts_gobble_acknowledgements tts_ping "@E." # tts_ping "does this text delay the response?@E." tts_ping "@A?" tts_ping "@B?" tts_ping "@C?" tts_ping "@D?" tts_ping "@F?" tts_ping "@H?" tts_ping "@K?" tts_ping "@M?" tts_ping "@P?" tts_ping "@Q?" tts_ping "@R?" tts_ping "@S?" tts_ping "@V?" tts_ping "@W?" tts_ping "@X?" tts_ping "@=?" tts_ping "@$?" set tts(charmode) "@S1" set tts(stop) "\030" set tts(textmode) "@S0" # 100 msec pause set tts(silencecmd) "@Tx" set tts(resetcmd) "" set tts(somepunct) "@P1" # set tts(mark) "@E." # The apollo counts index marks in the queue, but does not signal # passing them unless explicitly queried with @I? set tts(mark) "@I+" set tts(requires_poll) "1" set tts(flush) "\r" set tts(tone_440_10) [tone_command 440 10] set tts(tone_660_10) [tone_command 660 10] set tts(paul) "@V1" set tts(henry) "@V2" set tts(dennis) "@V3" set tts(frank) "@V4" set tts(betty) "@V5" set tts(ursula) "@V6" set tts(rita) "@V4" set tts(wendy) "@V5" set tts(kit) "@V6" # @? speaks the ROM version number set tts(version) "Apollo with ROM version @?, Apollo server from emacspeak-ss version @version@" # default: speed, voice pitch, excitability, spell mode, punctuation, # interword pause, breathiness, pause, voice set tts(initstring) "@W3@F8@R3@S0@P0\ @Q0@B8@Db@V1\ This is the Apollo speech server for Emacspeak.\ speakers report\r\ @V1 Paul \r\ @V2 Henry\r\ @V3 Dennis\r\ @V4 Betty\r\ @V5 Ursula\r\ @V6 Rita\r\ @V1 \r\n" } # }}} end of Apollo - specific functions # {{{ Emacs local variables ### Local variables: ### major-mode: tcl-mode ### voice-lock-mode: t ### folded-file: t ### End: # }}} emacspeak-ss-1.12.1/ChangeLog0000644000175000017500000002551411364602777014132 0ustar jrvjrv2010-04-24 James R. Van Zandt * Makefile.in (emacspeak-ss.tar.gz): check git rather than RCS for changes not checked in. 2009-05-23 James R. Van Zandt * testit (ver): eliminate bashism ("==" -> "=") * configure.in: version 1.12.1 2007-03-22 James R. Van Zandt * all.in: specifically call tclsh8.4, since tclsh8.3 fails 2007-03-21 James R. Van Zandt * Makefile (VERSION): version 1.12 * all.in: changes for tcl 8.4: "file0" -> "stdin", "#!/usr/bin/tcl" -> "#!/usr/bin/tclsh; package require Tclx" 2006-03-01 James R. Van Zandt * configure.in (VERSION): version 1.11 2006-02-11 James R. Van Zandt * all.in (clean): for any unrecognized voice, use Betty. (clean): for any unrecognized voice, use Dennis. 2006-02-08 James R. Van Zandt * all.in (tts_sync_state): new procedure (clean): substitute for generic voice command [ :dv ... ] * apollo.in (version): new procedure * doubletalk.in (version): new procedure * accent.in (version): new procedure (stub) * braillenspeak.in (version): new procedure (stub) * ciber.in (version): new procedure (stub) * pchablado.in (version): new procedure (stub) 2006-02-06 James R. Van Zandt * configure.in (VERSION): version 1.10 * Makefile.in (install): install servers as executables * all.in: include interpreter filename, so servers are executable scripts * Makefile.in (uninstall): rm only the blurbs added by this package, not all blurbs. 2002-11-28 James R. Van Zandt * braillenspeak.in: When asked for "all" punctuation, use device's "most" code instead (thanks to Tyler Spivey ) 2002-01-12 James R. Van Zandt * TROUBLESHOOTING (port): correct capitalization of DTK_PORT. Describe running a server with tcl. 2001-12-25 James R. Van Zandt * configure.in (VERSION): version 1.9 * doubletalk.in: When isolating version number, anchor regex at both beginning and end. * all.in: with a recent Solaris, stty now requires "<" to set a serial port (thanks to Rich Burridge ) * testit (efile): add -F flag to strace command, to follow vforks. Record tails of three log files: emacs, tcl, and ping-apollo processes. 2001-09-11 James R. Van Zandt * accent.in: ESC is global 2000-12-11 James R. Van Zandt * README.doubletalk: The doubletalk PC device driver is now part of the standard Linux kernel sources. 2000-07-20 James R. Van Zandt * configure.in (VERSION): version 1.8 * accent.in(tts_initialize): declare ESC global. 2000-05-07 James R. Van Zandt * Makefile.in (uninstall): remove servers and blurbs from subdirectories. * apollo.in, doubletalk.in: C-e d V quotes ROM version number. * accent.in (and other servers): C-e d V quotes emacspeak-ss version number. * Makefile.in: insert package version number into servers. * configure.in (VERSION): version 1.6 * Makefile.in (install): install servers and .blurb files in subdirectories of /usr/share/emacs/site-lisp/emacspeak per expectations of emacspeak 12.0. 1999-12-20 James R. Van Zandt * accent.in: enable slower speeds (Accent codes A, 9, and 8). 1999-11-03 James R. Van Zandt * all.in: replacing `@' with " at ", as workaround for firmware bug in DoubleTalk LT (thanks to Matthew Campbell ). 1999-10-10 James R. Van Zandt * README: quote URL for RPMs. 1999-08-08 James R. Van Zandt * configure.in (VERSION): version 1.4 * all.in: Don't use stty on the DoubleTalk PC (thanks to Matthew Campbell ) 1999-08-07 James R. Van Zandt * configure.in (VERSION): version 1.3 * all.in: Reverting to previous handshaking settings (using crtscts switch on stty) because revised code fails (thanks to Tim Cross ). * README: Dr. Raman is leaving Adobe, so show only his Cornell email address. 1999-05-30 James R. Van Zandt * configure.in (VERSION): version 1.2 * all.in: revised handshaking to match that in Dr. Raman's DECtalk Express speech server. * testit (file): when listing device files, include ls error messages in log. Before running strace, check that it is installed and print its version. * OtherSynthesizers: renamed tts_globals -> tts. * pchablado.in: renamed tts_globals -> tts. * doubletalk.in: renamed tts_globals -> tts. * ciber.in: renamed tts_globals -> tts. * braillenspeak.in: renamed tts_globals -> tts. * apollo.in: renamed tts_globals -> tts. * accent.in: renamed tts_globals -> tts. * all.in: renamed tts_globals -> tts. (tts_resume): follow message with $tts(flush), not just \013. (tts_gobble_acknowledgements): delay shortened from .1 to .01. (r): new procedure to queue a rate command. (speech_task): follow text with $tts(flush), not just \013. Set mark before requesting a tone, wait for report. (q): look for environment variable EMACSPEAK_DIR for drip.au. emit tone as well as drip sound if many things are queued (?). (queue_backup): handle empty queue, or queue with only one element, gracefully. (tts_selftest): new routine to emit ten statements. (which_os): new procedure to guess the OS. (which_port): new procedure to guess which port. (main pgm): appeal to which_os and which_port. 1999-02-20 James R. Van Zandt * blurbs/ciber232.blurb (blurb): Description should not have "plus". Sat Feb 20 23:50:27 1999 James R. Van Zandt * doubletalk.in: Do not die if version from status report is empty. 1999-02-20 James R. Van Zandt * CREDITS: Thank Oscar Fernandez. 1998-12-11 James R. Van Zandt * Makefile.in (install): installing servers and .blurb files without execution permission. Wed Dec 9 02:23:38 1998 James R. Van Zandt * apollo.in: Removed some debug code. Mon Dec 7 01:24:06 1998 James R. Van Zandt * apollo.in: tts_poll calls tts_ping rather than just "ping". In debug mode, writing result of ping. tts_poll requires that synthesizer be muted before returning. tts_ping does not bother with local variable for read file. tts_ping returns $status, rather than constant string "status". * all.in: In debug mode, opening file "log.debug". Mon Nov 30 01:15:27 1998 James R. Van Zandt * apollo.in: Revert to @I+ for marking. Use external routine read-apollo to lower RTS then try to read. 1998-12-01 James R. Van Zandt * README (synthesizers): update emacspeak list subscription info. * read-apollo.c (main): reverse sense: *raise* RTS line while trying to read. Mon Nov 30 00:54:11 1998 James R. Van Zandt * apollo.in: Use @I+ for marking. Use external routine read-apollo to lower RTS then try to read. Thu Nov 26 00:27:22 1998 James R. Van Zandt * apollo.in: Revert to @I+ for marking. Use stty to defeat RTS/CTS handshaking when trying to read. Sun Nov 22 15:59:56 1998 James R. Van Zandt * apollo.in: tts_ping added docs on sound effects added exercise all the query commands. Use the @Ec command for indexing. Include the ROM vesion in the version report. Tue Nov 17 02:22:40 1998 James R. Van Zandt * all.in: tts_get_acknowledgement: allow for synthesizer that must be polled. * apollo.in: poll synthesizer for index marks. 1998-11-15 James R. Van Zandt * testit: Record lots of context in log.tcl. Mon Nov 16 02:48:16 1998 James R. Van Zandt * doubletalk.in: Interrogate serial-connected DoubleTalk. Issue tone commands only if they are supported. Wed Nov 11 22:51:47 1998 James R. Van Zandt * doubletalk.in: add measured speaking rates to comments. 1998-11-11 James R. Van Zandt * blurbs/ contains .blurb files. * all.in: call for "drip.au" instead of "progress.au" 1998-08-02 James R. Van Zandt * find-ss: call /bin/bash rather than /bin/sh Mon Jul 27 01:30:35 1998 James R. Van Zandt * all.in: saving name of device in tts_globals(port) * accent.in: set serial port to Accent default of 9600 n 7 1 Sun Jul 26 18:48:56 1998 James R. Van Zandt * accent.in: rate_command_initialized? is global. Thu Jul 16 12:22:05 1998 James R. Van Zandt * accent.in: deleted superceded comment. Wed Jul 15 01:48:49 1998 James R. Van Zandt * all.in: substituting for voice commands only after other substitutions (which otherwise can damage the speech server commands). 1998-07-30 James R. Van Zandt * apollo.in: added draft server. Does not do indexing, which apparently means that text following a voice change is lost. 1998-07-26 James R. Van Zandt * accent.in: (tts_initialize) set port for 9600 n 7 1 per Accent default. 1998-07-25 James R. Van Zandt * accent.in: (tts_initialize): rate_command_initialized? is global. 1998-07-20 James R. Van Zandt * Makefile.in (all): executing interleave as ./interleave 1998-07-18 James R. Van Zandt * Makefile.in (all): use prefix, as suggested by Kerry Hoath * configure.in (VERSION): prefix defaults to /usr 1998-07-14 James R. Van Zandt * all.in: substituting for voice commands only after other substitutions (which otherwise can damage the speech server commands). The symptom is speaking "0 Oindent 4 0 O" instead of "indent 4" at the beginning of a line in tcl-mode. Bug reported by Kerry Hoath . 1998-07-11 James R. Van Zandt * README: combined READMEs from separate packages. * accent.in: Adapted from Jack Chen's complete server dtk-accent. * braillenspeak.in: Adapted from previous complete server dtk-bs. * doubletalk.in: Added silence_command. Sun Jul 12 01:12:14 1998 James R. Van Zandt * all.in: Deleted bogus argument from #include line. Added {{{ grouping comments, so Emacs forward-list command works (except that it miscounts in some regexps). Put "dectalk_" back into names of wrapper functions. sh now calls silence_command to do the real work. * doubletalk.in, braillenspeak.in, accent.in: Initial revision Fri Jul 10 01:58:40 1998 James R. Van Zandt * all.in: Initial revision