home *** CD-ROM | disk | FTP | other *** search
/ Chestnut's Multimedia Mania / MM_MANIA.ISO / speech / tran04 / tran04.doc < prev   
Text File  |  1990-11-04  |  6KB  |  152 lines

  1.              TRAN, version 0.4
  2.                           September  1990
  3.  
  4.  
  5. TRAN is a text-to-speech program for the I.B.M.-P.C..  It can read ASCII
  6. (askey) text files, translate normal English spelling to phones (basic
  7. building blocks of speech sounds.  TRAN can also sound out each phone
  8. through the internal speaker of the P.C., to an 8-bit DAC on one of the
  9. P.C.'s I/O ports, or to a binary sound file. 
  10.  
  11.     usage: tran [ +|- flags] [-options] [file-name]
  12.  
  13. The file-name is an ASCII text file (with no word processor formatting
  14. codes).  If no file-name is given TRAN reads input from the keyboard; in
  15. this case the program can be terminated with CTRL-C.  
  16.  
  17. The TRAN program contains two independent sets of 47 phones.  For the
  18. internal speaker, TRAN uses a set of phones encoded as a sequence of
  19. bits which determine the position (in or out) of the P.C.  speaker at a
  20. rate of about 16 kilohertz.  When outputting to an I/O port, TRAN uses a
  21. set of phones with 8-bit values for generating the speech wave-forms
  22. with a digital-to-analog convertor (DAC) at a rate of 10 kilohertz. 
  23.  
  24.  
  25. COMMAND LINE OPTIONS
  26.  
  27. Command line flags and options control various features of the program. 
  28. A '+' turns the flag on and a '-' turns the flag off.  Options can use
  29. either '+' or '-'.  The square brackets below indicate default values. 
  30.  
  31.     flags: + = on, - = off
  32.        i   use hardware interrupts to time the output [off]
  33.            P   type output of phone translation [off]
  34.            r   type rule number and phone translation [off]
  35.            s   say output (make sounds) [on]
  36.            t   echo input to console [off]
  37.            T   do phone translation [on]
  38.            v   type other internal information [off]
  39.  
  40.     options:
  41.            c        say the time of day once
  42.            C        say the time of day every 10 seconds
  43.            D N      make an 8-bit waveform file for phone N
  44.           d1 N      use N for space delay [5]
  45.           d2 N      use N for voice pitch [1]
  46.            f N      output 8-bit wave-form to binary file N
  47.            R        print all pronunciation rules
  48.            p N      output 8-bit wave-forms to DAC at port N
  49.                     where N = LPT1, LPT2, or LPT3 for a printer port
  50.                     or N = VMK1, VMK2, VMK3, or VMK4 for a COVOX VMK board
  51.                     or N = INT to use the internal speaker
  52.                     or N = the hexidecimal port number
  53.            z        print duration and loudness of each 8-bit phone
  54.            Z        make 8-bit waveform file for each phone
  55.            ?        type this summary of TRAN usage
  56.  
  57.  
  58. USING TRAN
  59.  
  60. The following are examples of ways to use the TRAN program.  The
  61. simplest way to use TRAN is just to type "tran" without any command line
  62. arguments.  In this case TRAN will interactively read lines you type and
  63. attempt to speak these lines as English text.  
  64.  
  65. You can have TRAN type out and read this file with the command:
  66.  
  67.     tran +t tran.doc
  68.  
  69. If you also want to see the phone translation add the +P flag:
  70.  
  71.     tran +P +t tran.doc
  72.  
  73. You can save the phone translation in a file by typing
  74.  
  75.     tran -s +P tran.doc > tran.phn
  76.  
  77. and listen to the phone translation at some other time file by typing
  78.  
  79.     tran -T tran.phn
  80.  
  81. You can save the sound output in a binary file by typing
  82.  
  83.     tran -f tran.trn tran.doc
  84.  
  85. The sound file format is a 128 byte header followed by 8-bit (unsigned)
  86. waveform values.
  87.  
  88. The TRAN program will say (and type) the time of day once if you type
  89.  
  90.     tran +t +c
  91.  
  92. or will continue to announce the time every 10 seconds if you type
  93.  
  94.     tran +t +C
  95.  
  96.  
  97. ADJUSTING THE OUTPUT RATE
  98.  
  99. When TRAN outputs to the internal speaker of the I.B.M.-P.C., there are
  100. two timing parameters, d1 and d2, that control the rate that TRAN
  101. speaks.  These are set automatically, but can be adjusted if necessary. 
  102. Making d1 larger increases the pauses between words and making d2 larger
  103. lowers the pitch of the voice during phones.  Both d1 and d2 must have a
  104. value of 1 or greater.  On a 4.77-MHz, I.B.M.-P.C./X.T., the best values
  105. for the timing parameters are d1=2 and d2=1.  Setting these values
  106. explicitly, by-passes the automatic setting, which saves a second or two
  107. starting the program.  These values can be set on the command line
  108.  
  109.     tran -d1 2 -d2 1 ... 
  110.  
  111. or by using the environment variable TRAN to pass these values
  112.  
  113.     set TRAN= -d1 2 -d2 1
  114.  
  115. Any of the other command line flags and options may also be set using
  116. this environment variable.
  117.  
  118. When TRAN outputs to an I/O port, the rate may be determined either by a
  119. programmed delay loop (as it is for the internal speaker) or by
  120. borrowing hardware interrupts from the timer normally used by DOS to
  121. keep trak of the time of day.  The default is to use the programmed
  122. delay loop and the loop count can be adjust using -d1 as described
  123. above.  The +i flag enables the hardware interrupt timing method.
  124.  
  125.  
  126. REFERENCES
  127.  
  128. The speech-to-text rules used in the TRAN program come mostly from an
  129. article in an IEEE journal:
  130.  
  131.     Elovitz, H.S., Johnson, R., McHugh, A., and Shore, J.E.  (1976). 
  132.     "Letter-to-Sound Rules for Automatic Translation of English Text to
  133.     Phonetics," IEEE Transactions on Acoustics, Speech, and Signal
  134.     Processing, Vol. ASSP-24(6), pp 446-458. 
  135.  
  136. See the file RULES.TXT for a complete list of the speech-to-text rules
  137. used by the TRAN program. 
  138.  
  139. The 1-bit phones were extracted from a public domain program called
  140. SPEECH by Andy McGuire.
  141.  
  142. The 8-bit phones were recorded from my voice with an 8-bit
  143. analog-to-digital convertor (COVOX Voice Master) and can be output to
  144. any 8-bit (unsigned) digital-to-analog convertor (DAC) attached to any
  145. P.C.  I/O port (for example, the Speech Thing, also from COVOX, which
  146. attaches externally to the printer port).  For further information
  147. regarding these products, please contact:
  148.  
  149.                 COVOX inc
  150.                 675-D Conger Street
  151.                 Eugene, OR 97402
  152.