home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / talkx.zip / README.OS2 < prev    next >
Text File  |  1996-09-13  |  7KB  |  150 lines

  1. This is a rough port of Rsynth2.0, an English text -> speech app originally 
  2. written for a Sun Sparcstation.  With help from some very nice people,
  3. I have re-implemented say.exe to multithread playing the audio data
  4. and calculating the next phrase, with the result that readings of
  5. large files are now much smoother.  I have also eliminated the chipmunk
  6. problem, and so have removed the +C switch.  For those interested in 
  7. changing/improving the speech quality of this package, I have implemented
  8. a sayrc file, residing in the $HOME directory, that will allow a user
  9. to implement an entirely different set of Klatt Synthesizer Parameters
  10. for use by this package.  Installation and usage of this file is entirely
  11. optional.
  12.  
  13. Rsynth, with just a little work, can be modified to become a Speech output 
  14. library, good for that talking Web Browser the world so desperately needs. 
  15. As a matter of fact, there's a print to Rsynth option in my Lynx/2 cfg file 
  16. right now.  Or maybe the IRC client that speaks......
  17.  
  18. Using the Executables:
  19.  
  20. There are three OS/2 executables in this Zip file. They are all written 
  21. with EMX/GCC, so you will need the EMXRT stuff to use them.  They are:
  22.  
  23. Say.exe        - the actual text -> speech app
  24.  
  25. mkdictdb.exe   - Makes the required Dictionary Database file from 
  26.                  an external Dictionary
  27.  
  28. dlookup.exe    - Looks up Phonemes from the database Dictionary.
  29.  
  30. Running Say.exe:
  31.  
  32. Typing "Say --help" on the command line will show you all the command line 
  33. options.  The important ones for OS/2 are as follows:
  34.  
  35.      -r samp rate  Valid values for this are 8, 11, 22, and 44. This is the
  36.                    sample rate used either for generating WAV files or 
  37.                    speaking directly. The default is 8 kHz.  The default 
  38.                    value should be used for creating AU files, any valid 
  39.                    value may be used for WAV file creation or speaking 
  40.                    directly.
  41.  
  42.      +Q            Quiet mode - if specified on the command line, will not 
  43.                    speak to MMPM.
  44.  
  45.      -b 16         This will specify 16 bit playback (for sound systems
  46.                    that can support this).  The default is 8 bit.       
  47.  
  48.      -o filename   This saves a file in AU format. If you have installed 
  49.                    MMOS/2 AU sound support, you can then use PLAY.CMD to 
  50.                    listen to it.  AU sound support for MMOS/2 is part of 
  51.                    the Warp BonusPak - you will need to install  this if 
  52.                    you have yet to do so.
  53.  
  54.      -w filename   This saves a file in WAV format.  All WAV files are 
  55.                    stored as 8 bit mono, until I can figure out how to 
  56.                    do otherwise.
  57.  
  58.      -f frequency  Fundamental Frequency for the voice - default is 1330 Hz.  
  59.  
  60.      -v            Verbose output- print a lot of stuff to the screen while
  61.                    doing the conversion. 
  62.  
  63.       <filename    get text to say from file filename, otherwise takes 
  64.                    stuff to say from command line.  If there is no text
  65.                    on the command line, and no text redirected into 
  66.                    SAY.EXE, Then Say will takes it's text to convert 
  67.                    from stdin.
  68.  
  69. Mkdictdb.exe:
  70. dlookup.exe :
  71.  
  72. I have not included a dictionary or a dictionary database in the distrib-
  73. ution.  Say will work without it, but is more accurate in pronunciation 
  74. with one.  Read the README file for information as to where to find 
  75. American English and British English dictionaries and how to convert them 
  76. using mkdictdb.exe. I have placed the ASCII version of the source diction-
  77. ary I am using on my web site, http://www.cris.com/~djd/products.html,
  78. for your convenience as well. This will need to be converted by MkDictdb.  
  79. These dictionaries are in a fairly simple ASCII format, so it is pretty 
  80. easy to modify or add words to them.  So, for instance, the word 
  81. "LuxuryYacht" could actually be pronounced Throat-Wobbler-Mangrove, or you 
  82. could do horrible things to the pronunciation of the word "Microsoft". 
  83. Or you could actually do something useful with it - your choice.
  84.  
  85. Be warned that the resulting Dictionary file is fairly large.  Say.exe 
  86. looks for a dictionary file in the $ETC directory named Adict.db
  87. by default.  The command line switch -d b causes it to look for the 
  88. alternate dictionary bdict.db.
  89.  
  90. You should also be warned that the conversion process can take several 
  91. hours, and that MkDictDB is poorly designed in that it has no progress
  92. meter.  
  93.  
  94. Once you've made the dictionary, say.exe will look for it in your 
  95. $ETC directory, so it would be useful to move it there.  
  96.  
  97. The sayrc file
  98.  
  99. This distribution includes a file named sayrc, useful for changing
  100. the parameters for the Klatt Synthesizer.  SAY.EXE will look for 
  101. this file in the $HOME directory, and load the parameters from it
  102. if found. If SAY cannot find this file, it will use it's default 
  103. parameters.  Please respect the format and order of the sayrc file,
  104. as the algorithm used to read this file is other than robust.
  105.  
  106. What do the parameters mean?  That's a good question - and one for 
  107. a tutorial on Speech Synthesis with the Klatt synthesizer, and 
  108. way beyond what can be adequately covered in a README file.  If
  109. you find such a tutorial, I'd like to know about it.  The sayrc 
  110. file option is included here to give the end user a chance to 
  111. improve the quality of RSynth's speech noises - if you come up 
  112. with a wonderful, unusual, or merely interesting sayrc, I'd
  113. like to see it.  
  114.  
  115. Notes for Programmers:
  116.  
  117. Everything here compiles under EMX/GCC, using Gnumake as the make utility.
  118. You will also need to have GNU GDBM ported over to OS/2 - I highly 
  119. recommend Kai Uwe Rommel's port, which can currently be found on
  120. ftp.leo.org. Your mileage may vary with other development environments.
  121.  
  122. There has been at least one person who has sucessfully recompiled  Rsynth
  123. with IBM Cset. I tried here (not very hard) with some success, but had
  124. difficulties with the port of GDBM.  So, this version is still on EMX.
  125.  
  126. Stuff that needs to be done:
  127.  
  128. Floating Point Underflow problem
  129.  
  130. This has been a real bugbear to fix - I hope I have it fixed now.  If you
  131. get floating point underflow exceptions with say.exe Please Email Me!
  132.  
  133. Creating a Speech Output Library
  134.  
  135. It should be fairly easy to take functions from say.c and create a speech 
  136. output API - speech_init(), Say_string(), say_file(), Speech_close() would 
  137. be a minimal function set.  Then put 'em in a DLL. Any Takers?
  138.  
  139. Mods to Improve Speech Output Quality
  140.  
  141. The support for sample rates other than 8000 helps. Raw data created by 
  142. Rsynth is 16 bit, so adding a switch for 16 bit support, and updating the 
  143. audio_init, audio_play, was definately a  worthwhile thing to do - the 
  144. sound quality at 16 bit is greatly improved.
  145.  
  146. It would be nice to figure out how to make 16 bit WAV files as well.
  147.  
  148. Derek J Decker         djd@cris.com 
  149.  
  150.