
This is so small it isn't documentation, but is a reminder about what
to do when training

See:

    http://www.speech.cs.cmu.edu/sphinxman/
    http://www.speech.cs.cmu.edu/sphinxman/scriptman1.html

for much more details

This is a quick note for how the scripts to train S3 models and
convert them for use with S2.

Got to a new directory where you have the space

   mkdir time
   cd time

Set up the directory structure, scripts and config files

   perl $SPHINXTRAINDIR/scripts_pl/setup_SphinxTrain.pl -task time

The main config file is put into etc/sphinx_train.cfg

Put your waveform files in wav/

Create the following files:

   etc/time.fileids  
       List of file ids for each wav file e.g.
            time0001
            time0002
            ...

   etc/time.phone
       The phones in the phone set
            SIL
            AA
            AE
            ..

   etc/time.transcription
       Word transcription of each file, must end in (FILEID), these
       are probably upper case words, but can include filler words too
           <s> THE TIME IS NOW ... </s> (time0001)

   etc/time.filler
       List of filler words and their pronunciation (using the phones) e.g
           <s> SIL
           </s> SIL
           <sil> SIL
           /NOISE/ +NOISE+

You will need a dictionary. You can either download one from
http://www.speech.cs.cmu.edu/sphinx/models/hub4opensrc_jan2002/cmudict.06d,
or you can create your own. If you decide to create your own, you will
also need to install Festival (http://festvox.org).

If you decide to create your own dictionary, create it with (only
works for US English)

   bin/make_dict etc/time.transcription

This will create etc/word.known etc/word.unknown files; check them.

Once you are happy, 

   mv etc/word.known etc/time.dic

Make the melcep feature files

   perl scripts_pl/make_feats.pl -ctl etc/time.fileids

Now we can start on the basic perl scripts. Their results will be put
in perl_time.html, which you can view as things progress.  Note the
scripts aren't guaranteed, and problems do occur, though often the
error message is actually indicative of the error.

There is a number of larger choices in building models, one is to
build continuous models or semi-continuous.  Only semi-continuous can
be used by Sphinx2, and preferably continuous models are used with
Sphinx-3.

The directory ./scripts_pl has several subdirectories starting with
"0" (zero). Each of these has a file named "slave.something.pl", or it
has a single .pl file. To run the trainer, run the "slave*.pl" or the
single "*.pl" file in each directory, in sequence. The file
"./scripts_pl/RunAll.pl" has an example of a script that runs all the
steps in sequence".

Example:

# Doesn't do enough checking, but may help
   perl ./scripts_pl/00.verify/verify_all.pl 
# Can take several minutes
   perl ./scripts_pl/01.vector_quantize/slave.VQ.pl
# Initial BW training
   perl ./scripts_pl/02.ci_schmm/slave_convg.pl
   perl ./scripts_pl/03.makeuntiedmdef/make_untied_mdef.pl
   perl ./scripts_pl/04.cd_schmm_untied/slave_convg.pl
   perl ./scripts_pl/05.buildtrees/slave.treebuilder.pl
   perl ./scripts_pl/06.prunetree/slave.state-tie-er.pl
   perl ./scripts_pl/07.cd-schmm/slave_convg.pl
# Needed only if you're creating sphinx2 models
   perl ./scripts_pl/08.deleted-interpolation/deleted_interpolation.pl
   perl ./scripts_pl/09.make_s2_models/make_s2_models.pl
     
===========================================================================
Chart of training process 



                         Training chart for
                             SphinxTrain
                        =========================
                             type of model
                                   |
                    ----------------------------------
                    |                                |
               continuous                      semi-continuous
                    |                                |
                    |                         vector-quantization
                    |                                |
                    ----------------------------------
                                   |...make ci mdef
                                   |...flat_initialize CI models
                             training CI models
                                   |...make cd untied mdef
                                   |...initialize
                                   |
                             training CD untied models
                                   |
                                   |
                                   |
                             decision tree building
                                   |...prune trees
                                   |...tie states
                                   |...make cd tied mdef
                             training CD tied models
                                   |
                                   |
recursive            ----------------------------------
gaussian splitting.. |                                |
                 continuous models              semi-continuous models
                     |                                |
                     |                                | 
                -----------                           |
                |         |                    deleted interpolation
          decode with   ADAPT                         |
          sphinx3                                     |---ADAPT
          or sphinx4                                  |     |
          decoder                                     |     |
                                                ----------------
                          make cd tied mdef ... | .............|
                          with decode dict and  |           convert to
                          pruned trees          |           sphinx2
                                         decode with           |
                                         sphinx3               |
                                         decoder               |     
                                                               |
                                                            decode with
                                                            sphinx2
                                                            decoder
                                                  (currently opensource
                                                   and restricted to
                                                   working with sampling
                                                   rates 8khz and 16khz.
                                                   Once the s3 trainer is
                                                   released, this will have
                                                   to change to allow
                                                   people who train with
                                                   different sampling rates
                                                   to use this decoder)

  

======================================================================

