blob: 10f4cbaab0d0ae180a9de85c63d324af1fecb2c8 [file]
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.3, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Speech Synthesis Interface Protocol</title>
<meta name="description" content="Speech Synthesis Interface Protocol">
<meta name="keywords" content="Speech Synthesis Interface Protocol">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="#Top" rel="start" title="Top">
<link href="dir.html#Top" rel="up" title="(dir)">
<link href="#Introduction" rel="next" title="Introduction">
<link href="dir.html#Top" rel="prev" title="(dir)">
<style type="text/css">
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.center {text-align:center}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
pre.display-preformatted {font-family: inherit}
span:hover a.copiable-link {visibility: visible}
ul.mark-bullet {list-style-type: disc}
ul.mark-minus {list-style-type: "\2212"}
</style>
</head>
<body>
<a class="node" id="Top"></a><p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Introduction" rel="next">Introduction</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="dir.html#Top" rel="prev">(dir)</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="dir.html#Top" rel="up">(dir)</a></span></span><span class="nav-button"> &nbsp; </span></p>
<p>This manual documents Speech Synthesis Interface Protocol, version 0.2.
</p>
<p>Copyright &copy; 2001, 2002, 2003 Brailcom, o.p.s., http://www.brailcom.cz .
</p>
<blockquote class="quotation">
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts and no Back-Cover Texts.
A copy of the license is included in the section entitled &ldquo;GNU Free
Documentation License.&rdquo;
</p></blockquote>
<p>You can also (at your option) distribute this manual under the GNU
General Public License:
</p>
<blockquote class="quotation">
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
</p>
<p>A copy of the license is included in the section entitled &ldquo;GNU
General Public License&rdquo;
</p></blockquote>
<p>Please contact us on <a class="url" href="http://www.freebsoft.org">http://www.freebsoft.org</a>
</p>
<h3 class="heading" id="Menu"><span>Menu<a class="copiable-link" href="#Menu"> &para;</a></span></h3>
<hr>
<div class="chapter-level-extent" id="Introduction">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Basic-Terminology" rel="next">Basic Terminology</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Top" rel="prev">Top</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="chapter" id="Introduction-1"><span>1 Introduction<a class="copiable-link" href="#Introduction-1"> &para;</a></span></h2>
<ul class="mini-toc">
<li><a href="#Purpose">Purpose</a></li>
<li><a href="#Protocol-Philosophy">Protocol Philosophy</a></li>
<li><a href="#Higher-Level-API">Higher Level API</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Purpose">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Protocol-Philosophy" rel="next">Protocol Philosophy</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Introduction" rel="prev">Introduction</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Introduction" rel="up">Introduction</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Purpose-1"><span>1.1 Purpose<a class="copiable-link" href="#Purpose-1"> &para;</a></span></h3>
<p>Speech Synthesis Interface Protocol is a device independent layer for
speech synthesis, developed with the goal of making the usage of
speech synthesis easier for application programmers. It takes care of
most of the output-related tasks necessary to solve in speech enabled
applications. What is a very high level GUI library to graphics,
Speech Synthesis Interface Protocol is to speech synthesis.
</p>
<p>Up to now, the applications that wanted to implement speech output had
to handle all the device dependent aspects of communication with
different speech synthesizers themselves. Speech Synthesis Interface
Protocol (SSIP) aims to provide a totally independent abstract set of
commands by which different applications can talk to some central
Speech Server installed on the system that than talks to the
synthesizers themselves. This way, user applications don&rsquo;t have
to care about the particular synthesizers available on the system
and the synthesizers don&rsquo;t have to care about the installed user
applications.
</p>
<p>SSIP is not only a device independent language for speech synthesis
related requests, but also a mechanism to coordinate the interaction
and conflicts between different clients&rsquo; needs in a central place in
the system. Through the priority system, the central Speech Server
that implements SSIP can decide which messages are considered the most
important at any particular time and say them, while possibly
suppressing others.
</p>
<hr>
</div>
<div class="section-level-extent" id="Protocol-Philosophy">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Higher-Level-API" rel="next">Higher Level API</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Purpose" rel="prev">Purpose</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Introduction" rel="up">Introduction</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Protocol-Philosophy-1"><span>1.2 Protocol Philosophy<a class="copiable-link" href="#Protocol-Philosophy-1"> &para;</a></span></h3>
<p>Speech Synthesis Interface Protocol defines a reasonable subset of the
different capabilities provided by the different synthesizers. It
supports some basic events (message, key, character, ...) as well as
changing the basic voice parameters (language, voice, rate, pitch,
...) or the more advanced ones (punctuation mode, spelling mode, ...).
</p>
<p>None of the commands or parameters of SSIP depends on the characteristics
of the particular devices that are being used. For example when
the client application wants to change the language for the next
message, it only calls the appropriate SSIP command and it leaves the
Speech Server to decide which synthesizer to use.
</p>
<p>SSIP was designed to allow multiple simultaneous connections to
the server. A connection is identified by an identification string
provided by the client application and an id number. Each connection
with all its parameters is considered a closed space independent of
the others, so that different clients can maintain different settings
in their connections and then the Speech Server should take care of setting
the right parameters on the synthesizer according to the origin of each
request. One client can even establish several connections to maintain
different contexts.
</p>
<p>SSIP also solves the issue when more than one client wants to speak
at one time or when more messages come than it&rsquo;s possible to say.
Each message has an assigned priority and according to this priority,
when multiple messages come to the server, they are directly said,
postponed or suppressed.
</p>
<p>It is important to understand the difference between SSIP and
higher level protocols like SABLE, VoiceXML or SSML. Speech
Synthesis Interface Protocol is not a markup language in which one
would write a document. SSIP is rather the underlaying tool that the
application would use to let you read and browse the documents encoded
in either ordinary formats (like plain text, HTML, PDF) or the
voice-enabled formats (SABLE, VoiceXML, SSML). These higher level
protocols describe only how the document should be said, while SSIP is
the means to actually do it on your system. In this manner, one of the
supported formats of the messages you can send through SSIP is SSML.
</p>
<hr>
</div>
<div class="section-level-extent" id="Higher-Level-API">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Protocol-Philosophy" rel="prev">Protocol Philosophy</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Introduction" rel="up">Introduction</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Higher-Level-API-1"><span>1.3 Higher Level API<a class="copiable-link" href="#Higher-Level-API-1"> &para;</a></span></h3>
<p>SSIP is the basic interface protocol that is being used in the
communication of a client with the central Speech Server on a
system. However, in many cases it may be more convenient for application
programmers not to use SSIP directly (having to care about open
socket connections etc.) but rather use an interface wrapper written
in the specific programming language they use. There is no obstacle in
SSIP for this option, and in fact, this approach is highly
encouraged.
</p>
<p>This way, application programmers should finally be able to use such
simple functions as speech_open(), speech_printf() and
speech_set_rate() in their programs.
</p>
<p>We believe this can make writing new speech enabled applications
a lot easier and allow programmers to make more of them.
</p>
<hr>
</div>
</div>
<div class="chapter-level-extent" id="Basic-Terminology">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#General-Rules" rel="next">General Rules</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Introduction" rel="prev">Introduction</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="chapter" id="Basic-Terminology-1"><span>2 Basic Terminology<a class="copiable-link" href="#Basic-Terminology-1"> &para;</a></span></h2>
<ul class="itemize mark-bullet">
<li><a class="index-entry-id" id="index-SSIP"></a>
<a class="index-entry-id" id="index-Speech-Synthesis-Interface-Protocol"></a>
<em class="emph">Speech Synthesis Interface Protocol</em> or <em class="emph">SSIP</em> is the
device-independent protocol described in this document through which
client application can send their requests for speech synthesis to the
Speech Server.
</li><li><a class="index-entry-id" id="index-Speech-Server"></a>
<em class="emph">Speech Server</em>
is the server application that implements Speech Synthesis Interface
Protocol, as described in this document, and provides an interface
for client applications.
</li><li><a class="index-entry-id" id="index-client"></a>
<a class="index-entry-id" id="index-client-application"></a>
<em class="emph">Client</em> or <em class="emph">client application</em>
is every application that connects to Speech Server and talks to
it through the Speech Synthesis Interface Protocol. In other words,
this is the application that &ldquo;wants to speak&rdquo;.
</li><li><a class="index-entry-id" id="index-message"></a>
<em class="emph">Message</em>
is a chunk of text that a client sends to Speech Server to request
saying something or play some sound.
</li><li><em class="emph">To cancel a message</em>
means to stop saying it and/or remove it from the queue of messages
waiting to be said. However, it is not removed from the history, where
it was stored after being received by Speech Server.
</li></ul>
<hr>
</div>
<div class="chapter-level-extent" id="General-Rules">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#SSIP-Commands" rel="next">SSIP Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Basic-Terminology" rel="prev">Basic Terminology</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="chapter" id="General-Rules-1"><span>3 General Rules<a class="copiable-link" href="#General-Rules-1"> &para;</a></span></h2>
<p>SSIP communicates with the clients through a defined set of text
commands, in the usual manner for common Internet protocols. The
characters sent through the Speech Synthesis Interface Protocol are
encoded using the UTF-8 encoding.
</p>
<p>Each SSIP command, unless specified otherwise, consists of exactly one
line. The line is sent in the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">command</var> <var class="var">arg</var> ...
</pre></div>
<p>where <var class="var">command</var> is a case insensitive command name and <var class="var">arg</var>s
are its arguments separated by spaces. The command arguments which
come from a defined set of values are case insensitive as well. The
number of arguments is dependent on the particular command and there
can be commands having no arguments.
</p>
<p>All lines of SSIP input and output must be ended with a pair of
carriage return and line feed characters, in that order.
</p>
<p>When you connect to Speech Server, you should at least set your client
name, through the <code class="code">SET SELF CLIENT_NAME</code> command (see <a class="pxref" href="#Parameter-Setting-Commands">Parameter Setting</a>). This is important to get a proper identification of your client
&mdash; to allow managing it from the control center application and to identify it
in a message history browser. You might want to set other connection
parameters as well. Look for more details in <a class="ref" href="#Parameter-Setting-Commands">Parameter Setting</a>.
</p>
<p>An SSIP connection is preferably closed by issuing the <code class="code">QUIT</code>
command, see <a class="ref" href="#Other-Commands">Other Commands</a>.
</p>
<p>SSIP is a synchronous protocol &mdash; you send commands and only after a
complete response from SSIP arrives back are you allowed to send the
next command. Usually, the SSIP connection remains open
during the whole run of the particular client application. If you
close the connection and open it again, you must set all the
previously set parameters again, SSIP doesn&rsquo;t store session
parameters between connections.
</p>
<p>The protocol allows you to perform commands influencing other currently
connected or previously connected clients. This allows you to write a
control application managing or browsing all the messages received by
the current Speech Server process. The mechanism is completely
relaxed, there are no restrictions on managing some aspects of
sound output for other users, however, there is a mechanism
to prevent one user from seeing history messages of another
user.
</p>
<p>Some of the commands (<a class="ref" href="#Speech-Output-Control-Commands">Controlling Speech Output</a>
and <a class="ref" href="#Parameter-Setting-Commands">Parameter Setting</a>)
take an argument in the form:
</p><div class="example">
<pre class="example-preformatted"> { <var class="var">id</var> | all | self }
</pre></div>
<p>where the value can be the <code class="code">id</code> of the connection the command should
be performed on (a positive number), the string <code class="code">all</code> to
act on all clients of this server or <code class="code">self</code> to act on the connection
itself. Unless you are writing a special client for managing
Speech Server or unless you have specific needs, you
should only use the <code class="code">self</code> value for this argument.
</p>
<p>Not all parameter setting commands may receive all kinds of the first
parameter defined above, for instance, some of them may receive only
<code class="code">self</code>.
</p>
<p>SSIP replies have the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">ccc</var>-line 1
<var class="var">ccc</var>-line 2
...
<var class="var">ccc</var>-line <var class="var">n</var>-1
<var class="var">ddd</var> line <var class="var">n</var>
</pre></div>
<p>where <var class="var">n</var> is a positive integer, and <var class="var">ccc</var> and <var class="var">ddd</var> are
three-digit long numeric codes identifying the result of the command.
The last line determines the overall result of the command. The result
code is followed by an English message describing the result of the
action in a human readable form.
</p>
<hr>
</div>
<div class="chapter-level-extent" id="SSIP-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Return-Codes" rel="next">Return Codes</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#General-Rules" rel="prev">General Rules</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="chapter" id="SSIP-Commands-1"><span>4 SSIP Commands<a class="copiable-link" href="#SSIP-Commands-1"> &para;</a></span></h2>
<p>Commands recognized by SSIP can be divided into several groups: Speech
synthesis and sound output commands, speech control commands,
parameter setting commands, commands retrieving information about
current client and server settings, commands handling the message
history, and other commands. Each of these command groups is
described in one of the following sections.
</p>
<p>In the command descriptions, the command is written together with its
arguments. Optional arguments are enclosed by square brackets
(<code class="code">[</code> and <code class="code">]</code>), alternatives are separated by the vertical
rule (<code class="code">|</code>) and are grouped within braces (<code class="code">{</code> and
<code class="code">}</code>) or square brackets for mandatory or optional arguments
respectively. Literal argument values are typeset in lowercase letters
(they are case insensitive), and variable arguments are typeset
<var class="var">like this</var>. Ellipsis denoted by three dots (<code class="code">...</code>) means
repetition (zero or more times) of all the arguments within the
current brackets.
</p>
<ul class="mini-toc">
<li><a href="#Speech-Synthesis-and-Sound-Output-Commands">Speech Synthesis and Sound Output</a></li>
<li><a href="#Speech-Output-Control-Commands">Controlling Speech Output</a></li>
<li><a href="#Message-Priority-Commands">Priority Setting Commands</a></li>
<li><a href="#Blocks-of-Messages-Commands">Blocks of Messages Commands</a></li>
<li><a href="#Parameter-Setting-Commands">Parameter Setting</a></li>
<li><a href="#Information-Retrieval-Commands">Retrieving Information</a></li>
<li><a href="#Message-Events-Notification-and-Index-Marking">Message Events Notification and Index Marking</a></li>
<li><a href="#History-Handling-Commands">History Handling</a></li>
<li><a href="#Other-Commands">Other Commands</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Speech-Synthesis-and-Sound-Output-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Speech-Output-Control-Commands" rel="next">Controlling Speech Output</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#SSIP-Commands" rel="prev">SSIP Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Speech-Synthesis-and-Sound-Output"><span>4.1 Speech Synthesis and Sound Output<a class="copiable-link" href="#Speech-Synthesis-and-Sound-Output"> &para;</a></span></h3>
<p>These commands invoke actual output to particular output device. The
particular way how the message is handled depends on current speech
parameter settings and user configuration.
</p>
<dl class="table">
<dt><code class="code">SPEAK</code></dt>
<dd><a class="anchor" id="SPEAK"></a><p>Start receiving a text message and synthesize it. After sending a
reply to the command, Speech Server waits for the text of the
message. The text can spread over any number of lines and is
finished by an end of line marker followed by the line containing the
single character <code class="code">.</code> (dot). Thus the complete character sequence
closing the input text is <code class="code">CR LF . CR LF</code>. If any line within
the sent text starts with a dot, an extra dot is prepended before it.
</p>
<p>During reception of the text message, Speech Server doesn&rsquo;t send
responses for the lines sent. The response line is sent only
immediately after the <code class="code">SPEAK</code> command and after receiving the
closing dot line.
</p>
<p>The content of the message can be either a plain text or a SSML
(Speech Synthesis Markup Language) text. See <code class="code">SET SELF
SSML_MODE</code>. There is no guarantee that the SSML markup will be
respected, so the application shouldn&rsquo;t rely on them. The external
parameters can still be set by the parameter setting commands. SSML is
intended only for additional markup inside the message. In SSML mode,
each message must begin with <code class="code">&lt;speak&gt;</code> and end with
<code class="code">&lt;/speak&gt;</code>.
</p>
<p>Speech Server can start speech synthesis as soon as a sufficient
amount of the text arrives; it generally needn&rsquo;t (but may) wait until
the end of data marker is received.
</p>
<p>There is no explicit upper limit on the size of the text, but the
server administrator may set one in the configuration or the limit can
be enforced by available system resources. If the limit is exceeded,
the whole text is accepted, but the excess is ignored and an
error response code is returned after processing the final dot line.
</p>
<p>The reply takes the form
</p>
<div class="example">
<pre class="example-preformatted">225-msg_id
225 OK MESSAGE QUEUED
</pre></div>
<p>where <var class="var">msg_id</var> is a unique id assigned to this message in Speech
Server. This is useful for the <a class="ref" href="#History-Handling-Commands">History Handling</a>
commands as well as for <a class="ref" href="#Message-Events-Notification-and-Index-Marking">Message Events Notification and Index Marking</a>.
</p>
<p>The <code class="code">SPEAK</code> command might be used for example in this way:
</p>
<div class="example">
<pre class="example-preformatted">SPEAK
230 OK RECEIVING DATA
hi
.
225-21
225 OK MESSAGE QUEUED
</pre></div>
</dd>
<dt><code class="code">CHAR <var class="var">char</var></code></dt>
<dd><p>Speak letter <var class="var">char</var>. <var class="var">char</var> can be any character
representable by the UTF-8 encoding. The only exception is the
character space (<code class="code"> </code>); that can&rsquo;t be sent directly. In this case,
a string <code class="code">space</code> must be sent instead.
</p>
<div class="example">
<pre class="example-preformatted">CHAR e
CHAR \
CHAR space
CHAR &amp;
</pre></div>
<p>This command is intended to be used for speaking single letters,
e.g. when reading a character under cursor or when spelling words.
</p>
</dd>
<dt><code class="code">KEY <var class="var">key-name</var></code></dt>
<dd><a class="anchor" id="SSIP-KEY"></a><p>Speak key identified by <var class="var">key-name</var>. The command is intended to be
used for speaking keys pressed by the user.
</p>
<p><var class="var">key-name</var> is a case sensitive symbolic key name. It is composed
of a key name, optionally prepended with one or more prefixes, each
containing an auxiliary key name and the underscore character.
</p>
<p>Key name may contain any character excluding control characters (for example,
the characters in the range 0 to 31 in the ASCII table, characters in the
range 128 to 159 in the Latin-* tables and other &ldquo;invisible&rdquo;
characters), spaces, underscores, and double quotes.
</p>
<p>The recognized key names are:
</p>
<ul class="itemize mark-bullet">
<li>Any single UTF-8 character, excluding the exceptions defined above.
</li><li>Any of the symbolic key names defined in <a class="ref" href="#Key-Names">Key Names</a>.
</li></ul>
<p>Examples of valid key names:
</p>
<div class="example">
<pre class="example-preformatted">a
A
shift_a
shift_A
&uacute;
$
enter
shift_kp-enter
control_alt_delete
control
</pre></div>
</dd>
<dt><code class="code">SOUND_ICON <var class="var">icon-name</var></code></dt>
<dd><a class="anchor" id="SSIP-SOUND_005fICON"></a><p>Send a sound identified by <var class="var">icon-name</var> to the audio output.
<var class="var">icon-name</var> is a symbolic name of the given sound from the
standard set listed in <a class="ref" href="#Standard-Sound-Icons">Standard Sound Icons</a>, or another name
from the particular Speech Server sound icon configuration.
</p></dd>
</dl>
<hr>
</div>
<div class="section-level-extent" id="Speech-Output-Control-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="next">Priority Setting Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Speech-Synthesis-and-Sound-Output-Commands" rel="prev">Speech Synthesis and Sound Output</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Controlling-Speech-Output"><span>4.2 Controlling Speech Output<a class="copiable-link" href="#Controlling-Speech-Output"> &para;</a></span></h3>
<p>These commands can stop or resume speech or audio output. They all
affect only the synthesis process and output to a sound device, they
do not affect the message history.
</p>
<dl class="table">
<dt><code class="code">STOP { <var class="var">id</var> | all | self }</code></dt>
<dd><p>Immediately stop outputting the current message (whatever it is &mdash;
text, letter, key, or sound icon) from the identified client, if any
is being output. If the command argument is <code class="code">self</code>, the last message
from the current client connection is stopped. If it is <code class="code">all</code>,
stop currently output message or messages from all the clients.
Otherwise, argument <var class="var">id</var> must be given as a positive integer and
the currently processed message from the client connection identified
by <var class="var">id</var> is stopped; if there is none such, do nothing.
</p>
</dd>
<dt><code class="code">CANCEL { <var class="var">id</var> | all | self }</code></dt>
<dd><p>This command is the same as <code class="code">STOP</code>, with the exception that it
stops as yet unspoken output messages as well. All currently queued messages
are stored into the message history without being sent to the audio
output device.
</p>
</dd>
<dt><code class="code">PAUSE { <var class="var">id</var> | all | self }</code></dt>
<dd><p>Stop audio output immediately, but do not discard anything. All the
currently speaking and currently or later queued messages are postponed
and saved for later processing, until a corresponding <code class="code">RESUME</code>
command is received.
</p>
<p>The meaning of the command arguments is the same as in the <code class="code">STOP</code>
command.
</p>
</dd>
<dt><code class="code">RESUME { <var class="var">id</var> | all | self }</code></dt>
<dd><p>Cancel the effect of the previously issued <code class="code">PAUSE</code> command.
Note that messages of the priority &ldquo;progress&rdquo; and &ldquo;notification&rdquo; received during
the pause are not output (but they remain stored in the message history).
</p>
<p>It is an error to send the <code class="code">RESUME</code> command when the output
corresponding to the given argument is not paused by a previous
invocation of the <code class="code">PAUSE</code> command. Such an error is signaled by
a <code class="code">4XX</code> return code.
</p>
<p>The meaning of the command arguments is the same as in the <code class="code">STOP</code>
command.
</p></dd>
</dl>
<hr>
</div>
<div class="section-level-extent" id="Message-Priority-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Blocks-of-Messages-Commands" rel="next">Blocks of Messages Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Speech-Output-Control-Commands" rel="prev">Controlling Speech Output</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Priority-Setting-Commands-1"><span>4.3 Priority Setting Commands<a class="copiable-link" href="#Priority-Setting-Commands-1"> &para;</a></span></h3>
<a class="index-entry-id" id="index-priorities"></a>
<p>A speech synthesizer can&rsquo;t synthesize everything that comes to it,
for the simple reason that messages are often coming faster
than a synthetic voice can say them. On the screen of a
monitor, there is relatively a lot of space compared to
one-channel speech synthesis output. For this reason, SSIP
implements a system of several priorities targeted at different
types of messages.
</p>
<p>The idea is that the task of the programmer of a client application
is only to assign a meaningful priority to each message and all the
synchronization and switching between the messages (that can be
coming from different clients) is automatically handled by the Speech Server
by applying certain rules based on the priorities.
</p>
<ul class="mini-toc">
<li><a href="#Priority-Categories">Priority Categories</a></li>
<li><a href="#Priority-Diagram">Priority Diagram</a></li>
<li><a href="#Priority-Setting-Commands">Priority Setting Commands</a></li>
<li><a href="#Examples-of-Using-Priorities">Examples of Using Priorities</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Priority-Categories">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Priority-Diagram" rel="next">Priority Diagram</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="prev">Priority Setting Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="up">Priority Setting Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Priority-Categories-1"><span>4.3.1 Priority Categories<a class="copiable-link" href="#Priority-Categories-1"> &para;</a></span></h4>
<p>Speech Synthesis Interface Protocol provides a system of five priorities. Every
message will either contain explicit priority information, or the
default value will be used.
</p>
<p>Please see also the diagram below.
</p>
<h3 class="heading" id="Priority-important"><span>Priority <code class="code">important</code><a class="copiable-link" href="#Priority-important"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Priority-important"></a>
<p>This message will be said immediately as it comes to server.
It is never interrupted. When several concurrent messages of
this priority are received by server, they are queued and said
in the order they came.
</p>
<p>When a new message of level <code class="code">important</code> comes while a message of
another priority is being spoken, the other message is canceled
and the message with priority <code class="code">important</code> is said instead. Other messages
of lower priorities are postponed (priority <code class="code">message</code> and
<code class="code">text</code>) until there are no messages of priority important
waiting, or are canceled (priority <code class="code">notification</code> and <code class="code">progress</code>).
</p>
<p>These messages should be as short as possible and should rarely be
used, because they block the output of all other messages.
</p>
<h3 class="heading" id="Priority-message"><span>Priority <code class="code">message</code><a class="copiable-link" href="#Priority-message"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Priority-message"></a>
<p>This message will be said when there is no message of priority
<code class="code">important</code> or <code class="code">message</code> waiting in the queue. If there are,
this message is postponed until those messages are spoken. This
means that the priority <code class="code">message</code> doesn&rsquo;t interrupt itself. If
there are messages of priority <code class="code">notification</code>, <code class="code">progress</code> or
<code class="code">text</code> waiting in the queue or being spoken when a message of
priority <code class="code">message</code> comes, they are canceled.
</p>
<h3 class="heading" id="Priority-text"><span>Priority <code class="code">text</code><a class="copiable-link" href="#Priority-text"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Priority-text"></a>
<p>This message will be said when there is no message of priority
<code class="code">important</code> or <code class="code">message</code> waiting in the queue. If there are,
this message is postponed until the previous messages are spoken.
</p>
<p>The priority text interrupts itself. This means that if several messages
of this priority are received, they are not said in the order they
were received, but only the latest of them is said; others are
canceled.
</p>
<p>If there are messages of priority <code class="code">notification</code> and
<code class="code">progress</code> waiting in the queue or being spoken when a message
of priority <code class="code">text</code> comes, they are canceled.
</p>
<h3 class="heading" id="Priority-notification"><span>Priority <code class="code">notification</code><a class="copiable-link" href="#Priority-notification"> &para;</a></span></h3>
<p>This is a low priority message. If there are messages with priorities
<code class="code">important</code>, <code class="code">message</code>, <code class="code">text</code> or <code class="code">progress</code>
waiting in the queues or being spoken, this <code class="code">notification</code>
message is canceled.
</p>
<p>This priority interrupts itself, so if more messages with priority
<code class="code">notification</code> come at the same time, only the last of them is
spoken.
</p>
<h3 class="heading" id="Priority-progress"><span>Priority <code class="code">progress</code><a class="copiable-link" href="#Priority-progress"> &para;</a></span></h3>
<p>This is a special priority for messages that are coming
shortly one after each other and they carry the information
about some work in progress (e.g.&nbsp;<code class="code">Completed 45%</code>).
</p>
<p>If new messages interrupted each other (see priority
Notification), the user might not receive any complete
message.
</p>
<p>This priority behaves the same as &ldquo;notification&rdquo; except
for two things:
</p>
<ul class="itemize mark-bullet">
<li>The messages of this priority don&rsquo;t interrupt each other,
instead, a newly arriving message is canceled if another message is
being spoken.
</li><li>Speech Server tries to detect the last message of a series of messages
(for instance, it&rsquo;s important for the user to hear the final
<code class="code">Completed 100%</code> message to know the work has completed). Speech
Server waits until there are no more messages of this priority waiting
in queues and if the last of them wasn&rsquo;t spoken yet, it speaks it with
the priority <code class="code">message</code>.
</li></ul>
<p>This way, even if Speech Server is busy speaking messages of other
priorities, we are still sure that the important messages at the
end of the <code class="code">progress</code> sequences will be said.
</p>
<hr>
</div>
<div class="subsection-level-extent" id="Priority-Diagram">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Priority-Setting-Commands" rel="next">Priority Setting Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Priority-Categories" rel="prev">Priority Categories</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="up">Priority Setting Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Priority-Diagram-1"><span>4.3.2 Priority Diagram<a class="copiable-link" href="#Priority-Diagram-1"> &para;</a></span></h4>
<img class="image" src="figures/priorities.png" alt="Speech Synthesis Interface Protocol Priorities">
<hr>
</div>
<div class="subsection-level-extent" id="Priority-Setting-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Examples-of-Using-Priorities" rel="next">Examples of Using Priorities</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Priority-Diagram" rel="prev">Priority Diagram</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="up">Priority Setting Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Priority-Setting-Commands-2"><span>4.3.3 Priority Setting Commands<a class="copiable-link" href="#Priority-Setting-Commands-2"> &para;</a></span></h4>
<p>When a priority is set for a given connection, all the newly arriving
messages will be said with this priority until it is changed for a new
value.
</p>
<ul class="itemize mark-bullet">
<li>SET self PRIORITY <var class="var">p</var>
<p>This command sets message priority to <var class="var">p</var>. <var class="var">p</var> must be one of
the values <code class="code">important</code>, <code class="code">text</code>, <code class="code">message</code>,
<code class="code">notification</code>, <code class="code">progress</code>. See <a class="xref" href="#Priority-Categories">Priority Categories</a>.
</p>
<p>Only <code class="code">self</code> is allowed as the &lsquo;target&rsquo; argument.
</p>
</li></ul>
<hr>
</div>
<div class="subsection-level-extent" id="Examples-of-Using-Priorities">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Priority-Setting-Commands" rel="prev">Priority Setting Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="up">Priority Setting Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Examples-of-Using-Priorities-1"><span>4.3.4 Examples of Using Priorities<a class="copiable-link" href="#Examples-of-Using-Priorities-1"> &para;</a></span></h4>
<p>Example uses for priority <code class="code">important</code> are:
</p>
<ul class="itemize mark-bullet">
<li>error messages
</li><li>very important messages
</li><li>...
</li></ul>
<p>Example uses for priority <code class="code">message</code> are:
</p>
<ul class="itemize mark-bullet">
<li>regular program messages
</li><li>warnings
</li><li>...
</li></ul>
<p>Example uses for priority <code class="code">text</code> are:
</p>
<ul class="itemize mark-bullet">
<li>text the user is working on
</li><li>menu items
</li><li>...
</li></ul>
<p>Example uses for priority <code class="code">notification</code> are:
</p>
<ul class="itemize mark-bullet">
<li>less important status information
</li><li>letters when typing input
</li><li>run-time help
</li><li>...
</li></ul>
<p>Example uses for level <code class="code">progress</code> are:
</p>
<ul class="itemize mark-bullet">
<li>&ldquo;completed 15%&rdquo;, &ldquo;completed 16%&rdquo;, &ldquo;completed 17%&rdquo;
</li><li>&ldquo;Loading sounds&rdquo;, &ldquo;Loading graphics&rdquo;, &ldquo;Loading ai&rdquo;, ...
</li></ul>
<hr>
</div>
</div>
<div class="section-level-extent" id="Blocks-of-Messages-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Parameter-Setting-Commands" rel="next">Parameter Setting</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Message-Priority-Commands" rel="prev">Priority Setting Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Blocks-of-Messages-Commands-1"><span>4.4 Blocks of Messages Commands<a class="copiable-link" href="#Blocks-of-Messages-Commands-1"> &para;</a></span></h3>
<p>Block commands allow the client to concatenate several messages to form one
block that behaves as one message in the priority system and history. After
opening the block, client can send a specified subset of the commands and
the messages introduced by <code class="code">SPEAK</code> will be processed immediately, however
there will be no priority interaction before closing the block.
The <a class="ref" href="#Speech-Output-Control-Commands">Controlling Speech Output</a> also handle the whole block as one
message.
</p>
<p>Take for example this message from an email client:
</p>
<div class="example">
<pre class="example-preformatted">&gt; Hi, how are you?
I'm fine. Thank you.
</pre></div>
<p>The character &lsquo;&gt;&rsquo; clearly marks who said which part. So it&rsquo;d be nice to say
the two lines with different voices, however, it&rsquo;d be desirable to treat it all
as one message with priority TEXT and have it put together in history,
because in fact, it logically <em class="emph">is</em> one message.
</p>
<dl class="table">
<dt><code class="code">BLOCK BEGIN</code></dt>
<dd><p>Opens a block of messages. There will be no priority interaction between
the messages inside the block, the whole block will be treated as one message
of the priority that was specified by previous <code class="code">SET</code> command.
</p>
<p>It can only be called outside of a block; nesting is not allowed.
</p>
<ul class="itemize mark-bullet">
<li>The allowed commands inside a block are:
</li><li><code class="code">SPEAK</code>
</li><li><code class="code">SOUND_ICON</code>
</li><li><code class="code">CHAR</code>
</li><li><code class="code">KEY</code>
</li><li><code class="code">SET SELF RATE</code>
</li><li><code class="code">SET SELF PITCH</code>
</li><li><code class="code">SET SELF VOLUME</code>
</li><li><code class="code">SET SELF VOICE</code>
</li><li><code class="code">SET SELF LANGUAGE</code>
</li><li><code class="code">SET SELF PUNCTUATION</code>
</li><li><code class="code">SET SELF CAP_LET_RECOGN</code>
</li><li><code class="code">QUIT</code>
</li><li><code class="code">BLOCK END</code>
</li></ul>
</dd>
<dt><code class="code">BLOCK END</code></dt>
<dd><p>Closes a block of messages, see <code class="code">BLOCK BEGIN</code>.
</p>
<p>It can be only called inside a block opened by <code class="code">BLOCK BEGIN</code>;
nesting is not allowed.
</p></dd>
</dl>
<p>A more complete example of SSIP communication using BLOCKs.
</p>
<div class="example">
<pre class="example-preformatted">[...]
SET SELF PRIORITY TEXT
202 OK PRIORITY SET
BLOCK BEGIN
260 OK INSIDE BLOCK
SET SELF VOICE MALE1
209 OK VOICE SET
SPEAK
230 OK RECEIVING DATA
The word
225 OK MESSAGE QUEUED
SET SELF VOICE MALE2
209 OK VOICE SET
SPEAK
230 OK RECEIVING DATA
`Free'
225 OK MESSAGE QUEUED
SET SELF VOICE MALE1
209 OK VOICE SET
SPEAK
230 OK RECEIVING DATA
in Free Software refers to freedom, not price.
225 OK MESSAGE QUEUED
BLOCK END
261 OK OUTSIDE BLOCK
</pre></div>
<hr>
</div>
<div class="section-level-extent" id="Parameter-Setting-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Information-Retrieval-Commands" rel="next">Retrieving Information</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Blocks-of-Messages-Commands" rel="prev">Blocks of Messages Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Parameter-Setting"><span>4.5 Parameter Setting<a class="copiable-link" href="#Parameter-Setting"> &para;</a></span></h3>
<p>The <code class="code">SET</code> command sets various control parameters of the
synthesized speech or server configuration. The parameter is always
denoted by the second command argument.
</p>
<p>All the settings take effect on the connections specified in the first
argument (see <a class="pxref" href="#General-Rules">General Rules</a>) and until the parameter setting is
changed by another invocation of the appropriate <code class="code">SET</code> command or
until the connection is closed.
</p>
<p>The voice property and TTS-processing settings can sometimes be
without any real effect if the end synthesizer doesn&rsquo;t provide the
required functionality. This is not considered an error in the
implementation of SSIP.
</p>
<dl class="table">
<dt><code class="code">SET self CLIENT_NAME <var class="var">user</var>:<var class="var">client</var>:<var class="var">component</var></code></dt>
<dd><p>Set client&rsquo;s name. Client name consists of the user name, client
(application) identification, and the identification of the component
of the client (application). Each of the parts of the client name may
contain only alphanumeric characters, dashes (<code class="code">-</code>) and underscores
(<code class="code">_</code>).
</p>
<p>For example, for a client called <code class="code">lynx</code> that creates an SSIP
connection for its command processing, the name could be set in the
following way:
</p>
<div class="example">
<pre class="example-preformatted">SET CLIENT_NAME joe:lynx:cmd_processing
</pre></div>
<p>The client name is used in the server configuration settings, client
listings and message history handling. All its three parts can be
arbitrary, but it&rsquo;s important to define and follow rules for each
application supporting Speech Synthesis Interface Protocol, so that
a Speech Server user can configure all the aspects of the speech
output easily.
</p>
<p>Usually, this command should be sent as the very first command when a
new SSIP connection is established. The command may be
sent only once within a single connection. Attempts to change the
client&rsquo;s name once it&rsquo;s already set are answered with an error code.
</p>
<p>Only <code class="code">self</code> is allowed as the &lsquo;target&rsquo; argument.
</p>
</dd>
<dt><code class="code">SET all DEBUG {ON|OFF}</code></dt>
<dd><p>If set to <code class="code">ON</code>, Speech Dispatcher will write all its debugging
information (including output modules) with maximal verbosity into a
debug directory which is reported by the server to the client in reply
to this command. When subsequently set to <code class="code">OFF</code>, Speech
Dispatcher will stop writing out debugging information into this path
and close all the appropriate logging files.
</p>
<p>The intended use for this functionality is on-line debugging from
client application. If the user wants to report a problem, the client
application will ask him/her for a place to generate the logs, to repeat
the situation that he/she considers to be a bug, and then perhaps it will
automatically pack the logs and offer to send them to the developers
of Speech Dispatcher or another appropriate place where the contained
information can be processed.
</p>
<p>Warning: This option results in a lot of data being written into the
output logs and so should not be left on for an unnecessarily long
time.
</p>
<div class="example">
<pre class="example-preformatted">SET all DEBUG ON
262-/home/hanke/.cache/speech-dispatcher/log/debug
262 OK DEBUGGING SET
</pre></div>
</dd>
<dt><code class="code">SET {all | self | <var class="var">id</var> } OUTPUT_MODULE <var class="var">module</var></code></dt>
<dd><p>Set the output module to <var class="var">module</var>. This overrides the
selection based on language. Only values returned by the
<code class="code">LIST OUTPUT_MODULES</code> command are permitted.
See <a class="xref" href="#list_002doutput_002dmodules">list-output-modules</a>.
</p>
<div class="example">
<pre class="example-preformatted">SET self OUTPUT_MODULE espeak
216 OK OUTPUT MODULE SET
</pre></div>
</dd>
<dt><code class="code">GET OUTPUT_MODULE</code></dt>
<dd><p>Get the output module currently in use. This takes no parameters
and simply returns the current output module.
</p>
<div class="example">
<pre class="example-preformatted">GET OUTPUT_MODULE
251-espeak
251 OK GET RETURNED
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } LANGUAGE <var class="var">language-code</var></code></dt>
<dd><p>Set recommended language for this client according to <var class="var">language-code</var>.
<var class="var">language-code</var> is the code of the language according to RFC 1766.
</p>
<p>For example, to set the preferred language to Czech, you send the
following command:
</p>
<div class="example">
<pre class="example-preformatted">SET SELF LANGUAGE cs
</pre></div>
<p>Please note, that switching a language may require switching a voice,
so this command may actually override a previous call to <code class="code">SET VOICE</code> or
<code class="code">SET SYNTHESIS_VOICE</code>.
</p>
<p>The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultLanguage</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is <code class="code">en-US</code> (American English).
</p>
</dd>
<dt><code class="code">SET {self} SSML_MODE <var class="var">mode</var></code></dt>
<dd><p>Set the mode of the text received in the message body sent by the
<code class="code">SPEAK</code> command. This can be either a plain text, if <code class="code">mode</code>
is set to <code class="code">off</code> or a SSML marked text, if <code class="code">mode</code> is set to <code class="code">on</code>.
</p>
<p>There is no guarantee that the SSML markup will be respected, so
the application shouldn&rsquo;t rely on them. The external parameters
can still be set by the parameter setting commands. SSML is intended
only for additional markup inside the message. In SSML mode, each
message must begin with <code class="code">&lt;speak&gt;</code> and end with <code class="code">&lt;/speak&gt;</code>.
</p>
<p>For example a simple &lsquo;hello world&rsquo; looks like this:
</p>
<div class="example">
<pre class="example-preformatted">SET SELF SSML_MODE on
SPEAK
&lt;speak&gt;
Hello world!
&lt;/speak&gt;
.
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } PUNCTUATION { all | most | some | none }</code></dt>
<dd><p>Set punctuation mode to the given value. <code class="code">all</code> means speak all
punctuation characters, <code class="code">none</code> means speak no punctuation characters,
<code class="code">some</code> and <code class="code">most</code> mean speak only intermediate sets of punctuation
characters defined in the synthesizer&rsquo;s configuration or symbols files.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultPunctuationMode</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is <code class="code">none</code>.
</p>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } SPELLING { on | off }</code></dt>
<dd><p>Switch spelling on or off. If spelling is set to on, all the
incoming messages will be said letter-by-letter, instead of
speaking them as whole words.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultSpelling</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is <code class="code">off</code>.
</p>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } CAP_LET_RECOGN { none | spell | icon }</code></dt>
<dd><p>Set capital letters recognition mode. <code class="code">none</code> switches this
feature off. <code class="code">spell</code> causes capital letters to be spelled
in the speech using the table set as <code class="code">CAP_LET_RECOGN_TABLE</code>.
With parameter <code class="code">icon</code>, each capital letter will be preceded
by a sound icon (either sound or textual) specified by the user
in his configuration.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultCapLetRecognition</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is <code class="code">none</code>.
</p>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } VOICE_TYPE <var class="var">name</var></code></dt>
<dd><p>Set the voice identified by <var class="var">name</var>. <var class="var">name</var> must be one of the voice
identifiers returned by the command <code class="code">LIST VOICES</code> (see <a class="pxref" href="#Information-Retrieval-Commands">Retrieving Information</a>).
</p>
<p>There is a standard set of voice identifiers defined in <a class="ref" href="#Standard-Voices">Standard Voices</a>.
</p>
<p>The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultVoiceType</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is <code class="code">MALE1</code>.
</p>
</dd>
<dt><code class="code">GET VOICE_TYPE</code></dt>
<dd><p>Gets the current pre-defined voice. A list of voice identifiers can be
obtained by the command <code class="code">LIST VOICES</code> (see <a class="pxref" href="#Information-Retrieval-Commands">Retrieving Information</a>).
</p>
<div class="example">
<pre class="example-preformatted">GET VOICE_TYPE
251-MALE1
251 OK GET RETURNED
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } SYNTHESIS_VOICE <var class="var">name</var></code></dt>
<dd><p>Set the voice identified by <var class="var">name</var>. <var class="var">name</var> is a voice name
recognized by the current synthesizer. It must be one of the names
returned by the command <code class="code">LIST SYNTHESIS_VOICES</code> run for the
appropriate synthesizer. (see <a class="pxref" href="#Information-Retrieval-Commands">Retrieving Information</a>).
</p>
<p>Please note, that switching to a particular voice may require
switching a language, so this command may actually override a previous
call to <code class="code">SET LANGUAGE</code>.
</p>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } RATE <var class="var">n</var></code></dt>
<dd><p>Set the rate of speech. <var class="var">n</var> is an integer value within the range
from -100 to 100, lower values meaning slower
speech and higher values meaning faster speech.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultRate</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is 0.
</p>
</dd>
<dt><code class="code">GET RATE</code></dt>
<dd><p>Get the current rate of speech value.
</p>
<div class="example">
<pre class="example-preformatted">GET RATE
251-10
251 OK GET RETURNED
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } PITCH <var class="var">n</var></code></dt>
<dd><p>Set the pitch of speech. <var class="var">n</var> is an integer value within the range
from -100 to 100, lower values meaning lower
pitch and higher values meaning higher pitch.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultPitch</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is 0.
</p>
</dd>
<dt><code class="code">GET PITCH</code></dt>
<dd><p>Get the current pitch value.
</p>
<div class="example">
<pre class="example-preformatted">GET PITCH
251-10
251 OK GET RETURNED
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } VOLUME <var class="var">n</var></code></dt>
<dd><p>Set the volume of speech. <var class="var">n</var> is an integer value within the range
from -100 to 100. lower values meaning lower
volume and higher values meaning higher volume.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultVolume</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is 100.
</p>
</dd>
<dt><code class="code">GET VOLUME</code></dt>
<dd><p>Get the current volume value.
</p>
<div class="example">
<pre class="example-preformatted">GET VOLUME
251-100
251 OK GET RETURNED
</pre></div>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } PAUSE_CONTEXT <var class="var">n</var></code></dt>
<dd><p>Set the number of (more or less) sentences that should be repeated
after a previously paused text is resumed. If there isn&rsquo;t enough text
before the pause spot, the entire message is repeated. <var class="var">n</var>
is a positive integer value specifying the number of sentences to
repeat.
The default for the Speech Dispatcher implementation of SSIP
is determined by the <code class="code">DefaultPauseContext</code> setting in the
<code class="code">speechd.conf</code> file. The factory default is 0.
</p>
</dd>
<dt><code class="code">SET { all | self | <var class="var">id</var> } HISTORY { on | off }</code></dt>
<dd><p>Enable (<code class="code">on</code>) or disable (<code class="code">off</code>) storing of received
messages into history.
</p>
<p>This command is intended for use by message history browsers and
usually should not be used by other kinds of clients.
</p></dd>
</dl>
<hr>
</div>
<div class="section-level-extent" id="Information-Retrieval-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="next">Message Events Notification and Index Marking</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Parameter-Setting-Commands" rel="prev">Parameter Setting</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Retrieving-Information"><span>4.6 Retrieving Information<a class="copiable-link" href="#Retrieving-Information"> &para;</a></span></h3>
<p>The <code class="code">LIST</code> command serves for retrieving information that can be
presented to the user for selection of the values to the <code class="code">SET</code>
command. The information listed is selected according to the first
argument of the <code class="code">LIST</code> command.
</p>
<dl class="table">
<dd><a class="anchor" id="list_002doutput_002dmodules"></a></dd>
<dt><code class="code">LIST OUTPUT_MOUDLES</code></dt>
<dd><p>Lists the available output modules putting each module identification
name one on a single line.
</p>
<p>Example:
</p><div class="example">
<pre class="example-preformatted">LIST OUTPUT_MODULES
250-festival
250-espeak
250 OK MODULE LIST SENT
</pre></div>
</dd>
<dt><code class="code">LIST VOICES</code></dt>
<dd><p>Lists the available symbolic voice names putting each voice name on a single
line. These are symbolic names that are mapped to the real voices used in the
synthesizer either automatically or via synthesizer or output module
configuration.
</p>
<p>Example:
</p><div class="example">
<pre class="example-preformatted">LIST VOICES
249-MALE1
249-MALE2
249-MALE3
249-FEMALE1
249-FEMALE2
249-FEMALE3
249-CHILD_MALE
249-CHILD_FEMALE
249 OK VOICE LIST SENT
</pre></div>
</dd>
<dt><code class="code">LIST SYNTHESIS_VOICES [<var class="var">language</var> [<var class="var">variant</var>]]</code></dt>
<dd>
<p>Lists the available voices for the current synthesizer in use. These
names differ from those obtained by <code class="code">LIST VOICES</code> in that they
are names of the real voices used inside the synthesizer.
</p>
<p>This feature should only be used to allow the user to choose the voice.
All automatic switching of voices (unless user-configurable) should be
done using the symbolic voice names which can be configured in the synthesizer.
</p>
<p>Each voice name is listed on a separate line together with its language
code and dialect identification string separated by tabs. The dialect
identification strings do not have well-defined meaning yet. If no dialect
is specified by the synthesizer, the value <code class="code">none</code> is used.
</p>
<p>Example:
</p><div class="example">
<pre class="example-preformatted">LIST SYNTHESIS_VOICES
249-afrikaans af none
249-welsh-test cy none
249-german de none
249-greek_test el none
249-en-rhotic en r
249-lancashire en uk-north
249 OK VOICE LIST SENT
</pre></div>
<p>Optionally, the language, and possibly even the variant, can be specified, to
filter out other languages or variants.
</p>
<p>Example:
</p><div class="example">
<pre class="example-preformatted">LIST SYNTHESIS_VOICES fr
249-French (Belgium) fr-BE none
249-French (Switzerland) fr-CH none
249-French (France) fr-FR none
249 OK VOICE LIST SENT
LIST SYNTHESIS_VOICES fr-FR
249-French (France) fr-FR none
249 OK VOICE LIST SENT
LIST SYNTHESIS_VOICES fr-CA
304 CANT LIST VOICES
</pre></div>
</dd>
</dl>
<hr>
</div>
<div class="section-level-extent" id="Message-Events-Notification-and-Index-Marking">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#History-Handling-Commands" rel="next">History Handling</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Information-Retrieval-Commands" rel="prev">Retrieving Information</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Message-Events-Notification-and-Index-Marking-1"><span>4.7 Message Events Notification and Index Marking<a class="copiable-link" href="#Message-Events-Notification-and-Index-Marking-1"> &para;</a></span></h3>
<ul class="mini-toc">
<li><a href="#Why-Events-Notification">Why Events Notification</a></li>
<li><a href="#Types-of-Events">Types of Events</a></li>
<li><a href="#Events-Notifications-in-SSIP">Events Notification in SSIP</a></li>
<li><a href="#Switching-Notifications-On-and-Off">Switching Notifications On and Off</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Why-Events-Notification">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Types-of-Events" rel="next">Types of Events</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="prev">Message Events Notification and Index Marking</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="up">Message Events Notification and Index Marking</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Why-Events-Notification-1"><span>4.7.1 Why Events Notification<a class="copiable-link" href="#Why-Events-Notification-1"> &para;</a></span></h4>
<p>Applications can send messages to a Speech Server through the SSIP
<code class="code">SPEAK</code> command. However, this command only puts the received
message into a queue in Speech Server and returns immediately. The
message then will or will not be said at some particular time
according to its priority. Through Message Events Notification, the
application is able to discover certain kind of events, including when
the message started to be played on the speakers, when it terminated
playing, when it was paused and resumed, or when it was
interrupted/discarded. It is also possible to get notification when a
certain place in the given text was reached while playing the
synthesized text on the speakers &ndash; this capability, however, might or
might not be supported by the end synthesizer and so client
applications should not rely on it.
</p>
<hr>
</div>
<div class="subsection-level-extent" id="Types-of-Events">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Events-Notifications-in-SSIP" rel="next">Events Notification in SSIP</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Why-Events-Notification" rel="prev">Why Events Notification</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="up">Message Events Notification and Index Marking</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Types-of-Events-1"><span>4.7.2 Types of Events<a class="copiable-link" href="#Types-of-Events-1"> &para;</a></span></h4>
<p>SSIP recognizes several types of events. Each event is reported
together with the unique identification of the message and client it
is associated with. This is an overview of available events. For
detailed SSIP syntax, please look below.
</p>
<dl class="table">
<dt><code class="code">BEGIN</code></dt>
<dd>
<p>This event means that the synthesizer just started to speak the
message and the user is able to hear the speech on his/her speakers.
</p>
<p>Please note that not every message stored for speaking by the
<code class="code">SPEAK</code> command will issue this event. It can issue the
<code class="code">CANCEL</code> event instead.
</p>
</dd>
<dt><code class="code">END</code></dt>
<dd>
<p>This event means that the synthesizer just terminated speaking the
message (by reaching its end) and the user is no longer able to hear
the speech on their speakers.
</p>
<p>Again, note that not every message that has already reported the
<code class="code">BEGIN</code> event will necessarily get to the <code class="code">END</code> event.
It might instead issue the <code class="code">CANCEL</code> or <code class="code">PAUSE</code> events.
</p>
</dd>
<dt><code class="code">CANCEL</code></dt>
<dd>
<p>The <code class="code">CANCEL</code> event is reported when the message was canceled
(either after <code class="code">BEGIN</code> during speaking or even before, when waiting
in the queues) and will not be spoken anymore.
</p>
</dd>
<dt><code class="code">PAUSE</code></dt>
<dd>
<p>The event <code class="code">PAUSE</code> means that the message that was being spoken
was paused and no longer produces any sound on the speakers, but
was not discarded and the rest of the message might be spoken again after the
<code class="code">RESUME</code> command is sent. See <a class="xref" href="#Speech-Output-Control-Commands">Controlling Speech Output</a>. This will be reported by the <code class="code">RESUME</code> event.
</p>
<p><code class="code">PAUSE</code> is always preceded by the event <code class="code">BEGIN</code>, and can
be followed by either the event <code class="code">RESUME</code> or <code class="code">CANCEL</code>.
</p>
</dd>
<dt><code class="code">RESUME</code></dt>
<dd>
<p>The event <code class="code">RESUME</code> means that a message that was paused
while being spoken, just started to continue and again produces
sound in the speakers.
</p>
<p><code class="code">RESUME</code> is always preceded by the event <code class="code">PAUSE</code>, and can
be followed by either the event <code class="code">END</code> or <code class="code">CANCEL</code>.
</p>
</dd>
<dt><code class="code">INDEX_MARK</code></dt>
<dd>
<p>This event means that some previously specified place in the text
(so-called index mark) was reached when speaking the synthesized
message in the speakers. It is always accompanied by an additional
parameter that indicates which place it is &ndash; the name of the index
mark.
</p>
</dd>
</dl>
<p>Example (not in SSIP syntax):
</p>
<p>This SSML message
</p><div class="example">
<pre class="example-preformatted"> &lt;speak&gt;Hello, &lt;mark name=&quot;mark1&quot;/&gt; how does it work?&lt;/speak&gt;
</pre></div>
<p>would issue the following sequence of events if it is not discarded or paused:
</p>
<div class="example">
<pre class="example-preformatted"> BEGIN
INDEX_MARK &quot;mark1&quot;
END
</pre></div>
<p>or this one if it gets paused after the first index mark and then later resumed.
</p>
<div class="example">
<pre class="example-preformatted"> BEGIN
INDEX_MARK &quot;mark1&quot;
PAUSE
RESUME
END
</pre></div>
<hr>
</div>
<div class="subsection-level-extent" id="Events-Notifications-in-SSIP">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Switching-Notifications-On-and-Off" rel="next">Switching Notifications On and Off</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Types-of-Events" rel="prev">Types of Events</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="up">Message Events Notification and Index Marking</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Events-Notification-in-SSIP"><span>4.7.3 Events Notification in SSIP<a class="copiable-link" href="#Events-Notification-in-SSIP"> &para;</a></span></h4>
<p>Event notifications, if requested, are reported asynchronously in
SSIP. This means that they are not sent as replies to any particular
requests but can arrive anytime. However, notifications can&rsquo;t arrive
in the time between when a SSIP command is sent by the client and its
reply is sent back by the server.
</p>
<p>Each notification consists of a multi-line SSIP reply as defined in
<a class="ref" href="#General-Rules">General Rules</a>, and includes at least two parameters:
<code class="code">msg_id</code> and <code class="code">client_id</code>. <code class="code">msg_id</code> is the
identification number of the message the event is related to,
<a class="ref" href="#SPEAK">SPEAK</a> while <code class="code">client_id</code> is the identification number of the
client who sent the message. Some events may have additional
parameters.
</p>
<dl class="table">
<dt><code class="code">INDEX_MARK</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">700-msg_id
700-client_id
700-index_mark
700 END
</pre></div>
<p>The event <code class="code">INDEX_MARK</code> carries a special parameter
<code class="code">index_mark</code> which is a string of characters identifying the
index mark, as specified by the client application (e.g. by the
SSML tag &lt;mark/&gt;.
</p>
</dd>
<dt><code class="code">BEGIN</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">701-msg_id
701-client_id
701 BEGIN
</pre></div>
</dd>
<dt><code class="code">END</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">702-msg_id
702-client_id
702 END
</pre></div>
</dd>
<dt><code class="code">CANCEL</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">703-msg_id
703-client_id
703 CANCELED
</pre></div>
</dd>
<dt><code class="code">PAUSE</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">704-msg_id
704-client_id
704 PAUSED
</pre></div>
</dd>
<dt><code class="code">RESUME</code></dt>
<dd>
<div class="example">
<pre class="example-preformatted">705-msg_id
705-client_id
705 RESUMED
</pre></div>
</dd>
</dl>
<hr>
</div>
<div class="subsection-level-extent" id="Switching-Notifications-On-and-Off">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Events-Notifications-in-SSIP" rel="prev">Events Notification in SSIP</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="up">Message Events Notification and Index Marking</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Switching-Notifications-On-and-Off-1"><span>4.7.4 Switching Notifications On and Off<a class="copiable-link" href="#Switching-Notifications-On-and-Off-1"> &para;</a></span></h4>
<p>The client application might or might not want to receive the
notifications about events, or it might want to receive some but not
others. SSIP allows clients to specify which notifications are to be
used.
</p>
<p>The following commands for setting notifications on and off affect all
the text messages (sent by the <code class="code">SPEAK</code> SSIP command) based on
when the appropriate <code class="code">SPEAK</code> command was called. So if for
example, you set all notifications on, send a message and then set all
notifications off, you will receive all the available notifications
for that message even though it might start speaking after the
notifications are already turned off.
</p>
<dl class="table">
<dt><code class="code">SET SELF NOTIFICATION ALL { on | off }</code></dt>
<dd>
<p>Set all available event notifications to either &ldquo;on&rdquo; or &ldquo;off&rdquo; for
for the messages that follow. See <a class="xref" href="#Types-of-Events">Types of Events</a>.
</p>
</dd>
<dt><code class="code">SET SELF NOTIFICATION BEGIN { on | off }</code></dt>
<dt><code class="code">SET SELF NOTIFICATION END { on | off }</code></dt>
<dd>
<p>Set the event notifications for <code class="code">BEGIN</code> or <code class="code">END</code> to either
&ldquo;on&rdquo; or &ldquo;off&rdquo; for the messages that follow. See <a class="xref" href="#Types-of-Events">Types of Events</a>.
</p>
</dd>
<dt><code class="code">SET SELF NOTIFICATION CANCEL { on | off }</code></dt>
<dd>
<p>Set the event notifications for <code class="code">CANCEL</code> to <code class="code">mode</code> where
<code class="code">mode</code> is either &ldquo;on&rdquo; or &ldquo;off&rdquo; for switching the
notifications on or off for the messages that follow. See <a class="xref" href="#Types-of-Events">Types of Events</a>.
</p>
</dd>
<dt><code class="code">SET SELF NOTIFICATION PAUSE { on | off }</code></dt>
<dt><code class="code">SET SELF NOTIFICATION RESUME { on | off }</code></dt>
<dd>
<p>Set the event notifications for <code class="code">PAUSE</code> or <code class="code">RESUME</code> to
<code class="code">mode</code> where <code class="code">mode</code> is either &ldquo;on&rdquo; or &ldquo;off&rdquo; for
switching the notifications on or off for the messages that
follow. See <a class="xref" href="#Types-of-Events">Types of Events</a>.
</p>
</dd>
<dt><code class="code">SET SELF NOTIFICATION INDEX_MARKS { on | off }</code></dt>
<dd>
<p>Set the event notifications for <code class="code">INDEX_MARK</code> to either &ldquo;on&rdquo; or
&ldquo;off&rdquo; for switching the notifications on or off for the messages
that follow. See <a class="xref" href="#Types-of-Events">Types of Events</a>.
</p>
</dd>
</dl>
<hr>
</div>
</div>
<div class="section-level-extent" id="History-Handling-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Other-Commands" rel="next">Other Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Message-Events-Notification-and-Index-Marking" rel="prev">Message Events Notification and Index Marking</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="History-Handling"><span>4.8 History Handling<a class="copiable-link" href="#History-Handling"> &para;</a></span></h3>
<ul class="mini-toc">
<li><a href="#Purpose-of-Message-History">Purpose of Message History</a></li>
<li><a href="#Message-History-in-SSIP">Message History in SSIP</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="Purpose-of-Message-History">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Message-History-in-SSIP" rel="next">Message History in SSIP</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#History-Handling-Commands" rel="prev">History Handling</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#History-Handling-Commands" rel="up">History Handling</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Purpose-of-Message-History-1"><span>4.8.1 Purpose of Message History<a class="copiable-link" href="#Purpose-of-Message-History-1"> &para;</a></span></h4>
<p>It seems a good feature for the blind and visually impaired to
provide the possibility to browse, through some simple client, the
history of received and previously said messages.
</p>
<p>Some messages are even received by Speech Server without being said,
because there will always be more space for information on the screen
than speech output can possibly provide.
</p>
<p>For this reason, SSIP defines a set of commands that allow client
applications to browse through the history of previously received
messages saved on the server. The idea is that <em class="emph">each</em> message
received by the server should be accessible through the history and
the user can search for it later by time, keywords or using other
methods.
</p>
<p>On the other hand, this may cause security issues as several
clients may connect to Speech Server and they might originate
from different users. Because of flatpak and other technologies
checking the user id isn&rsquo;t enough. So now, only those messages
that come from the same client connection are accessible.
</p>
<hr>
</div>
<div class="subsection-level-extent" id="Message-History-in-SSIP">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Purpose-of-Message-History" rel="prev">Purpose of Message History</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#History-Handling-Commands" rel="up">History Handling</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h4 class="subsection" id="Message-History-in-SSIP-1"><span>4.8.2 Message History in SSIP<a class="copiable-link" href="#Message-History-in-SSIP-1"> &para;</a></span></h4>
<p>History is handled by the <code class="code">HISTORY</code> command. It can take many
forms, described below, that allow browsing, retrieving and repeating
stored messages. In each invocation of the <code class="code">HISTORY</code> command
there is no difference between processing spoken or not spoken
messages, all the received messages are processed.
</p>
<p>The implementation of these history commands in the Speech Dispatcher
implementation of SSIP is still under
way. If you want to use them, please contact us to see the
current status.
</p>
<p>There is a <em class="dfn">history cursor</em> pointing to some message in the
history. You can move it across history messages and retrieve the
message the cursor is pointing to, using the <code class="code">HISTORY CURSOR</code> set
of command arguments described below.
</p>
<dl class="table">
<dt><code class="code">HISTORY GET CLIENT_LIST</code></dt>
<dd><p>List known client names, their identifiers and status. Each connection is
listed on a separate line in the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">id</var> <var class="var">name</var> <var class="var">status</var>
</pre></div>
<p>where <var class="var">id</var> is a client id that can be used in other history
handling requests or in the speech output control commands
(see <a class="pxref" href="#Speech-Output-Control-Commands">Controlling Speech Output</a>), <var class="var">name</var> is the client
name as set through the <code class="code">SET SELF CLIENT_NAME</code> command, and
<var class="var">status</var> is <code class="code">1</code> for connected clients and <code class="code">0</code> for
disconnected clients. <var class="var">id</var>s are unique within a single run of
Speech Server.
</p>
<p>Sample SSIP reply:
</p>
<div class="example">
<pre class="example-preformatted">240-0 joe:speechd_client:main 0
240-1 joe:speechd_client:status 0
240-2 unknown:unknown:unknown 1
240 OK CLIENTS LIST SENT
</pre></div>
</dd>
<dt><code class="code">HISTORY GET CLIENT_ID</code></dt>
<dd><p>Return id of the client itself.
</p>
<p>The id is listed on a separate line in the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">id</var>
</pre></div>
<p>Example:
</p><div class="example">
<pre class="example-preformatted">200-123
200 OK CLIENT ID SENT
</pre></div>
</dd>
<dt><code class="code">HISTORY GET CLIENT_MESSAGES { <var class="var">id</var> | all | self } <var class="var">start</var> <var class="var">number</var></code></dt>
<dd><p>List identifiers of messages sent by the client identified by
<var class="var">id</var>. If the special identifier <code class="code">all</code> is used, identifiers
of messages sent by all clients are listed; if the special identifier
<code class="code">self</code> is used, identifiers of messages sent by this client are
listed.
</p>
<p><var class="var">number</var> of messages is listed, starting from the message numbered
<var class="var">start</var>. Both <var class="var">number</var> and <var class="var">start</var> must be positive
integers. The first message is numbered 1, the second 2, etc. If the
given range exceeds the range of available messages, no error is
signaled and the given range is restricted to the available range of
messages.
</p>
<p>Messages are sorted by the criterion used in the last client&rsquo;s
invocation of the <code class="code">HISTORY SORT</code> command. If no <code class="code">HISTORY
SET</code> has been invoked yet, the messages are sorted from the oldest to
the newest, according to their time of arrival at Speech Server.
</p>
<p>Each message id is listed, together with other information, on a
separate line, in the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">id</var> <var class="var">client-id</var> <var class="var">client-name</var> &quot;<var class="var">time</var>&quot; <var class="var">priority</var> &quot;<var class="var">intro</var>&quot;
</pre></div>
<p><var class="var">client-id</var> is a numeric identifier of the client which sent the
message, <var class="var">client-name</var> is its name as set by the <code class="code">SET SELF
CLIENT_NAME</code> command (see <a class="pxref" href="#Parameter-Setting-Commands">Parameter Setting</a>).
<var class="var">time</var> is the time of arrival of the message, in the fixed length
<code class="code">YYYY-MM-DD HH:MM:SS</code> format. <var class="var">priority</var> is the priority of
the message, one of the values accepted by the <code class="code">SET SELF PRIORITY</code>
command (see <a class="pxref" href="#Parameter-Setting-Commands">Parameter Setting</a>).
</p>
<p><var class="var">intro</var> is the introductory part of the message of a certain
maximum length, see the <code class="code">HISTORY SET SHORT_MESSAGE_LENGTH</code>
command. <var class="var">intro</var> does not contain any double quotes nor the line
feed character.
</p>
<p>All the message identifiers in the history, regardless of clients that
issued them, are unique within a single run of Speech Server and
remain unchanged.
</p>
</dd>
<dt><code class="code">HISTORY GET LAST</code></dt>
<dd><p>List the id of the last message sent by the client.
</p>
<p>The id is listed on a separate line of the following format:
</p>
<div class="example">
<pre class="example-preformatted"><var class="var">id</var>
</pre></div>
<p>If the client hasn&rsquo;t sent any message yet, return an error code.
</p>
</dd>
<dt><code class="code">HISTORY GET MESSAGE <var class="var">id</var></code></dt>
<dd><p>Return the text of the history message identified by <var class="var">id</var>. If
<var class="var">id</var> doesn&rsquo;t refer to any message, return an error code instead.
The text is sent as a multi-line message, with no escaping or special
transformation.
</p>
<p>An example SSIP response to the command:
</p>
<div class="example">
<pre class="example-preformatted">200-Hello, world!
200-How are you?
200 OK MESSAGE SENT
</pre></div>
</dd>
<dt><code class="code">HISTORY CURSOR GET</code></dt>
<dd><p>Get the id of the message the history cursor is pointing to.
</p>
<p>The id is listed on a separate line. Sample SSIP reply to
this command:
</p>
<div class="example">
<pre class="example-preformatted">243-42
243 OK CURSOR POSITION RETURNED
</pre></div>
</dd>
<dt><code class="code">HISTORY CURSOR SET { <var class="var">id</var> | all | self } { first | last | pos <var class="var">n</var> }</code></dt>
<dd><p>Set the history cursor to the given position. The meaning of the
first argument after <code class="code">SET</code> is the same as in the <code class="code">HISTORY
GET CLIENT_MESSAGES</code> command. The argument <code class="code">first</code> asks to set
the cursor on the first position and the argument <code class="code">last</code> asks to
set the cursor on the last position of the history of the given
client. If the argument <code class="code">pos</code> is used, the position is set to
<var class="var">n</var>, where <var class="var">n</var> is a positive integer. It is an error if
<var class="var">id</var> doesn&rsquo;t identify any client or if <var class="var">n</var> doesn&rsquo;t point to
any existing position in the history.
</p>
<p>As for the order and numbering of the messages in the history, the
same rules apply as in <code class="code">HISTORY GET CLIENT_MESSAGES</code>. See above.
</p>
</dd>
<dt><code class="code">HISTORY CURSOR { forward | backward }</code></dt>
<dd><p>Move the cursor one position <code class="code">forward</code>, resp. <code class="code">backward</code>,
within the messages of the client specified in the last <code class="code">HISTORY
CURSOR SET</code> command. If there is no next, resp. previous, message,
don&rsquo;t move the cursor and return an error code.
</p>
</dd>
<dt><code class="code">HISTORY SAY <var class="var">id</var></code></dt>
<dd><p>Speak the message from history identified by <var class="var">id</var>. If <var class="var">id</var>
doesn&rsquo;t refer to any message, return an error code instead.
</p>
<p>The message is spoken as it would be sent by its originating command
(<code class="code">SPEAK</code> or <code class="code">SOUND_ICON</code>), but the <em class="emph">current</em> settings
(priority, etc.) apply.
</p>
</dd>
<dt><code class="code">HISTORY SORT { asc | desc } { time | user | client_name | priority | message_type }</code></dt>
<dd><p>Sort the messages in history according to the given criteria. If the
second command argument is <code class="code">asc</code>, sort in ascending order, if
it is <code class="code">desc</code>, sort in descending order. The third command
argument specifies the message property to order by:
</p>
<dl class="table">
<dt><code class="code">time</code></dt>
<dd><p>Time of arrival of the message.
</p>
</dd>
<dt><code class="code">user</code></dt>
<dd><p>User name.
</p>
</dd>
<dt><code class="code">client_name</code></dt>
<dd><p>Client name, excluding user name.
</p>
</dd>
<dt><code class="code">priority</code></dt>
<dd><p>Priority.
</p>
</dd>
<dt><code class="code">message_type</code></dt>
<dd><p>Type of the message (text, sound icon, character, key), in the order
specified in the Speech Server configuration or by the <code class="code">HISTORY
SET MESSAGE_TYPE_ORDERING</code> command.
</p></dd>
</dl>
<p>The sorting is stable &mdash; order of all the messages that are equal in
the given ordering remains the same.
</p>
<p>The sorting is specific to the given client connection, other
connections are unaffected by invocation of this command.
</p>
</dd>
<dt><code class="code">HISTORY SET SHORT_MESSAGE_LENGTH <var class="var">length</var></code></dt>
<dd><p>Set the maximum length of short versions of history messages to
<var class="var">length</var> characters. <var class="var">length</var> must be a non-negative integer.
</p>
<p>Short (truncated) versions of history messages are used e.g. in the
answer to the <code class="code">HISTORY GET CLIENT_MESSAGES</code> format.
</p>
</dd>
<dt><code class="code">HISTORY SET MESSAGE_TYPE_ORDERING &quot;<var class="var">ordering</var>&quot;</code></dt>
<dd><p>Set the ordering of the message types, from the minimum to the
maximum. <var class="var">ordering</var> is a sequence of the following symbols,
separated by spaces: <code class="code">text</code>, <code class="code">sound_icon</code>, <code class="code">char</code>,
<code class="code">key</code>. The symbols are case insensitive and each of them must be
present in <var class="var">ordering</var> exactly once.
</p>
<p>The specified ordering can be used by the <code class="code">HISTORY SORT</code> command.
</p>
</dd>
<dt><code class="code">HISTORY SEARCH { <var class="var">id</var> | all | self } &quot;<var class="var">condition</var>&quot;</code></dt>
<dd><p>Return the list of history messages satisfying <var class="var">condition</var>. The
command allows searching messages by given words. The output format
is the same as the <code class="code">HISTORY GET CLIENT_MESSAGES</code> command.
</p>
<p>The meaning of the first argument after <code class="code">SEARCH</code> is the same as
the <code class="code">HISTORY GET CLIENT_MESSAGES</code> command.
</p>
<p><var class="var">condition</var> is constructed according to the following grammar
rules:
</p>
<dl class="table">
<dt><code class="code"><var class="var">condition</var> :: <var class="var">word</var></code></dt>
<dd><p>Matches messages containing <var class="var">word</var>.
</p>
</dd>
<dt><code class="code"><var class="var">condition</var> :: ( ! <var class="var">condition</var> )</code></dt>
<dd><p>Negation of the given condition.
</p>
</dd>
<dt><code class="code"><var class="var">condition</var> :: ( <var class="var">condition</var> [ &amp; <var class="var">condition</var> ... ] )</code></dt>
<dd><p>Logical AND &mdash; all the conditions must be satisfied.
</p>
</dd>
<dt><code class="code"><var class="var">condition</var> :: ( <var class="var">condition</var> [ | <var class="var">condition</var> ... ] )</code></dt>
<dd><p>Logical OR &mdash; at least one of the conditions must be satisfied.
</p></dd>
</dl>
<p>Spaces within the condition are insignificant and ignored.
</p>
<p>The following rules apply to <var class="var">word</var>s:
</p>
<ul class="itemize mark-minus">
<li><var class="var">word</var> is a sequence of adjacent alphanumeric characters.
</li><li>If <var class="var">word</var> contains any upper-case letter, the search for the word
is case sensitive, otherwise it&rsquo;s case insensitive.
</li><li><var class="var">word</var> must match whole word, not only its substring.
</li><li><var class="var">word</var> can contain the wild card characters <code class="code">?</code>, substituting
any single alphanumeric character, and <code class="code">*</code>, substituting any
number (incl. zero) of alphanumeric characters.
</li></ul>
<p>Returned messages are sorted by the following rules:
</p>
<ol class="enumerate">
<li> The primary sorting is defined by the number of the satisfied
subconditions on the top level of the given condition, from the
highest (best matching messages first) to the lowest. This takes
effect only if the given condition is the OR rule.
</li><li> The criterion used in the last client&rsquo;s invocation of the
<code class="code">HISTORY SORT</code> command. If no <code class="code">HISTORY SORT</code> has been
invoked yet, the messages are sorted from the oldest to the newest,
according to their time of arrival.
</li></ol>
</dd>
</dl>
<hr>
</div>
</div>
<div class="section-level-extent" id="Other-Commands">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#History-Handling-Commands" rel="prev">History Handling</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#SSIP-Commands" rel="up">SSIP Commands</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Other-Commands-1"><span>4.9 Other Commands<a class="copiable-link" href="#Other-Commands-1"> &para;</a></span></h3>
<dl class="table">
<dt><code class="code">QUIT</code></dt>
<dd><p>Close the connection.
</p>
</dd>
<dt><code class="code">HELP</code></dt>
<dd><p>Print a short list of all SSIP commands, as a multi-line message.
</p></dd>
</dl>
<hr>
</div>
</div>
<div class="chapter-level-extent" id="Return-Codes">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Appendices" rel="next">Appendices</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#SSIP-Commands" rel="prev">SSIP Commands</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="chapter" id="Return-Codes-1"><span>5 Return Codes<a class="copiable-link" href="#Return-Codes-1"> &para;</a></span></h2>
<p>Each line of the SSIP output starts with a three-digit numeric code of
the form <var class="var">NXX</var> where <var class="var">N</var> determines the result group and
<var class="var">xx</var> denotes the finer classification of the result.
</p>
<p>SSIP defines the following result groups:
</p>
<dl class="table">
<dt><var class="var">1xx</var></dt>
<dd><p>Informative response &mdash; general information about the protocol, help
messages.
</p>
</dd>
<dt><var class="var">2xx</var></dt>
<dd><p>Operation was completely successful.
</p>
</dd>
<dt><var class="var">3xx</var></dt>
<dd><p>Server error, problem on the server side.
</p>
</dd>
<dt><var class="var">4xx</var></dt>
<dd><p>Client error, invalid arguments or parameters received.
</p>
</dd>
<dt><var class="var">5xx</var></dt>
<dd><p>Client error, invalid command syntax, unparseable input.
</p>
</dd>
<dt><var class="var">7xx</var></dt>
<dd><p>Event notifications. See See <a class="xref" href="#Events-Notifications-in-SSIP">Events Notification in SSIP</a>.
</p></dd>
</dl>
<p>Result groups <var class="var">1xx</var> and <var class="var">2xx</var> correspond to successful
actions, other groups to unsuccessful actions. Only the groups
defined here may be returned in an SSIP connection.
</p>
<p>Currently, for return codes in the range <code class="code">100</code>&ndash;<code class="code">599</code>, only the meaning of
the first digit of the result code is defined. The last two digits are
insignificant and can be of any value. Clients shouldn&rsquo;t rely on the
unspecified digits in any way.
</p>
<p>However, the return codes in the range <code class="code">700</code>&ndash;<code class="code">800</code>,
reserved for events notification, are well defined in the appropriate
section of SSIP documentation and client applications can rely on
them.
</p>
<p>In the future, these return codes should be fixed so that clients can
rely on them.
</p>
<ul class="mini-toc">
<li><a href="#Sample-SSIP-Dialog">Example of an SSIP Dialog</a></li>
</ul>
<hr>
<div class="section-level-extent" id="Sample-SSIP-Dialog">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Return-Codes" rel="prev">Return Codes</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Return-Codes" rel="up">Return Codes</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="section" id="Example-of-an-SSIP-Dialog"><span>5.1 Example of an SSIP Dialog<a class="copiable-link" href="#Example-of-an-SSIP-Dialog"> &para;</a></span></h3>
<p>The following example illustrates a sample dialog with SSIP. The
client connects to a Speech Server, sets all the common parameters,
sends two text messages, displays the list of clients, instructs
Speech Server to repeat the second message, and closes the connection.
Lines starting with a numeric code are response lines of the server,
other lines are the lines sent by the client.
</p>
<div class="example">
<pre class="example-preformatted">SET SELF CLIENT_NAME joe:vi:default
208 OK CLIENT NAME SET
SET SELF PRIORITY MESSAGE
202 OK PRIORITY SET
SPEAK
230 OK RECEIVING DATA
Hello, I'm am SSIP communication example!
How are you?
.
225 OK MESSAGE QUEUED
SPEAK
230 OK RECEIVING DATA
Still there?
.
225 OK MESSAGE QUEUED
HISTORY GET CLIENT_LIST
240-1 jim:Emacs:default 0
240-2 jim:Emacs:default 0
240-3 unknown:unknown:unknown 0
240-4 jim:Emacs:default 1
240-5 joe:vi:default 1
240 OK CLIENTS LIST SENT
HISTORY GET LAST
242-39 joe:vi:default
242 OK LAST MSG SENT
HISTORY SAY 39
225 OK MESSAGE QUEUED
QUIT
231 HAPPY HACKING
</pre></div>
<hr>
</div>
</div>
<div class="appendix-level-extent" id="Appendices">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#GNU-Free-Documentation-License" rel="next">GNU Free Documentation License</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Return-Codes" rel="prev">Return Codes</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="appendix" id="Appendices-1"><span>Appendix A Appendices<a class="copiable-link" href="#Appendices-1"> &para;</a></span></h2>
<ul class="mini-toc">
<li><a href="#Key-Names">Key Names</a></li>
<li><a href="#Standard-Sound-Icons">Standard Sound Icons</a></li>
<li><a href="#Standard-Voices">Standard Voices</a></li>
</ul>
<hr>
<div class="appendixsec-level-extent" id="Key-Names">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Standard-Sound-Icons" rel="next">Standard Sound Icons</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Appendices" rel="prev">Appendices</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Appendices" rel="up">Appendices</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="appendixsec" id="Key-Names-1"><span>A.1 Key Names<a class="copiable-link" href="#Key-Names-1"> &para;</a></span></h3>
<p>This appendix defines all the recognized symbolic key names. The
names are case sensitive.
</p>
<h4 class="subheading" id="Special-Key-Names"><span>Special Key Names<a class="copiable-link" href="#Special-Key-Names"> &para;</a></span></h4>
<dl class="table">
<dt><code class="code">space</code></dt>
<dt><code class="code">underscore</code></dt>
<dt><code class="code">double-quote</code></dt>
</dl>
<h4 class="subheading" id="Auxiliary-Keys"><span>Auxiliary Keys<a class="copiable-link" href="#Auxiliary-Keys"> &para;</a></span></h4>
<dl class="table">
<dt><code class="code">alt</code></dt>
<dt><code class="code">control</code></dt>
<dt><code class="code">hyper</code></dt>
<dt><code class="code">meta</code></dt>
<dt><code class="code">shift</code></dt>
<dt><code class="code">super</code></dt>
</dl>
<h4 class="subheading" id="Control-Character-Keys"><span>Control Character Keys<a class="copiable-link" href="#Control-Character-Keys"> &para;</a></span></h4>
<dl class="table">
<dt><code class="code">backspace</code></dt>
<dt><code class="code">break</code></dt>
<dt><code class="code">delete</code></dt>
<dt><code class="code">down</code></dt>
<dt><code class="code">end</code></dt>
<dt><code class="code">enter</code></dt>
<dt><code class="code">escape</code></dt>
<dt><code class="code">f1</code></dt>
<dt><code class="code">f2</code></dt>
<dt><code class="code">f3</code></dt>
<dt><code class="code">f4</code></dt>
<dt><code class="code">f5</code></dt>
<dt><code class="code">f6</code></dt>
<dt><code class="code">f7</code></dt>
<dt><code class="code">f8</code></dt>
<dt><code class="code">f9</code></dt>
<dt><code class="code">f10</code></dt>
<dt><code class="code">f11</code></dt>
<dt><code class="code">f12</code></dt>
<dt><code class="code">f13</code></dt>
<dt><code class="code">f14</code></dt>
<dt><code class="code">f15</code></dt>
<dt><code class="code">f16</code></dt>
<dt><code class="code">f17</code></dt>
<dt><code class="code">f18</code></dt>
<dt><code class="code">f19</code></dt>
<dt><code class="code">f20</code></dt>
<dt><code class="code">f21</code></dt>
<dt><code class="code">f22</code></dt>
<dt><code class="code">f23</code></dt>
<dt><code class="code">f24</code></dt>
<dt><code class="code">home</code></dt>
<dt><code class="code">insert</code></dt>
<dt><code class="code">kp-*</code></dt>
<dt><code class="code">kp-+</code></dt>
<dt><code class="code">kp--</code></dt>
<dt><code class="code">kp-.</code></dt>
<dt><code class="code">kp-/</code></dt>
<dt><code class="code">kp-0</code></dt>
<dt><code class="code">kp-1</code></dt>
<dt><code class="code">kp-2</code></dt>
<dt><code class="code">kp-3</code></dt>
<dt><code class="code">kp-4</code></dt>
<dt><code class="code">kp-5</code></dt>
<dt><code class="code">kp-6</code></dt>
<dt><code class="code">kp-7</code></dt>
<dt><code class="code">kp-8</code></dt>
<dt><code class="code">kp-9</code></dt>
<dt><code class="code">kp-enter</code></dt>
<dt><code class="code">left</code></dt>
<dt><code class="code">menu</code></dt>
<dt><code class="code">next</code></dt>
<dt><code class="code">num-lock</code></dt>
<dt><code class="code">pause</code></dt>
<dt><code class="code">print</code></dt>
<dt><code class="code">prior</code></dt>
<dt><code class="code">return</code></dt>
<dt><code class="code">right</code></dt>
<dt><code class="code">scroll-lock</code></dt>
<dt><code class="code">space</code></dt>
<dt><code class="code">tab</code></dt>
<dt><code class="code">up</code></dt>
<dt><code class="code">window</code></dt>
</dl>
<hr>
</div>
<div class="appendixsec-level-extent" id="Standard-Sound-Icons">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#Standard-Voices" rel="next">Standard Voices</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Key-Names" rel="prev">Key Names</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Appendices" rel="up">Appendices</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="appendixsec" id="Standard-Sound-Icons-1"><span>A.2 Standard Sound Icons<a class="copiable-link" href="#Standard-Sound-Icons-1"> &para;</a></span></h3>
<p>There are none currently.
</p>
<hr>
</div>
<div class="appendixsec-level-extent" id="Standard-Voices">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Standard-Sound-Icons" rel="prev">Standard Sound Icons</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Appendices" rel="up">Appendices</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h3 class="appendixsec" id="Standard-Voices-1"><span>A.3 Standard Voices<a class="copiable-link" href="#Standard-Voices-1"> &para;</a></span></h3>
<p>The following voice names are always present in the output of the
<code class="code">LIST VOICES</code> command (see <a class="pxref" href="#Information-Retrieval-Commands">Retrieving Information</a>):
</p>
<dl class="table">
<dt><code class="code">MALE1</code></dt>
<dt><code class="code">MALE2</code></dt>
<dt><code class="code">MALE3</code></dt>
<dt><code class="code">FEMALE1</code></dt>
<dt><code class="code">FEMALE2</code></dt>
<dt><code class="code">FEMALE3</code></dt>
<dt><code class="code">CHILD_MALE</code></dt>
<dt><code class="code">CHILD_FEMALE</code></dt>
</dl>
<p>The actual presence of any of these voices is not guaranteed. But the
command <code class="code">SET VOICE</code> (see <a class="pxref" href="#Parameter-Setting-Commands">Parameter Setting</a>) must
accept any of them. If the given voice is not available, it is mapped
to another voice by the output module.
</p>
<hr>
</div>
</div>
<div class="appendix-level-extent" id="GNU-Free-Documentation-License">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Next: </span><span class="nav-link"><a href="#GNU-General-Public-Licence" rel="next">GNU General Public License</a></span></span>, <span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#Appendices" rel="prev">Appendices</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="appendix" id="GNU-Free-Documentation-License-1"><span>Appendix B GNU Free Documentation License<a class="copiable-link" href="#GNU-Free-Documentation-License-1"> &para;</a></span></h2>
<div class="center">Version 1.2, November 2002
</div><a class="index-entry-id" id="index-FDL_002c-GNU-Free-Documentation-License"></a>
<div class="display">
<pre class="display-preformatted">Copyright &copy; 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre></div>
<ol class="enumerate" start="0">
<li> PREAMBLE
<p>The purpose of this License is to make a manual, textbook, or other
functional and useful document <em class="dfn">free</em> in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
</p>
<p>This License is a kind of &ldquo;copyleft&rdquo;, which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
</p>
<p>We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
</p>
</li><li> APPLICABILITY AND DEFINITIONS
<p>This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The &ldquo;Document&rdquo;, below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as &ldquo;you&rdquo;. You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
</p>
<p>A &ldquo;Modified Version&rdquo; of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
</p>
<p>A &ldquo;Secondary Section&rdquo; is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document&rsquo;s overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
</p>
<p>The &ldquo;Invariant Sections&rdquo; are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
</p>
<p>The &ldquo;Cover Texts&rdquo; are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
</p>
<p>A &ldquo;Transparent&rdquo; copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not &ldquo;Transparent&rdquo; is called &ldquo;Opaque&rdquo;.
</p>
<p>Examples of suitable formats for Transparent copies include plain
<small class="sc">ASCII</small> without markup, Texinfo input format, LaTeX input
format, <abbr class="acronym">SGML</abbr> or <abbr class="acronym">XML</abbr> using a publicly available
<abbr class="acronym">DTD</abbr>, and standard-conforming simple <abbr class="acronym">HTML</abbr>,
PostScript or <abbr class="acronym">PDF</abbr> designed for human modification. Examples
of transparent image formats include <abbr class="acronym">PNG</abbr>, <abbr class="acronym">XCF</abbr> and
<abbr class="acronym">JPG</abbr>. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, <abbr class="acronym">SGML</abbr> or
<abbr class="acronym">XML</abbr> for which the <abbr class="acronym">DTD</abbr> and/or processing tools are
not generally available, and the machine-generated <abbr class="acronym">HTML</abbr>,
PostScript or <abbr class="acronym">PDF</abbr> produced by some word processors for
output purposes only.
</p>
<p>The &ldquo;Title Page&rdquo; means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, &ldquo;Title Page&rdquo; means
the text near the most prominent appearance of the work&rsquo;s title,
preceding the beginning of the body of the text.
</p>
<p>A section &ldquo;Entitled XYZ&rdquo; means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as &ldquo;Acknowledgements&rdquo;,
&ldquo;Dedications&rdquo;, &ldquo;Endorsements&rdquo;, or &ldquo;History&rdquo;.) To &ldquo;Preserve the Title&rdquo;
of such a section when you modify the Document means that it remains a
section &ldquo;Entitled XYZ&rdquo; according to this definition.
</p>
<p>The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
</p>
</li><li> VERBATIM COPYING
<p>You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
</p>
<p>You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
</p>
</li><li> COPYING IN QUANTITY
<p>If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document&rsquo;s license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
</p>
<p>If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
</p>
<p>If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
</p>
<p>It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
</p>
</li><li> MODIFICATIONS
<p>You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
</p>
<ol class="enumerate" type="A" start="1">
<li> Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
</li><li> List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
</li><li> State on the Title page the name of the publisher of the
Modified Version, as the publisher.
</li><li> Preserve all the copyright notices of the Document.
</li><li> Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
</li><li> Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
</li><li> Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document&rsquo;s license notice.
</li><li> Include an unaltered copy of this License.
</li><li> Preserve the section Entitled &ldquo;History&rdquo;, Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled &ldquo;History&rdquo; in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
</li><li> Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the &ldquo;History&rdquo; section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
</li><li> For any section Entitled &ldquo;Acknowledgements&rdquo; or &ldquo;Dedications&rdquo;, Preserve
the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.
</li><li> Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
</li><li> Delete any section Entitled &ldquo;Endorsements&rdquo;. Such a section
may not be included in the Modified Version.
</li><li> Do not retitle any existing section to be Entitled &ldquo;Endorsements&rdquo; or
to conflict in title with any Invariant Section.
</li><li> Preserve any Warranty Disclaimers.
</li></ol>
<p>If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version&rsquo;s license notice.
These titles must be distinct from any other section titles.
</p>
<p>You may add a section Entitled &ldquo;Endorsements&rdquo;, provided it contains
nothing but endorsements of your Modified Version by various
parties&mdash;for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
</p>
<p>You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
</p>
<p>The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
</p>
</li><li> COMBINING DOCUMENTS
<p>You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
</p>
<p>The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
</p>
<p>In the combination, you must combine any sections Entitled &ldquo;History&rdquo;
in the various original documents, forming one section Entitled
&ldquo;History&rdquo;; likewise combine any sections Entitled &ldquo;Acknowledgements&rdquo;,
and any sections Entitled &ldquo;Dedications&rdquo;. You must delete all
sections Entitled &ldquo;Endorsements.&rdquo;
</p>
</li><li> COLLECTIONS OF DOCUMENTS
<p>You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
</p>
<p>You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
</p>
</li><li> AGGREGATION WITH INDEPENDENT WORKS
<p>A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an &ldquo;aggregate&rdquo; if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation&rsquo;s users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
</p>
<p>If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document&rsquo;s Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
</p>
</li><li> TRANSLATION
<p>Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
</p>
<p>If a section in the Document is Entitled &ldquo;Acknowledgements&rdquo;,
&ldquo;Dedications&rdquo;, or &ldquo;History&rdquo;, the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
</p>
</li><li> TERMINATION
<p>You may not copy, modify, sublicense, or distribute the Document except
as expressly provided for under this License. Any other attempt to
copy, modify, sublicense or distribute the Document is void, and will
automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
</p>
</li><li> FUTURE REVISIONS OF THIS LICENSE
<p>The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
<a class="uref" href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
</p>
<p>Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License &ldquo;or any later version&rdquo; applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
</p></li></ol>
<ul class="mini-toc">
<li><a href="#ADDENDUM_003a-How-to-use-this-License-for-your-documents">ADDENDUM: How to use this License for your documents</a></li>
</ul>
<div class="appendixsec-level-extent" id="ADDENDUM_003a-How-to-use-this-License-for-your-documents">
<h3 class="appendixsec"><span>B.1 ADDENDUM: How to use this License for your documents<a class="copiable-link" href="#ADDENDUM_003a-How-to-use-this-License-for-your-documents"> &para;</a></span></h3>
<p>To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
</p>
<div class="example smallexample">
<div class="group"><pre class="example-preformatted"> Copyright (C) <var class="var">year</var> <var class="var">your name</var>.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
</pre></div></div>
<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the &ldquo;with...Texts.&rdquo; line with this:
</p>
<div class="example smallexample">
<div class="group"><pre class="example-preformatted"> with the Invariant Sections being <var class="var">list their titles</var>, with
the Front-Cover Texts being <var class="var">list</var>, and with the Back-Cover Texts
being <var class="var">list</var>.
</pre></div></div>
<p>If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
</p>
<p>If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
</p>
<hr>
</div>
</div>
<div class="appendix-level-extent" id="GNU-General-Public-Licence">
<p class="nav-panel">
<span class="nav-button"><span class="nav-label">Previous: </span><span class="nav-link"><a href="#GNU-Free-Documentation-License" rel="prev">GNU Free Documentation License</a></span></span>, <span class="nav-button"><span class="nav-label">Up: </span><span class="nav-link"><a href="#Top" rel="up">Top</a></span></span><span class="nav-button"> &nbsp; </span></p>
<h2 class="appendix" id="GNU-General-Public-License"><span>Appendix C GNU General Public License<a class="copiable-link" href="#GNU-General-Public-License"> &para;</a></span></h2>
<div class="center">Version 2, June 1991
</div><a class="index-entry-id" id="index-GNU-General-Public-License"></a>
<div class="center">Version 2, June 1991
</div>
<div class="display">
<pre class="display-preformatted">Copyright &copy; 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre></div>
<h3 class="heading" id="Preamble"><span>Preamble<a class="copiable-link" href="#Preamble"> &para;</a></span></h3>
<p>The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software&mdash;to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation&rsquo;s software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
</p>
<p>When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
</p>
<p>To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
</p>
<p>For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
</p>
<p>We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
</p>
<p>Also, for each author&rsquo;s protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors&rsquo; reputations.
</p>
<p>Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone&rsquo;s free use or not licensed at all.
</p>
<p>The precise terms and conditions for copying, distribution and
modification follow.
</p>
<h3 class="heading" id="TERMS-AND-CONDITIONS-FOR-COPYING_002c-DISTRIBUTION-AND-MODIFICATION"><span>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION<a class="copiable-link" href="#TERMS-AND-CONDITIONS-FOR-COPYING_002c-DISTRIBUTION-AND-MODIFICATION"> &para;</a></span></h3>
<ol class="enumerate" start="0">
<li> This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The &ldquo;Program&rdquo;, below,
refers to any such program or work, and a &ldquo;work based on the Program&rdquo;
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term &ldquo;modification&rdquo;.) Each licensee is addressed as &ldquo;you&rdquo;.
<p>Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
</p>
</li><li> You may copy and distribute verbatim copies of the Program&rsquo;s
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
<p>You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
</p>
</li><li> You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
<ol class="enumerate" type="a" start="1">
<li> You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
</li><li> You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
</li><li> If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
</li></ol>
<p>These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
</p>
<p>Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
</p>
<p>In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
</p>
</li><li> You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
<ol class="enumerate" type="a" start="1">
<li> Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
</li><li> Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
</li><li> Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
</li></ol>
<p>The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
</p>
<p>If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
</p>
</li><li> You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
</li><li> You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
</li><li> Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients&rsquo; exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
</li><li> If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
<p>If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
</p>
<p>It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
</p>
<p>This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
</p>
</li><li> If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
</li><li> The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
<p>Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and &ldquo;any
later version&rdquo;, you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
</p>
</li><li> If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
</li><li> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
</li><li> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
</li></ol>
<h3 class="heading" id="Appendix_003a-How-to-Apply-These-Terms-to-Your-New-Programs"><span>Appendix: How to Apply These Terms to Your New Programs<a class="copiable-link" href="#Appendix_003a-How-to-Apply-These-Terms-to-Your-New-Programs"> &para;</a></span></h3>
<p>If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
</p>
<p>To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.
</p>
<div class="example smallexample">
<pre class="example-preformatted"><var class="var">one line to give the program's name and a brief idea of what it does.</var>
Copyright (C) <var class="var">yyyy</var> <var class="var">name of author</var>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
</pre></div>
<p>Also add information on how to contact you by electronic and paper mail.
</p>
<p>If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
</p>
<div class="example smallexample">
<pre class="example-preformatted">Gnomovision version 69, Copyright (C) <var class="var">year</var> <var class="var">name of author</var>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
</pre></div>
<p>The hypothetical commands &lsquo;<samp class="samp">show w</samp>&rsquo; and &lsquo;<samp class="samp">show c</samp>&rsquo; should show
the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than &lsquo;<samp class="samp">show w</samp>&rsquo; and
&lsquo;<samp class="samp">show c</samp>&rsquo;; they could even be mouse-clicks or menu items&mdash;whatever
suits your program.
</p>
<p>You should also get your employer (if you work as a programmer) or your
school, if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if
necessary. Here is a sample; alter the names:
</p>
<div class="example">
<pre class="example-preformatted">Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<var class="var">signature of Ty Coon</var>, 1 April 1989
Ty Coon, President of Vice
</pre></div>
<p>This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
</p>
</div>
</body>
</html>