
<sect> Options
<p>

Most aspects of the operation can be customized by changing options.
This can be enforced by TTSCP commands, in configuration files and
on the command line.  Basically, an option is an option name/option value
pair. There are a few possible option types: number, string, yes/no,
character, and a few enumerated types.

Almost all individual options are documented in <ref id="indivopts"
name="this document">.  If you strongly suspect this section of
documentation to be out-of date, the reliable list of all built-in
long options can be found in <tt>src/options.lst</tt>.  (See approximately
line 320 and below. Every line represents at most one option for every
option class as explained below. The option name is quoted; its
semantics is usually explained following the option.)  You can also
list the option names and types using <tt>epos -H</tt>.

<sect1> Option classes
<p>

Basically, there are three major classes of options: global options,
language options and voice options. For instance, switching a voice
means switching to another set of voice options, while the language
options and global options stay the same.

Every voice is language specific (implies a specific language).
That's why switching the language automatically switches the voice
to the voice defined as default for this particular language.
(It is however possible to use the same configuration file to setup
a similarly sounding voice for every language if desired.)
It is also important to distinguish between a voice and an inventory.
An <em/inventory/ is a set of speaker-dependent files used
to base a <em/voice/, that is, a mode of speech, on.  Multiple
different voices may use the same inventory, and may even sound
quite different depending on various configuration options.
The average user may expect to be able to modify the voice dependent
configuration files, but not inventory files.  Also, the inventories
may often be distributed externally to Epos, while sample voices
based on them may either be included with Epos, or with the
segment inventory, or their creation may be left to the user.

A set of voice options should completely describe a voice.
A set of language options should completely describe a language,
except for voice-specific behavior. A set of global options
should cover language independent aspects of operation.
It should be understood that a set of options may employ various
references to other information, especially filenames (of language
dependent transcription rules, voice dependent segment inventories
etc.)

Some language and/or voice specific options may have suitable defaults
for all but specific languages/voices. That's why there is a corresponding language
option for every voice option to default to if unspecified for a given
voice. Likewise, there is a global option for every language option
to default to. Therefore, adding a new language or voice options
doesn't necessarily imply adding them to each language or voice
configuration file, if a reasonable default can be suggested.

Whenever an option name is given, it is first understood as a voice option
(of the current voice); if there is no such voice option, the name
is treated as a language option, then as a global option. To override
this order, you can prefix an option with "C:", "L:" or "V:". This will
restrict the search to global, language or voice options, respectively.
(This is automatically done with configuration files, because every
configuration file describes either a language or a voice, or it is unrelated
to the current language and voice altogether.)

<sect1> Configuration files <label id="cfg-files">
<p>

Whenever the program starts up, it reads a number of configuration
files, setting up the initial (default) values of the options.
These are located under <tt>/usr/lib/epos</tt> (unless overidden
at configure/compile time or
with the <tt>--base&lowbar;dir</tt> option on the command line). By convention,
configuration file names have the ".ini" suffix.

(On a Windows NT-like operating system, you can use the
<tt>HKEY_LOCAL_MACHINE&bsol;SOFTWARE&bsol;Epos&bsol;Setup</tt>
registry key to set the value of <tt>Path</tt> to a path leading
to the configuration files.  This value can still be overridden
by the command line.)

Unless overridden, three files in <tt>/usr/lib/epos/cfg</tt> will be processed
to setup the global configuration: <tt>fixed.ini</tt>, <tt>epos.ini</tt> and
either <tt>ansi.ini</tt> or <tt>rtf.ini</tt> (depending on the preferred
output format if colored output is turned on -- either ANSI escape sequences
or RTF are supported at the moment; other markup formats can be added easily).
By convention, <tt>fixed.ini</tt> contains the standard global configuration
values used by a given installation and rarely or never changes, while
<tt>epos.ini</tt> contains less permanent parameters and temporary values.
The global parameters include a list of <em>languages</em>, or language
configurations which will be parsed when the global configuration is set up.
Every language <tt>.ini</tt> file in turn contains a list of <em>voices</em> to be
configured for this particular language. Language configuration files
are located under <tt>/usr/lib/epos/lng/*/*.ini</tt>, voice configuration files
under <tt>/usr/lib/epos/inv/*/*.ini</tt>, where <tt>*</tt> represents any string
listed in the list of languages (or voices for a language). Go see the real
files under <tt>/usr/lib/epos/cfg/*.ini</tt> for an example.

<sect2> Configuration file format overview
<p>

A configuration file contains one option per line (empty lines are ignored).
Each option is a name-value pair, separated with whitespace.  A string value
may be (and sometimes must be, e.g. if it begins with whitespace) enclosed
in double quotes.  Every configuration
file is associated with a certain option set, that is, it contains either just
global options, or options related to some language or voice. (In the latter
two cases, the <tt>name</tt> option identifies the language or voice properly.)

<sect2> Escaping special characters <label id="escaping">
<p>

It is possible to enter some special characters using escape sequences, such
as <tt>"&bsol; "</tt> for a space, <tt>"&bsol;n"</tt> for a newline, or <tt>"&bsol;&tilde;"</tt>
for <tt>"..."</tt> or <tt>"dots"</tt> (treated as a single character in Epos).
The available escape sequences are listed in <ref id="escapes" name="the table of escape sequences">.

<table loc="ht"> 
<tabular ca="|l|l|l|l|">
<hline>
	<label id="escapes">
	escape sequence	| interpreted as  | ASCII code | example@
<hline>
	&bsol;n  |  newline       |  10  |@
	&bsol;t  |  tab           |   9  |@
	&bsol;e  |  escape        |  27  |@
	&bsol;E  |  escape	      |  27  |@
	&bsol;&lsqb; |  escape    |  27  |@
	&bsol;&bsol; |  backslash     |  92  |@
	&bsol;   |  hard space    | 255  |@
	&bsol;&num;  |  hash      |  35  |@
	&bsol;;  |  semicolon     |  59  |@
	&bsol;&commat; |  at sign |  34  |@
	&bsol;&tilde;  |  dots	      |  (1) |  No...@
	&bsol;.  |  decimal point |  (2) |  1.2 kg@
	&bsol;-  |  range	      |  (3) |  2-3 people@
	&bsol;m  |  minus         |  (4) |  -1@
	&bsol;X  |  temporary     | (31) |@
<hline>
</tabular>
<caption>Escape sequences used in configuration files</caption>
</table>

(If you suspect this table to be out-of-date, you can consult the <tt>token&lowbar;esc</tt>
and <tt>value&lowbar;esc</tt> constants in <tt>option.cc</tt>, or the table in 
<tt>parser.h</tt>.) ASCII codes in parentheses are ASCII codes used for different
purposes by Epos.


<sect2> Comments and the @include directive <label id="include-directive">
<p>

A configuration file usually contains various comments. A comment can start
on any line with a semicolon or hash mark and lasts to the end of line.
The semicolon (or hash mark) must be located at the beginning of line
or just after some whitespace. Semicolons in the middle of a word don't
start a comment.

If a line begins with <tt>@include</tt> (possibly preceded by whitespace),
it is treated as the <em>include directive</em>.
The format of the line should be <tt>@include "filename"</tt> and it will
cause the contents of the <tt>filename</tt> file to be inserted at this place of the 
main <tt>.ini</tt> file. These includes can be nested to any finite depth; if no or
relative path is specified, the directory which holds the topmost file is used for
the lookup.

<sect2> Character encoding
<p>

Sometimes it is not convenient or possible to encode all configuration files
in the same character encoding.  For example, character encoding may be
language dependent.  But it is even possible for different lines of the
same file to use different encodings.  You can switch character encodings
for the same file using the <tt>&commat;charset</tt> directive.
Charset name must be specified as a parameter and it must be enclosed in
parentheses.  Epos attempts to load the corresponding unicode character
mapping file and immediately switches the charset number for the current
file.  Please note two differences from the <tt/charset/ option:
the directive only affects the current "logical" file (including included
files as well as any files it has been included from using the
<tt>&commat;include</tt> directive), whereas the option doesn't affect it at
all, but it affects all subsequent files (e.g. for the given language).

<sect2> Other directives
<p>

Two more directives, <tt>@warn</tt> and <tt>@error</tt> with obvious semantics
are available for diagnostic purposes.

<sect1> Command line
<p>

Command line option values can be passed to Epos
at server startup, or to the <tt/say/ utility.
The behavior of these two command lines is very similar, though not identical.
The monolithic Epos executable should not deviate from the server executable,
unless specified otherwise.

The options can be specified anywhere on the command line, and are processed
from left to right before any other text (which is treated as the text to be
synthesized) on the command line.  Long options, which correspond directly
to the options specified in configuration files, are preceded with a double dash
and they take a value, which can be separated
using the equality sign (<tt/=/), or spacing; the value (<tt/true/ or the empty string)
can be understood implicitly, if applicable to the option type, and the option
is followed by another option or comes last at the command line. 
Short options are denoted by single letters, preceded with a single dash, and
they never take a value.

<sect2> Input text
<p>

Technically speaking, this section doesn't cover options, but it is nevertheless
included.

The main purpose of the <tt/say/ utility is to convert a specified
text to speech.  Therefore, any command line text which is not part of an option
name or option value is concatenated together with spaces, and
sent to the server for the usual processing (TTS and phonetic
transcription), after all preceding, intervening or following
options have been sent to the server.

The same is true for the monolithic Epos executable, but in this
case, only a single argument of this sort is accepted.  (Just
enclose the text with quotes to have it treated as a single
argument.  The sole reason why this is so is the less-than-maintained
status of the monolithic executable.)

In both cases, quite random defaults are supplied if no input text
is specified.

It is not possible nor desirable to specify the input text for
the TTSCP server executable.  It is accepted and silently ignored.


<sect2> Long options
<p>

The long options are also available through the <tt/say/ utility;
in such case, the long option is passed to the TTSCP server
without any effect on the <tt/say/ client.

The ordering of the options on the command line is usually not significant,
unless the current language or voice is switched during the processing.
An example:

<tscreen><verb>
say --language german --pausing "Wie geht es?" --show_segments
</verb></tscreen>

This sets the default language to German, enables pausing after each
transformation rule is applied to the text (sets the <tt/pausing/ option
to <tt/true/, in other words) and prints the segment string generated
in the process (sets the <tt/show&lowbar;segments/ option to <tt/true/). The string
to be transcribed and synthesized is given on the command line as well
(it must be quoted unless it consists of a single word).

The list of all available long options together with their types
can be obtained with <tt>epos -H</tt> of the main program (not the client
stub, sorry).  The semantics of nearly all individual long options is described
<ref id="indivopts" name="below">.

For turning long boolean options off, it is possible to give their name
with three dashes. Therefore,

<tscreen><verb>
say ---show_transcript "Say this, do not show the transcription"
</verb></tscreen>

is equivalent to

<tscreen><verb>
say --show_transcript off "Say this, do not show the transcription"
</verb></tscreen>

Refer to the <ref id="indivopts" name="individual options"> subsection
for documentation on available long options.

<sect2> Language and voice switching
<p>

Two pseudo-options <tt/--language/ and <tt/--voice/ can be used to switch
the current language or voice, or to specify options for other than the
default language or voice.  There may be multiple options of this kind
given to the <tt/say/ utility or the monolithic Epos executable, and
their ordering is important.  For example,

<tscreen><verb>
say Something. --init_f 80 --voice vichova
</verb></tscreen>

doesn't do the expected thing, i.e. use the voice named "vichova"
as modified by setting the neutral pitch for this command to 80.
Instead, the neutral pitch is set for the default voice, and 
then the voice is switched to the specified one.  To get the
intended behavior, reorder the command line:

<tscreen><verb>
say Something. --voice vichova --init_f 80
</verb></tscreen>

<sect2> Short options
<p>

The most frequently used options and occasionally even collections
of options and/or other stuff are given a shortcut, called a <em>short option</em>.
A short option is a single letter preceded by a single dash.
Usual conventions for merging short options into a single string
are available, and the example above may thus be abbreviated as

<tscreen><verb>
say --language german -p "Wie geht es?" -d
</verb></tscreen>

or even 

<tscreen><verb>
say --language german -pd "Wie geht es?"
</verb></tscreen>

(There is no short option for <tt>--language</tt>.)

The short options are interpreted directly by the <tt/say/ utility;
that's why the list of short options available with this utility
is different from the list of short options available with the server
or the monolithic Epos executable.
A list of (the most of) the server short options can be obtained with
<tt>epos --help</tt>, or <tt>epos -h</tt>/.  A list of (the most of)
short options understood by the <tt/say/ utility can be obtained with
<tt>say -h</tt>.  Such list however includes undocumented options
which may disappear in the next releases.

Please keep in mind that the say utility is only an example of a TTSCP
client and not a full-fledged controlling interface to Epos.

<sect3> Server short options
<p>

<descrip>
<tag>-f</tag>
	Do not fork at startup.  Same as <tt/---forking/.
<tag>-h</tag>
	Show a summary of available short options
<tag>-p</tag>
	Same as <tt/--pausing/.
<tag>-v</tag>
	Show Epos version.
<tag>-D</tag>
	Turn on debugging output.  Multiple <tt/-D/ options cause the output to be more
	verbose.  
<tag>-H</tag>
	In addition to a summary of short options, show also a list of all available
	long options.
</descrip>

<sect3> Client short options
<p>

<descrip>
<tag>-k</tag>
	Shut down the server.
<tag>-l</tag>
	List all available languages and available voices for the current language.
<tag>-m</tag>
	Write the waveform to a file (said.vox in the client's current directory)
	instead of writing it to the local sound card; the output doesn't
	include any header and is in the mu law format.
<tag>-o</tag>
	Write the waveform to the standard output.  In this case, no transcription
	is performed.
<tag>-u</tag>
	Turn on utterance chunking.  This option has unintuitive consequences
	when combined with <tt/-w/.
<tag>-w</tag>
	Write the waveform to a file (said.wav in the client's directory) instead
	of writing it to the local sound card.
</descrip>


<sect1> Setting options in TTSCP
<p>

See the <ref id="ttscp" name="TTSCP specification"> for general
overview of TTSCP and the <tt/set/ command.

<sect2> <tt>restr.ini</tt> file <label id="restricted-options">
<p>

Setting options in TTSCP can be a security problem, as some options
can cause the server to access unrelated files. It is therefore
strongly recommended not to run the Epos daemon with superuser privileges,
but sometimes a more fine-grained access control mechanism is needed.
It is authentication and limiting access to specified options
for some or all users.

By default, all settable parameters can be changed by any outside connection
(this doesn't affect any other connections in any way). 
You can control this privilege by restricting it in <tt>cfg/restr.ini</tt>.

Every line of that file is in the form

<tscreen><verb>
option_name       access_rights
</verb></tscreen>

The <em>access rights</em> must be in lowercase and must not contain spaces. They are
a sequence of <tt/r/, <tt/w/', <tt/&dollar;/ and <tt/&num;/, none of which may be repeated.
Their order is significant, the interpretation is as follows:

<itemize>
	<item> if no <tt/r/ is mentioned, nobody can read the option value
	<item> if no <tt/w/ is mentioned, nobody can change the option value
	<item>  if a <tt/r/ or <tt/w/ appears without <tt/&dollar;/ or <tt/&num;/ to the left of them,
		they grant the read and write rights, respectively, to even
		anonymous connections.
	<item> following &dollar;, they grant the respective rights to any authenticated user.
	<item> following &num;, they grant the respective rights to the root only.
</itemize>

<table loc="ht">
<tabular ca="|l|l|">
<hline>
<tt>r</tt>	| read only@
<tt>w</tt>	| write only@
<tt>rw</tt>	| no restriction@
<tt>&num;w&dollar;r</tt>	| root can write, authenticated users can read@
<tt>r&num;w</tt>	| anyone can read, root can also write@
<tt>&num;rw</tt>	| root can read/write@
<hline>
</tabular>
<caption>
	Examples of option access rights
</caption>
</table>

Unknown parameters are considered just not to have been implemented in this
particular version of Epos and are not reported. Parameters not mentioned
in <tt>restr.ini</tt> are allowed unlimited access by any connection.

Note that the location of this file can be changed at the command line
(with <tt/base_dir/).

<sect1> Semipermanent personal preferences
<p>

If many users with different needs and aesthetic feelings
share the same Epos daemon installation, they may choose to
place the appropriate TTSCP commands into a file and to point
the <tt>TTSCP&lowbar;USER</tt> environment variable to this file.
The contents of that file will be transmitted by the client
to set up the working environment at the beginning of every 
session.

An example:

<tscreen><verb>
set language czech
set voice kadlec
set init_f 90
set init_i 110
set language slovak
</verb></tscreen>

This example will adjust the preferred pitch and volume for a certain
Czech voice; it will also set the default language to Slovak. See
the <ref id="ttscp" name="TTSCP specification"> for more info.

<sect1> Soft options <label id="soft-options">
<p>

Most options (discussed until this point) have built-in meanings
and semantics; for most uses this is sufficient and necessary.
However, the user may also decide to define additional options
to be provided by a language to its voices. This mechanism is
called <em>soft options</em>; soft options are always voice options
and are described at the language level (that is, the name, type
and default value is supplied with the language, but individual
voices may choose to specify a value for the option).

The soft options are described by the language option <tt>soft&lowbar;options</tt>.
It is a list of colon separated descriptions of individual soft options;
every item is of the format <tt>name[(type)][=default]</tt>, where <tt>name</tt>
is an arbitrary option name, <tt>type</tt> is either <tt>b</tt>
or <tt>s</tt> (meaning boolean or string; other possibilities include
<tt>n, c</tt> for integers and characters, but these are untested
and don't seem to be widely useful. The <tt>default</tt> is the default
value to be used if the option is left unspecified by a voice. It should be
chosen as a backward compatible value for a new option if applicable.

The type and/or the default may be left unspecified. The default <tt>type</tt> is
boolean, the default <tt>default</tt> is an empty string.

An example:

<tscreen><verb>
	soft_options   "colloquial=false:segment_listing_file(s)=traditnl.dph"
</verb></tscreen>

This example defines two options, a boolean <tt>colloquial</tt> and
a string <tt>segment&lowbar;listing&lowbar;file</tt>.

The sets of soft options for individual languages are independent and never
clash with each other. However, built-in option names may not be used
as soft option names.


<sect1> Level of description dependent options
<p>

Some options, especially pertaining to parsing the input and
formatting the output, are set separately for every layer of
the <ref id="tsr" name="TSR">, so that each of them is actually
an array of options, indexed using the commercial at character
(@) followed by a layer name.  For example,

<tscreen><verb>
	perm@colon	":,"
</verb></tscreen>

defines the permissible colon terminators.  Since the TSR layer names
are themselves defined by the <tt/unit_levels/ option, the availability
of such options is dependent on the current value of some other option. 
For other options, such as <tt/default_scope/, the value is a layer name,
and is thus meaningful only after the layers are defined; all such options
can only be set after the <tt/unit_levels/ option has been set correctly.

As level description dependent options (the former type) do not yet exist
upon program startup, the access control in <tt/restr.ini/ only works
for the arrays of options, not individual options:

<tscreen><verb>
	perm	r
</verb></tscreen>

For these and other reasons, changing the <tt/unit_levels/ option is not
recommended after any of both types of level of description dependent
options has been set.


<sect1> Selected individual options <label id="indivopts">
<p>

Most individual options will be described in this section.  The rest are either
straightforward or rarely useful. A complete list of options can be obtained
through <tt/epos -H/ or in <tt>src/options.lst</tt>.

The type and the semantic class of the argument is indicated for all individual
options except for truth value (<tt/on//<tt/off/) options.  This is because
these options, when found without an argument, are automatically interpreted
as <tt/on/. 

Many options may not make any sense to you; indeed, some of them don't
actually make sense to me.  Such options are usually relics from now
forgotten ad hoc configurations.  I appreciate any suggestions on how
to replace any old fashioned configuration mechanisms with more generic
and/or simpler ones.

<sect2> Overall options
<p>

Some options control overall preferences, strategies and assumptions
to be used by Epos.  Most of them are global booleans.  They are usually
of technical nature and the output produced by Epos should not change
with these options changed, but they can be useful in some special
configurations.  They also get added to resolve some simple software
engineering dilemmata.

<descrip>
<tag>--comma <sl/delimiter/</tag>
	This is the delimiter for Epos-generated lists, especially
	in TTSCP; an arbitrary string is allowed.  Do not change.
<tag>--default_char <sl/character/</tag>
	The character to replace any unknown characters in the input text.
	See also the <tt/relax_input/ option.
<tag>--end_of_file <sl/character/</tag>
	The character to terminate the input text.  This defaults to the
	escape character.  The length of the input text is usually
	defined externally (by the <tt/apply/ command within a control
	TTSCP connection or by the end of an input), however, there
	are cases where this is not applicable or desirable for some
	reason.  The character specified by this option terminates
	the input text, but not the input stream.  It is also necessary
	to press <tt/Enter/ after the character. Applies only to the
	monolithic Epos.
<tag>--asyncing</tag>
	Turn on to enable asynchronous close() processing. Usable only
	on unices; uses fork to delegate the synchronous close()
	to a child. This option can be useful for eliminating communication
	delays when closing a sound card file descriptor, but it can cause
	subsequent references to the same device fail, because the child
	still hasn't released the device.  The option has no meaning
	on non-UNIX systems, where the close() is always synchronous.
<tag>--forking</tag>
	Turn on to allow forking and fully detaching the Epos daemon.
	Usable only on unices.  If off, some debugging information will
	be written to <tt/stdout/ in some configurations.
<tag>--init_time <sl/n/ </tag>
	If set to a non-zero value under a UNIX, the parent process will
	wait for at most <sl/n/ seconds for the daemon process to start
	accepting connections.  One second is likely to be more than enough
	except when the machine is severely overloaded.  Note that most
	Epos initialization takes place before the fork, whereas this
	option is only used after the fork.
<label id="ml-option">
<tag>--markup&lowbar;language <sl/ml/</tag>
	The parameter is either "ansi", "rtf" or "none". This parameter
	is only effective in <tt>fixed.ini</tt> or on the command
	line.  Depending on its value, the <tt/ansi.ini/ or <tt/rtf.ini/
	configuration file is appended to the <tt/fixed.ini/ file during
	parsing the configuration.  These two files contain the complete
	output formatting information necessary for printing text in
	either the ANSI escape sequences (ISO 6429) or the Rich Text
	Format; they use colors to distinguish between symbols of different
	levels of description.
<tag>--pend_max <sl/n/ </tag>
	The maximum number of subtasks waiting in an input queue for
	a single agent.  If this limit is reached, the preceding
	agent stops processing further input until only <tt/pend_min/
	subtasks are left in the queue.  Setting this limit higher
	will consume additional memory, as more processing can happen
	in advance, but setting it too low may cause unnecessary delays.
<tag>--pend_min <sl/n/ </tag>
	The minimum desired number of subtasks waiting in an input
	queue for a single agent.  If the queue length decrements
	to this limit and the preceding agent has enough input
	to process, it resumes operation.  This limit should
	be set roughly to half the <tt/pend_max/ value.
<tag>--memory&lowbar;low</tag>
	Turn on if you're very low on memory. This mode sacrifices speed
	for a little bit of saved memory. Basically, turning this on
	caused various dictionaries to be discarded whenever the rule
	which has used them has been applied and reloaded the next time
	it is needed.  Likewise, cached files are released upon the
	last <tt/unclaim/.  Otherwise these data structures are kept cached
	in for the next use.
<tag>--paranoid</tag>
	With this option on, Epos will tend to detect more errors in
	various kinds of input files than without.  It will rather
	try to reject suspicious or formally incorrect inputs,
	than to do something reasonable with them. Useful for debugging.
<tag>--pausing</tag>
	With this option on, Epos will pause and wait for a keypress
	after every rule is applied.  Of course, this is incompatible
	with the <tt/forking/ option and some other setups.  Should
	be only used for debugging.
<tag>--ptr_trusted</tag>
	One of the checks performed when the <ref id="trusted-option" 
	name="trusted"> option is disabled is checking whether
	some pointers are actually pointers, that is, very big numbers
	when cast to an integer.  This can be useful on some machines,
	but it is absolutely unportable.  It may or may not work with your
	compiler; enable this option to skip these checks.
<tag>--relax_input</tag>
	Turn on in real life situations.  When off, Epos will quit parsing
	any text which contains an unknown character (not listed in on of the
	<tt/perm_*/ options).  This option replaces such characters with
	the value of the <tt/default_char/ option before they're classified.
<tag>--show_rule</tag>
	Print each rule before it is applied.  This is useful mostly for
	debugging situations (when a text is parsed in an unexpected way
	and the user is trying to find out which rule has escaped his
	attention). This option may not work with all setups.
<tag>--profile <sl/filename/ </tag>
	Setting this option to a file name causes profiling information
	to be recorded to the file named.  The file is created in the
	current directory of the server if a relative pathname is given.
	Each line of the profile log corresponds to one timeslice of
	an agent.  First, the time spend before running the agent
	(after the last agent has finished).  Second, agent type.
	Third, time spent by the agent.  Both time intervals are given
	in microseconds and their accuracy depends on the
	<tt/gettimeofday/ system call.  Using the profiler on a loaded
	machine is going to give almost meaningless results.
<tag>--debug_password <sl/password/ </tag>
	An alternative password for server-level authentication.  Can be
	useful when debugging the TTSCP implementation, with the obvious
	security implications.
<tag>--handle_size <sl/n/ </tag>
	The TTSCP handle length in character.  The handles are always
	generated randomly using a 64 character alphabet.  Use small
	values for debugging the TTSCP implementation manually (and accept
	the risk of a handle-guessing attack); use higher values in a
	production environment.
<tag>--shriek_art number</tag>
	The picture to be printed to <tt/stdshriek/ in case of an error.
	May or may not work.  Small integers such as 0, 1 or 2 are possible.
<label id="trusted-option">
<tag>--trusted</tag>
	Code related to the <tt/class unit/ often calls its <tt/sanity/ method
	to detect any serious structure violation before it makes Epos crash
	mysteriously.  In stable versions, however, these checks are unlikely
	to be necessary.  Use this option to skip them.
<tag>--verbose</tag>
	When the rules are dumped with the <tt/debug/ rule type and this
	option is set, all of them will be displayed.  Otherwise only the
	current rule is displayed.  That's all.

<tag>--localsound</tag>
	Enables the use of the TTSCP <tt>&num;localsound</tt> output module.
<tag>--readfs</tag>
	Enables the use of file system based TTSCP input modules.  See
	the <ref id="pseudorootdir-option" name="pseudo_root_dir option">
	for more details.  Note that this option can not be turned on
	unless the underlying operating system has a fully functional
	implementation of the <tt/select/ call.
<tag>--writefs</tag>
	Enables the use of file system based TTSCP output modules. See
	the <ref id="pseudorootdir-option" name="pseudo_root_dir option">
	for more details.

<tag>--unit_levels</tag>
	Levels of description.  Must be a colon separated list which includes
	<tt/segm/ and <tt/phone/ as the two lowest levels, and <tt/text/
	as the highest level of description.  There are reasons why this should not
	be a language dependent option; you can however define this to be the
	union of all levels of description needed by any language.
<tag>--default_scope</tag>
	The default scope level of a rule -- one of the levels of description
	defined with the <tt/unit_levels/ option.
<tag>--default_target</tag>
	The default target level of a rule -- one of the levels of description
	defined with the <tt/unit_levels/ option.

<tag>--languages <sl/list/</tag>
	Lists initially available languages. The parameter is a colon separated
	list of language names. Every language must have its associated <tt/.ini/
	file; the name of the file is obtained by suffixing <tt/.ini/ to the
	language name, while the directory name matches the language name and is
	located under the directory as determined by the <tt/lang_base_dir/
	option.	 The first language listed will become the default language.

</descrip>

<sect2> Types of output
<p>
When Epos is compiled as a TTSCP server, the variability of data formats
is controlled by TTSCP rather than by option settings.  However, there
are some options related to the output formats produced by the monolithic
binary (executable).  There are also some conventional informative outputs
that can be produced by the monolithic and server binaries equally.

<descrip>
<tag>--show_phones</tag>
	Print the sequence of sounds generated from the text processed.
	Monolithic binary only.
<tag>--show_segments</tag>
	Print the sequence of segments generated from the text processed.
	Monolithic binary only.
<tag>--show_raw_segs</tag>
	When used in conjunction with the <tt/show_segments/ option, the segments
	will be not only listed by name, but they will also include the actual
	numbers generated.  Monolithic binary only.
<tag>--play_segments</tag>
	Synthesize the waveform and say it through the sound card.
	Monolithic binary only.
<tag>--wave_header</tag>
	When dumping the waveform into a file or a TTSCP data connection,
	put the RIFF wave file header at its beginning.  Regardless of
	this value, the header is never added when writing the waveform
	to a sound output device (a file descriptor which understands
	the usual ioctls).  TTSCP requires this option be always set
	to <tt/on/; consequently, the option is only reasonably useful with the
	monolithic binary.
<tag>--ulaw</tag>
	Generated waveform uses mu law sample encoding instead of linear encoding.
<tag>--out_sampling_rate <sl/Hz/ </tag>
	Voice dependent option.  May be used to downsample the output by one half.
<tag>--autofilter</tag>
	If this option is enabled, an appropriate low band filter is used whenever
	downsampling.  This is necessary to avoid phantom sounds in the output.
<tag>--label_seg</tag>
	Output segment (diphone) labels in the output waveform using the appropriate
	RIFF WAVE chunks.
<label id="labelphones-option">
<tag>--label_phones</tag>
	Output phone labels in the output waveform.  This is only possible if
	phone boundary information is made available for the inventory using
	the <ref id="snlfile-option" name="snl_file option">.  For other voices,
	this option has no effect.
<tag>--label_sseg</tag>
	Very experimental.  If used in conjunction with the <tt/label_phone/,
	the phone labels are assigned not the phone level, but the highest
	level whose boundary is detected at this place.  If you do use this
	option, be aware that Epos will use a (very slightly) TTSCP 0
	non-compatible internal representation for the segment (diphone) stream
	to preserve the necessary suprasegmental unit boundary information.
	Consequently, network voices provided by different TTSCP servers may
	fail reporting unexpected segment numbers.
<tag>--immed_segments</tag>
	Print the sequence of segments generated from the text processed
	just after the <tt/segments/ rule.  This is useful especially
	in conjunction with the <tt/neuronet/ option where the segment layer
	is created, but later to be discarded by the rules.
	Monolithic binary only.
<tag>--neuronet</tag>
	Very experimental. See <tt>doc/czech/nnet.doc</tt> for more info.
	Monolithic binary only.
<tag>--help</tag>
	Print a brief synopsis of short options upon startup.  No data processing
	is performed.
<tag>--long_help</tag>
	Print a list of long options upon startup.  No data processing is performed.
<tag>--version</tag>
	Print the current version number to <tt/stdshriek/ upon startup.
</descrip>


<sect2> Text output formatting 
<p>

You can tailor the conventions for printing out processed text quite a lot.
Basically, we're printing out a <ref id="tsr" name="text structure representation">,
so that we can see what level of description does a character belong to.  Preserving
this information in the output is often very desirable; it can either be done
by inserting delimiters such as custom syllable breaks, or by coloring some levels
of description.

This family of options can result in a quite complex configuration.
That's why we provide at least
two complete sets of settings in <tt/ansi.ini/ and <tt/rtf.ini/. You can use the
<ref id="ml-option" name="markup&lowbar;language"> option to switch between them
in  <tt/fixed.ini/.

Some options control the colors used for output.  For the time being,
these options actually take the escape sequence needed to switch the
color for the current format (e.g. ANSI escape sequences or RTF).
In principle, other strings than escape sequences can be printed,
but such configuration is discouraged.

Some options configure the appearance of the <ref id="tsr" name="TSR">
to the user.  The model we use is assigning a few colors consistently
to the individual levels of description and marking up the boundaries
between units with parentheses, separators or both. The levels of
description are <ref id="tsr-levels" name="defined"> in compile time.
The <tt/segment/ and <tt/text/ may not be applicable for some of
these options. This model of displaying the TSR is not used for
transmitting the text over TTSCP.

<descrip>
<tag>--colored</tag>
	If disabled, all color manipulating options will be ignored.
	Many configurations will enable this by default, because the
	escape sequences are rarely usable directly and never indirectly.
<tag>--normal_color <sl/color/</tag>
	String to switching to the neutral (default) color. Issued at the end
	of every colored piece of text.
<tag>--curr_rule_color <sl/color/</tag>
	String to switch to the a <em/bold/ color.  The bold color will
	be used to highlight the current rule in the list of rules printed
	by the <ref id="debug-rule" name="debug rule type">.
<tag>--fatal_color <sl/color/</tag>
	String to switch to the color used for printing out fatal error
	messages.

<tag>--header <sl/filename/</tag>
	The value is the file name of a file in the directory specified
	by the <tt/ini_dir/ option, which is to be printed before any
	phonetic transcription. 
<tag>--footer <sl/filename/</tag>
	The value is the file name of a file in the directory specified
	by the <tt/ini_dir/ option, which is to be printed after any
	phonetic transcription.
<tag>--begin* <sl/string/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is a string which will be printed before the first unit within this
	unit, for example before the word-initial syllable in case of
	<tt/begin@word/).
<tag>--close* <sl/string/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is a string which will be printed after the last unit within this
	unit, for example before the word-final syllable in case of
	<tt/close@word/).
<tag>--color* <sl/string/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is the string to switch the color for this level of description.
<tag>--separ* <sl/string/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is a string which will be printed between adjacent units of this
	level of description, for example between words in case of	
	<tt/separ@word/).
<tag>--structured</tag>
	Whether the verbose model of displaying the TSR as described above
	is used. When off, only the text itself is printed and simple
	spacing is used to delimit units which do not correspond to
	actual characters.  This option is orthogonal to the <tt/colored/
	option.
<tag>--postfix</tag>
	If on, the upper level characters (such as punctuation) are printed
	after the lower level characters (such as letters or sounds)
	in the phonetic transcription.
<tag>--prefix</tag>
	If on, the upper level characters (such as punctuation) are printed
	before the lower level characters (such as letters or sounds)
	in the phonetic transcription.  Disabling both <tt/prefix/ and
	<tt/postfix/ options effectively disables printing other characters
	than sounds.  This option is orthogonal to the <tt/structured/
	option.
<tag>--swallow_underbars</tag>
	Epos uses the low line (<tt/&lowbar;/) character to represent
	suprasegmental units with no content at their level (e.g. syllables
	are often only implicitly terminated or even generated
	by the rules and have no associated symbol.); this option,
	when enabled, suppresses them completely.
</descrip>


<sect2> Limits
<p>

Most algorithms used in Epos are boundless, avoiding techniques like fixed size
arrays or buffers.  On the other hand, there are instances when this is inadequate,
especially for speed or space considerations.  In these cases Epos tries to
use growable data structures, so that they perform well up to a certain size limit
and then somewhat slower, but still correctly.  We call such a limit a <em/soft limit/,
as opposed to a <em/hard limit/ which cannot be exceeded.  Most limits in Epos are
configurable and soft, but some hard limits have also been imposed. This subsection
also covers some time vs. space trade-off configuration parameters, though
these are no limits at all. Also some <em/sanity check limits/ are imposed; these
act as hard limits, but can be effectively disabled by setting them to absurdly
high values, with no direct impact on efficiency in the typical case.

In fact, you can ignore this section completely, as the few hard limits tend to
employ reasonably high values.

<descrip>
<tag>--seg_buff_size <sl/segments/</tag>
	Soft limit.  Maximum number of segments generated by the diphoniser
	and synthesized at once. It more segments have to be generated,
	they are synthesized in chunks of <tt/seg_buff_size/.  If this
	option is set to zero, a growable buffer is used instead, and
	there is no limit on memory consumed.
	This option has no effect in the monolithic Epos.
<tag>--buffer_size <sl/bytes/</tag>
	Soft limit. The initial buffer size for a wave file. This value is not
	used, if we already know that we will eventually write this waveform
	to a sound card device; in this case we use ioctls to find out the size
	of its hardware buffer to maximize the chance of getting a smooth
	playback.
<tag>--dev_text_len <sl/bytes/</tag>
	Sanity check limit.  When reading from a device, this is the maximum
	amount of data which will be read for processing.  This is not necessary
	when reading from a file, because the length of a file can be known in
	advance and it is always finite.
<tag>--hash_search <sl/n/</tag>
	Trade-off.  Controls how many multipliers are tried out when
	constructing a perfect hash table, for each table size.
	The search begins at 1 and continues up to <sl/n/.
	If the table still has collisions, hash table size is
	increased by one and the search restarts.  This is iterated
	until a perfect hash table is found.  As we only use perfect hash
	tables for representing constant sets and functions, they are only
	constructed during Epos startup.  Setting this option to a small
	value (such as 17) speeds up Epos startup, while larger values
	can sometimes arrive at a smaller table, thus saving some memory.
<tag>--hashes_full <sl/percentage/</tag>
	Trade-off. Controls how full should a hash table ideally be.
	The hash tables used in Epos
	are actually quite robust performance-wise, so that even values
	like 1000, that is, ten data items per a hash table slot, result
	in near-optimal speed. Values somewhere below 100 are the best bet.
<tag>--max_errors <sl/count/</tag>
	Sanity check limit.  If more than <sl/count/ of errors in a rules file
	is found, Epos quits parsing the file.
<tag>--max_line_len <sl/characters/</tag>
	Hard limit. Maximum line length in a text-oriented input file.
	Longer lines are truncated.
<tag>--max_net_cmd <sl/characters/</tag>
	Hard limit. Maximum TTSCP command length. TTSCP lines longer
	than this will be truncated.  The protocol requires this value
	to be at least 80, but a few kilobytes is recommended.
<tag>--max_rule_weight <sl/weight/</tag>
	Sanity check limit. Maximum rule weight in a choice, as well as the maximum
	rule repeat count. Using very large weights can result in memory
	exhaustion.  Values on the order of 10000 are still perfectly safe.
<tag>--max_text_size <sl/bytes/</tag>
	Sanity check limit.  Maximum amount of space allowed for growable
	processing buffers, or for the input text (checked just before parsing).
	This option is generally used to avoid memory exhaustion.
<tag>--multi&lowbar;subst <sl/count/</tag>
	Sanity check limit.  How may substitutions will be applied to a unit
	during processing of a <tt/subst/ rule.  The rule is applied until
	the unit settles down or until this limit is reached.  In the latter
	case, the substitution is considered impossible (infinite).
<tag>--rules_in_block <sl/count/</tag>
	Soft limit. Number of rules used in a block of of rules.
<tag>--scratch_size <sl/bytes/</tag>
	Hard limit.  Epos uses a temporary internal buffer in a few places.
	Usually only very few bytes of the buffer are needed, but overflowing
	it is fatal. It is recommended to provide at least a few hundred bytes,
	preferably kilobytes, for this buffer.
<tag>--variables <sl/count/</tag>
	Soft limit. Number of variables used in a set of rules.
</descrip>


<sect2> Language dependent configuration
<p>

This subsection lists some options defined for each language.  Additional
language dependent options are certain directory and file names and possibly
others.  As every voice is associated with a single language (two voices
may share a multilingual segment inventory if desired), every voice dependent
option is thence language dependent.

<descrip>
<tag>--name <sl/voicename/</tag>
	This option assigns a name to a newly created language.  If there is no name
	specified, this option defaults to the configuration file name (from the
	last slash to the nearest dot) the configuration has been loaded from.
	The name is then used to refer to the language in TTSCP.  The language name
	must begin with an alphabetical character and consist of alphanumerical
	characters (dashes and underscores are also allowed).
<tag>--voices <sl/list/</tag>
	Lists initially available voices. The parameter is a colon separated
	list of voice names. Every voice must have its associated <tt/.ini/
	file; the name of the file is obtained by suffixing <tt/.ini/ to the voice name
	while the directory name matches the voice name and is located under
	the directory as determined by the per language (default) <tt/inv_dir/
	option.  The first voice listed will become the default voice for its
	language until switched.
<tag>--soft_options <sl/list/</tag>
	Lists available soft options as described in subsection
	<ref id="soft-options" name="soft options">.
<tag>--fallback_voice <sl/voicename/</tag>
	Not used under normal circumstances.  Epos initialises its
	synthesis type dependent specific structures the first time
	it uses a voice.  Should such an initialization fail because
	of a network error, the current voice will be switched to
	the voice specified by this option and the initialisation will be
	retried.
<tag>--rules_file <sl/filename/</tag>
	The parameter is a filename. The file contains the transformational
	rules to be applied for this language.
<tag>--perm* <sl/set/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is a simple sequence of all characters belonging to this level
	of description. For example, <tt/perm_phones/ will list letters,
	numbers and other segmental symbols.  Punctuation will be assigned
	to the higher level sets.  The sets should be disjoint and only the
	characters actually processed by the rules should be listed here.
	The language independent built-in parser tries to resolve the most
	common ambiguities of Latin-based writing systems, like periods.
</descrip>

<sect2> Voice dependent configuration
<p>

<descrip>
<tag>--name <sl/voicename/</tag>
	This option assigns a name to a newly created voice.  If there is no name
	specified, this option defaults to the configuration file name (from the
	last slash to the nearest dot) the configuration has been loaded from.
	The name is then used to refer to the voice in TTSCP.  The voice name
	must begin with an alphabetical character and consist of alphanumerical
	characters (dashes and underscores are also allowed).
<tag>--type <sl/synthtype/</tag>
	The parameter, the speech synthesis type, is one of the following:
   <table loc="h">
   <tabular ca="|l|l|">
	<tt>none</tt>		| voice is mute @
	<tt>internet</tt>	| voice uses a remote speech synthesis using TCP/IP@
	<tt>lpc-int</tt>	| voice uses a LPC synthesis (integer based)@
	<tt>lpc-float</tt>	| voice uses a LPC synthesis (floating point based)@
	<tt>lpc-vq</tt>		| voice uses a LPC synthesis (vector quantified)@
	<tt>ktd</tt>		| voice uses a time domain synthesis (Zdenek Kadlec)@
	<tt>ptd</tt>		| voice uses a time domain synthesis (Martin Petriska)@
   </tabular>
   </table>
	This option may influence other voice dependent options quite significantly,
	as some of them are speech synthesis type dependent.
<tag>--location <sl/&lsqb;&lsqb;voice&rsqb;&lsqb;.language&rsqb;@&rsqb;hostname&lsqb;:port&rsqb;/ </tag>
	If this speech synthesis is of the <tt/internet/ type,
	this option can be used to set the hostname of the remote
	server.  If the remote server is listening on a non-standard port number
	(currently the standard port is considered to be 8778), the
	host name may be followed by a colon and the port number
	requested.  The desired remote voice and language may be optionally specified
	before the host name, separated with a <tt/@/ character
	from the host name and with a dot from each other.  If a language name
	is specified, while a voice name is not, the language name should be
	preceded with a dot.
	The defaults for voice, language, and port number are
	remote default voice, local current language, and 8778,
	respectively.

	For other synthesis types, this is a directory
	name which holds inventory related files (in the "inv"
	subtree), and is subject to normal file naming conventions,
	as described in <ref id="file-naming" name="file naming">.
<tag>--deadlock_timeout <sl/n/</tag>
	The value is a time interval in seconds.  This option is meaningless
	for voices of type other then <tt/internet/.  For remote voices,
	if the remote server is successfully connected to, but doesn't send
	any TTSCP session header (nor anything else) to the local server
	acting as a TTSCP client, it is either severely misconfigured,
	overloaded, deadlocked (e.g. tries to use itself as a remote
	server for its current voice), or communicating over a congested, unreliable
	or slow network connection.
	A value of <tt/0/ is actually a very small positive value and negative
	values are not accepted.
<tag>--n_segs <sl/n/ </tag>
	The total number of segments withing the segment inventory.
<tag>--models <sl/filename/</tag>
	The value is a file name. The file contains the segment inventory
	proper. Its format is speech synthesis type dependent.
<tag>--counts <sl/filename/</tag>
	The value is a file name. The file contains the lengths of individual
	segments in this segment inventory.
<tag>--dpt&lowbar;file <sl/filename/</tag>
	The value is a file name. The file contains the symbolic segment names
	for user output.
<tag>--codebook <sl/filename/</tag>
	The value is a file name. The file contains the code book for
	the vector quantified LPC speech synthesis (<tt/lpc-vq/ type only).
<label id="snlfile-option">
<tag>--snl_file <sl/filename/</tag>
	The value is a file name.  The file contains phone boundary information
	for individual segments in this segment inventory.  Each line of the file
	contains three space-separated items: segment number, relative position
	within the segment (valued from 1 to 1024, e.g. 512 is the middle of the segment)
	and the character (phone representation) which is to be associated with
	the position.  Lines not conforming to this specification are ignored.
	Currently, at most one label may be indicated for one segment, but it
	would be easy to get rid of this limit.
	See also <ref id="labelphones-option" name="label_phones option">.
<tag>--init_f <sl/percentage/</tag>
	The auditory neutral integer value for the fundamental frequency.
	The typical value is 100.
<tag>--init_i <sl/percentage/</tag>
	The auditory neutral integer value for the volume.
	The typical value is 100.
<tag>--init_t <sl/percentage/</tag>
	The auditory neutral integer value for the prosodic duration of segments.
	The typical value is 100.  Of course, it is segment length relative
	(some segments are longer than others), just as the <tt/init_f/
	and <tt/init_i/ options are.
<tag>--channel <sl/channeltype/</tag>
	The parameter, the output channel type, is one of the following:
   <table loc="h">
   <tabular ca="|l|l|">
	<tt>mono</tt>	| mono output signal @
	<tt>left</tt>	| stereo output signal, right channel is mute@
	<tt>right</tt>	| stereo output signal, left channel is mute@
	<tt>both</tt>	| stereo output signal, two identical channels@
   </tabular>
   </table>
	This option may be used to simulate a dialogue by assigning
	different output channels to different speakers.
<tag>--inv_sampling_rate <sl/Hz/</tag>
	The sampling rate this segment inventory has been recorded at.
	The algorithms we use also imply that we use the same frequency
	for the synthesis.
<tag>--sample&lowbar;size <sl/bits/</tag>
	Number of bits per sample.  If some kind of a stereo output
	is turned on, this option set the number of bits per channel.
	Again, this is related to the quality of recording of the
	segment inventory.  We currently only support 8 and 16 bits.
</descrip>


<sect2> Prosody generation
<p>

The options in this section control how the resulting per segment prosodic
information is assembled from the prosodic adjustments done to the
structural units by the rules.  It actually controls the interpretation
of those adjustments themselves.

<descrip>
<tag>--pros_weight* <sl/weight/</tag>
	The asterisk stands for a @-separated symbolic name of a linguistic description
	level, such as <tt/phone/, <tt/syll/ or <tt/word/.  The parameter
	is an integer value primarily used for enabling (1) or disabling (0)
	certain levels of description when the total quantities for a segment
	are computed.  It must however be understood that when some rules
	like <tt/smooth/ are applied, the prosodic values are distributed
	down to the target level of such a rule and cannot be distinguished
	anymore.  If higher values than 1 are set, that will multiply the
	prosodic effect assigned to a level correspondingly.
<tag>--pros_eff_multiply_*</tag>
	The asterisk stands for a single letter, <tt/f/, <tt/i/ or <tt/t/,
	that is, a prosodic quantity symbol.  This option controls how
	are the prosodic values for individual levels of description
	combined.  If it is off, they are summed up (taking the corresponding <tt/pros_neutral_*/
	as the baseline); if it is on, they get multiplied with each other
	(again taking <tt/pros_neutral_*/ as the neutral value). See <ref id="prosody"
	name="prosody modelling"> for more information and examples.
<tag>--pros_neutral_*</tag>
	The asterisk stands for a single letter, <tt/f/, <tt/i/ or <tt/t/,
	that is, a prosodic quantity symbol.  This option controls what
	prosodic value is to be considered neutral for use in Epos. The current
	configuration file use 100 and prosodic adjustments are essentially
	percentages, but a higher value could be used for more fine grained
	prosody control (provided the synthesis algorithms can take advantage
	of it).
</descrip>











<!-- unselected options: 
.cow, .loaded, .token_esc, .value_esc, .slash_esc, .use_segs, warnings, .input_text,
.sd_in, .sd_out,
-->






<sect2> File naming <label id="file-naming">
<p>
In Epos, most of the files ever opened are located in a single directory tree.
This tree usually starts at <tt>/usr/lib/epos</tt>, but it can be changed at
configure time.  For example, after issuing

<tscreen>
<verb>
cd src
./configure --prefix=/usr/local
</verb>
</tscreen>

and after recompiling and reinstalling Epos, the files will be searched under
<tt>/usr/local/lib/epos</tt>.  See <tt>configure --help</tt> for more
details on configuring Epos.  It is also possible to use the command
line option <tt>base&lowbar;dir</tt> at Epos startup to change the
tree base without recompilation.  Files of the same type -- and related
to the same language or voice, if applicable -- are located in the same subdirectory
by default.  Thus, the path name actually used by Epos consists of the base directory
path, the subdirectory (or directory for short) and a relative file name.
This makes it possible to move either the whole configuration structure, or
a specific part of it, or a single file to another place.

The relative file name may contain slashes (directory name separators).
If they only occur in the middle of the name, the file name is still
relative to the directory it would normally
be located in.  However, if the file name begins with a slash or with <tt>./</tt>,
the file is treated as absolute or relative to the current working directory
of the Epos process, respectively.  The second case is thus slightly unreliable,
but the first one allows to place any file in an arbitrary directory. 
Likewise, if the directory name begins with a slash, it is not considered
to be relative to the base directory.

Changing these options in run time does not immediately cause re-reading the
renamed files.

<descrip>
<tag>--base&lowbar;dir <sl/dirname/</tag>
	The value is an absolute directory name.  This option can be used to
	change the location of the whole configuration structure, which can also be
	used for trying out Epos before installing it:
<tscreen>
<verb>
cd src
./epos --base_dir ../cfg
</verb>
</tscreen>

<label id="pseudorootdir-option">
<tag>--pseudo_root_dir <sl/dirname/</tag>
	The value is a directory name.  Sets the path prepended
	to any file name referenced in the TTSCP <ref id="strm-cmd"
	name="stream command">. This subtree cannot be escaped with
	cute parent-of-root paths, but you can use symlinks to arbitrary
	accessible parts of the kernel name space, again, without
	giving access to the rest of the file system. Write access
	to this subtree to any user except Epos effectively gives him
	the privilege to use the Epos file access rights anywhere
	in the system through creating a symlink to the absolute root directory.


<tag>--ini&lowbar;dir <sl/dirname/</tag>
	The value is a directory name.  Sets the path to language
	independent configuration files.

<tag>--fixed&lowbar;ini&lowbar;file <sl/filename/</tag>
	The value is a file name.  This option can be used to change the file name
	of the <tt>fixed.ini</tt> file, which usually contains operating system
	independent, relatively fixed default global configuration.
<tag>--cfg&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	of the <tt>epos.ini</tt> file.
<tag>--local&lowbar;sound&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	of the local sound card device. In many unices,
	setting this to <tt>/dev/dsp</tt> is the recommended way to actually hear
	Epos speak. Other unices don't have <tt>/dev/dsp</tt>, however.  If the
	sound card has no file name at all, set this to the null device
	file name.
<tag>--input&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	of the implicit input text used by the monolithic version of Epos.
	The value is language dependent.
<tag>--nnet&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	of the file produced by the experimental <tt/neuronet/ option.
<tag>--stddbg&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	whereto various debugging output should be written. If not set at all,
	<tt/stdout/ will be used.
<tag>--stdshriek&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to change the file name
	whereto output unrelated to the usual output should be printed. It includes
	especially error messages.

<tag>--rules_dir <sl/dirname/</tag>
	The language dependent value is a directory name.
	The directory shall contain the rules file.
<tag>--hash_dir <sl/dirname/</tag>
	The language dependent value is a directory name.
	The directory shall contain any dictionaries used by the rules.
<tag>--input_dir <sl/dirname/</tag>
	The language dependent value is a directory name.
	The directory shall contain the implicit input text file for the
	monolithic version of Epos.
<tag>--lang_base_dir <sl/dirname/</tag>
	The value is a global directory name, not a language dependent one.
	It serves as the base directory for looking up the newly constructed
	languages.
<tag>--voice_base_dir <sl/dirname/</tag>
	The value is a global directory name, not a language dependent one.
	It serves as the base directory for looking up the newly constructed
	voices.  It is however only used for configuration files, not
	for inventories.  A language dependent subdirectory name is
	appended to it.
<tag>--inv_base_dir <sl/dirname/</tag>
	The value is a global directory name, not a language dependent one.
	It serves as the base directory for looking up inventories and
	related data.  A voice dependent subdirectory name (the <tt/location/
	option) is appended to it.
<tag>--ttscp_help_dir <sl/dirname/</tag>
	The value is a directory name.  In this directory, TTSCP help files
	for individual TTSCP commands and other help topics are located.
	The contents of these files is sent to the TTSCP control connection
	in reply to a corresponding <tt/help/ command.
<tag>--wav_dir <sl/dirname/</tag>
	The value is a global directory name.
	Any waveform files created by Epos without explicit directory
	specification will be created in this directory.
	Applies only to the monolithic Epos.
<tag>--matlab_dir <sl/dirname/</tag>
	The value is a global directory name.
	An input file for the experimental neural networks will be created
	in the directory when the <tt/neuronet/ option is on.  Its name
	is specified by the <tt/nnet_file/ option.
	Applies only to the monolithic Epos.

</descrip>


<sect2> Daemon startup options
<p>

The options in this section usually have no effect if changed in run time;
change them in the configuration files instead and restart Epos.

<descrip>
<label id="daemon-log-option">
<tag>--daemon&lowbar;log <sl/filename/</tag>
	The value is a file name. This option can be used to set the file
	where various information about the Epos process is recorded.
	At the moment that is of little practical use except for debugging.
<tag>--use&lowbar;syslog</tag>
	Log all TTSCP error messages with syslogd, if the syslog facility
	is available.  Due to the internal design of Epos, some of these
	messages are never actually sent over TTSCP to anyone - for example,
	a fatal misconfiguration condition detected before the first client
	connects.
<tag>--full&lowbar;syslog</tag>
	Log all TTSCP completion messages with syslogd, if the syslog facility is
	available, including 1xx and 2xx class messages.
<label id="authpriv-option">
<tag>--authpriv</tag>
	Log all security relevant TTSCP completion messages with the
	facility <tt/authpriv/ instead of <tt/daemon/.  This includes
	messages concerning denial of access or incorrectly specified
	resource or password.  In that case, the <tt/err/ message level
	is used instead of <tt/warn/.  Notice that network errors
	are not affected by this option.
<tag>--log&lowbar;codes </tag>
	When set, all TTSCP messages are preceded with their numeric codes
	as in TTSCP.
<tag>--server&lowbar;pwd&lowbar;file <sl/filename/</tag>
	The value is a file name. This option can be used to force the server
	to store its internal password to a file.  This password can then
	be used for TTSCP authentication in order to issue restricted commands
	such as <tt/down/.  If the file can not be created, no error is reported.
<tag>--restr&lowbar;file <sl/filename/</tag>
	The file named by this parameter provides access control in TTSCP to individual
	options.  Its syntax is described <ref id="restricted-options" name="above">.
<tag>--listen&lowbar;port <sl/port/</tag>
	The TCP port number where the daemon should be listening for incoming
	TTSCP connections. The daemon will check if no other service is already
	running on that port and refuses to run if the port is already occupied.
<tag>--local&lowbar;only </tag>
	When this option is set, the daemon accepts no new connections on
	network interfaces except the localhost one.  This way, only clients
	running on the same machine can connect to the server.  If this option
	is not set, the server accepts new connections on all available
	interfaces.
</descrip>


<sect2> Debugging options
<p>

Various kinds of debugging information can be printed by Epos.
The amount and topics of it can be reasonably tuned by a couple
of options.  Most debugging information is printed throughout
the code using the <tt/DEBUG/ macro; other sources or debugging
information are not discussed in this subsection.  The <tt/DEBUG/
macro takes three parameters: the <em/code area/, the 
<em/severity level/ and the code to be executed if the severity
level supplied is considered sufficient under current settings.
This code is usually a <tt/fprintf/ to the <tt/stddbg/ stream.
The decision whether to execute the debugging code, based on the
code area and severity level is carried out by the <tt/debug&lowbar;wanted/
function supplied in <tt>src/interf.cc</tt>.  You can either edit
it yourself, or, you can use the options described in this section
to control the behavior of the default <tt/debug&lowbar;wanted/ function
supplied by Epos.  Note that <tt/&num;define DEBUGGING/ must be
enabled in <tt/interf.h/, else the <tt/DEBUG/ macro is ignored
altogether.

The <sl/level/ argument taken by many options in this subsection 
is a severity level number.

<table loc="ht">
<tabular ca="|l|l|l|">
<hline>
level | debugging messages | comment @
<hline>
0 | detailed | non-systematic chaos @
1 | verbose  | too verbose @
2 | normal   | informative @
3 | rare     | warnings, and such @
<hline>
</tabular>
<caption>
	Severity levels
</caption>
</table>



<descrip>
<tag>--use&lowbar;debug</tag>
	This option must be <tt/on/ to provide any debugging information (except for
	daemon activity logging controlled by <ref id="daemon-log-option" 
	name="the daemon&lowbar;log option">.
<tag>--assim&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of <tt/regress/ and
	related types of rules, as well as their implementation in the
	<tt>src/unit.cc</tt> file.
<tag>--cfg&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of parsing
	the Epos configuration <tt/.ini/ files.
	A few instances in this area may not be handled properly, because
	they are called before this option is set itself. In this case,
	the default severity level threshold as found in the
	<tt>src/options.lst</tt> file.
<tag>--daemon&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code areas of scheduling and TTSCP
	interpretation. This code is absent from the monolithic Epos.
<tag>--elem&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of the
	<ref id="tsr" name="text structure representation">. 
	This usually does not include code which is specifically
	written to support a particular rules type.
<tag>--interf&lowbar;debug <sl/level/</tag>
	Severity level threshold for the "interface" code area;
	that is, for assorted (usually) non-member functions, usually
	located in <tt>src/interf.cc</tt>. This is a catch-all area.
<tag>--parser&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of parsing
	text to yield a <ref id="tsr" name="text structure representation">.
	It nearly coincides with the <tt>src/parser.cc</tt> file.
<tag>--rules&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of
	parsing and application of the rules. This usually does
	not include any code which is rule type specific.
<tag>--split&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of most
	types of rules, as well as their implementation in the
	<tt>src/unit.cc</tt> file.  This covers especially
	syllabification, diphonization and other structure
	manipulations.
<tag>--subst&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of <tt/subst/ and
	related types of rules, as well as their implementation in the
	<tt>src/unit.cc</tt> file
<tag>--synth&lowbar;debug <sl/level/</tag>
	Severity level threshold for the code area of low level
	speech syntheses (segments to speech). It covers both
	individual algorithms and the common code.
<tag>--always&lowbar;debug <sl/level/</tag>
	The global positive severity level threshold. Any debugging code
	which reaches at least this severity level is executed regardless
	of the code area specific threshold. This option is especially useful for
	generic debugging, when the code area responsible for incorrect behavior
	is still unknown.
<tag>--limit&lowbar;debug <sl/level/</tag>
	The global negative severity level threshold. No debugging code
	which fails to reach at least this severity level is executed regardless
	of the code area specific threshold. This option is useful for setting
	up a global severity level threshold for most (non-focused) code areas.
	Should the <tt/always&lowbar;dbg/ and <tt/limit&lowbar;dbg/ options come into conflict,
	the former takes precedence.
<tag>--focus&lowbar;debug <sl/area/</tag>
	The parameter is a code area to be excepted from the <tt/limit&lowbar;dbg/ option.
	This code area will obey its own severity level limit, even if the global
	negative limit is stricter.  The global positive severity level is however
	unaffected.  Every area uses the same name as in its corresponding severity
	level threshold option, without the <tt/&lowbar;dbg/ suffix.
</descrip>

