Newsgroups: comp.speech
Path: pavo.csi.cam.ac.uk!warwick!doc.ic.ac.uk!agate!spool.mu.edu!uunet!munnari.oz.au!hp9000.csc.cuhk.hk!cucs5.cs.cuhk.hk!yu030
From: yu030@cs.cuhk.hk (Yu Wai Leung)
Subject: Klatt SYnthesizer (How to work)
Message-ID: <1993Jan8.024840.12894@cucs5.cs.cuhk.hk>
Sender: news@cucs5.cs.cuhk.hk
Organization: Faculty of Engineering, The Chinese U. of Hong Kong
Date: Fri, 8 Jan 1993 02:48:40 GMT
Lines: 99

Hi!

       Guide to make a workable Klatt Synthesizer
       ------------------------------------------

       1. Subscribe the 3 parts of the Klatt synthesizer from
          nn. (The set sent by "CTI acct" is ok!)
       2. Cut off the header for the three files. You can do
          this by using a text editor (like vi). For each file,
          you can identify the header part and data part 
          easily because the data part is a long, continous and
          unreadable string of characters.

          Note: The first line of the data part of PART ONE starts
                like this:

                begin 777 klatt.tar.Z
                [Subsequent lines]
           
       3. Merge the 3 files into a single text file using a text
          editor. Put PART ONE in the editor first, then insert
          PART TWO at the end of PART ONE (leaving no spaces)
          Then insert PART THREE at the end of PART TWO.       

       4. Let us called the merged file "klatt.tar.Z". Now we are
          ready to extract the source codes.

          A) Use uudecode to get a compressed tar file FIRST:

          % uudecode klatt.tar.Z

          This will produce a compressed tar file klatt.tar.Z

          B) Then use uncompress to get a "plain" tar file

          % uncompress klatt.tar.Z

          This will produce a tar file called klatt.tar

          C) Use tar to extract all sources files

          % tar -xvf klatt.tar

          This time the source files will be produced. Wow!

          Notice: The source codes will be produced on a 
                  subdirectory called "klatt" under your
                  working directory.

          D) Use "make" to build all executables

          % cd klatt
          % make

          CAUTION: Unless you are VERY LUCKY, you must modify the
                   source codes before you can get a WORKABLE
                   version.

   
   SOFTWARE:

   There are 4 executables:

   klatt: Klatt synthesizer

          A menu-driven (though very "UGLY") klatt syn which can
          accept a parameter files are produce sound from it. Ideal
          for experts who wish to generate parameter file by his own
          and fine-tuning parameters of the synthesizers.

   gen:   Phoneme-to-speech
        
          Users can produce speech from phonemes input by user, ideal
          for casual users. It calls uklatt to produce sound.

   uklatt: Parameter-file to speech converter.
   sklatt: Similar to uklatt (?)


   NECESSARY MODIFICATION:

   hplay.c: If you examine the code you'll find a "dummy" printf 
            statement, you should use hplay.old instead.

   libaudio.h: These are a set of SUN audio header files. Make sure
   (and others) that you've selected the right include file path in your
                makefile            
  
   libaudio.a: You must supply this library in the linking process,
               otherwise there will be linking errors.

   The speech waveform is stored in an array called "iwave". This
   array is a short integer array (so, the resolution is 16-bits).
   These data are compressed by mu-law and stored in another array
   called "plabuf". Speech sampling freq=8000 Hz. If you want to
   extract the waveform, you can "hooked" into the routine
   "hplay" in hplay.old.


