Go to the first, previous, next, last section, table of contents.


For the Impatient

This chapter describes the minimum information required just to get you started and running. It is in no way complete and you will probably get stuck quite quickly. See section Getting Started, when that happens.

CHATR offers a command line interface. The system is started using the UNIX level command

     chatr

CHATR will now execute the `.chatrrc' file in the user's home directory if it exists, or from `~/lib/data/' otherwise. It is highly recommended that users should copy the default `.chatrrc' into their own directory. Commands can then be added to suit your own local set-up.

To determine where the library is, start CHATR and type

     load-path

Note this is one of the few CHATR commands that does not need to be enclosed in parenthesis.

The name of the library directory will now be displayed. Exit CHATR using `q' (or end-of-file [ctrl-D] on many systems), and substitute the path-name reported above in the command

     cp path-name/default.chatrrc ~/.chatrrc
     chmod +w ~/.chatrrc

IMPORTANT: The only necessary change you must make to this file is to identify the type of audio output you wish CHATR to use. Edit your copy of the setup file and follow the instructions for selecting an audio device. See section Audio Setup - Software, for details. If your system is a common one, you only have to uncomment a line or two.

Once started, CHATR displays the prompt

     chatr> 

You may type commands to this interface. Normal EMACS commands can be used to edit a line while entering it, and previous commands are available using ctrl-P (as in all good shells).

The completion character is (by default) TAB. It will complete commands, arguments of commands, filenames (and pathnames) and variable names depending on context. Typing TAB twice will show all possible completions.

The command interface is Lisp-like (it has what is called a read-eval-print loop). It reads an s-expression (an atom or list enclosed in parentheses), executes it and then prints the returning value. All commands are of the form

     ( <command name> <arg~1> <arg~2> ... )

Commands may (often) be nested as in Lisp (if you do not understand that don't worry about it).

A useful command is

     (Help)

This will list all the available commands. If Help is given a command name as an argument, specific help is given for that command. For example

     (Help Synth)
     (Synth <utt-obj>)
         Synthesize the given utterance based on various 
         conditions.  The utterance object is destructively 
         updated but is also returned by this function.  

Additionally, while typing commands, the key sequence meta-H will display help for the current command being typed.

An important command is load. This command takes a single filename as an argument. Filenames should be enclosed in double quotes. The system loads that file, which should contain CHATR commands. It executes each command in turn.

Another important command is load_library. This will load a given file, but from the library directory. The library directory contains a number of useful CHATR command files. See section Library Load-path, for information on how to set the library path. You may also have your own personal library directory and include that in the library search path.

Assuming you have selected a suitable audio device, you can now use the system. Utterances can be specified, synthesized and then played (or graphically displayed if required). Utterances can be specified in many ways and at many levels of abstraction. The following is a very simple example. At the prompt type

     (set utt1 (Utterance Text "hello"))

This creates an utterance of `Text' type. Note this only creates the utterance, no synthesis or saying of the utterance takes place. The variable utt1 is set to this created utterance.

Commands may be broken over lines (ctrl-C will return you to top level), the matching final parenthesis signaling the end of the command.

Having created an utterance, to synthesize it type

     (Synth utt1)

and to actually hear it, type

     (Say utt1)

Assuming that you have set up your audio output correctly, you should hear the word `hello' spoken in the default English voice.

A simple text-to-speech (tts) system is also available. To use it, type the command

     (tts "-")

The prompt will change to

     chatr_tts>

Now all text typed will be synthesized. You must terminate your sentences with a period, a question mark or an exclamation mark before CHATR will synthesis it. `Return' alone will not initiate synthesis. To terminate this sub-mode, enter an empty sentence (i.e. a single period on a new line after terminating the sentence on the previous line).

If the function tts is given a file name as an argument, the contents of that file will be spoken.

A simpler method of using tts is directly from the Unix shell command line. (i.e. it is not necessary to first start CHATR.) The following shell command will cause the text in file `fred' to be spoken

     chatr -tts fred

Or for Japanese (files containing Kana/Kanji) use

     chatr -jtts fuleddo

For files containing mixed English/Japanese use

     chatr -mtts japlish

Also, you may use CHATR interactively as a text-to-speech system by typing (from the command shell)

     chatr -i -tts

Again, the prompt changes to

     chatr_tts>

Now all text typed will be synthesized. When this mode is terminated with a period as described above, control returns to the command shell.

Note interactive tts is currently only available for English. Although CHATR jtts and mtts (multi-lingual tts) functions exist, presently these can only be used with a Japanese (Kana, Kanji or Romaji) text file. This is because the interactive shell cannot currently interpret Kana/Kanji. Romaji can be input, but only in English tts mode. Also note the EMACS interface makes interactive synthesis much easier (see section EMACS Interface).

Kana/Kanji to romaji conversion is not done within CHATR but through an external (proprietary) program called `kan2rom'. This takes in Kana/Kanji and returns romaji with break levels and accent marks. It reads from `standard in' and writes to `standard out'. It is assumed that a copy exists. If not, an alternative (free!) method called `kakasi' is catered for but not used for default. The shell script in `lib/etc/k2r' is the interface. If `kan2rom' is not available, `k2r' must be renamed `kan2rom'. Normal Japanese text-to-speech should then work, though it will not be as good. The Lisp function poor_jtts uses the `kakasi' program by default.


Go to the first, previous, next, last section, table of contents.