ssip: Speech Synthesis and Sound Output Commands
4.1 Speech Synthesis and Sound Output
=====================================
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.
'SPEAK'
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 '.' (dot). Thus the complete character
sequence closing the input text is 'CR LF . CR LF'. If any line
within the sent text starts with a dot, an extra dot is prepended
before it.
During reception of the text message, Speech Server doesn't send
responses for the lines sent. The response line is sent only
immediately after the 'SPEAK' command and after receiving the
closing dot line.
The content of the message can be either a plain text or a SSML
(Speech Synthesis Markup Language) text. See 'SET SELF SSML_MODE'.
There is no guarantee that the SSML markup will be respected, so
the application shouldn'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 '<speak>' and end with
'</speak>'.
Speech Server can start speech synthesis as soon as a sufficient
amount of the text arrives; it generally needn't (but may) wait
until the end of data marker is received.
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.
The reply takes the form
225-msg_id
225 OK MESSAGE QUEUED
where MSG_ID is a unique id assigned to this message in Speech
Server. This is useful for the ⇒History Handling Commands
commands as well as for ⇒Message Events Notification and Index
Marking.
The 'SPEAK' command might be used for example in this way:
SPEAK
230 OK RECEIVING DATA
hi
.
225-21
225 OK MESSAGE QUEUED
'CHAR CHAR'
Speak letter CHAR. CHAR can be any character representable by the
UTF-8 encoding. The only exception is the character space (' ');
that can't be sent directly. In this case, a string 'space' must
be sent instead.
CHAR e
CHAR \
CHAR space
CHAR &
This command is intended to be used for speaking single letters,
e.g. when reading a character under cursor or when spelling words.
'KEY KEY-NAME'
Speak key identified by KEY-NAME. The command is intended to be
used for speaking keys pressed by the user.
KEY-NAME 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.
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 "invisible" characters), spaces, underscores, and double
quotes.
The recognized key names are:
* Any single UTF-8 character, excluding the exceptions defined
above.
* Any of the symbolic key names defined in ⇒Key Names.
Examples of valid key names:
a
A
shift_a
shift_A
รบ
$
enter
shift_kp-enter
control_alt_delete
control
'SOUND_ICON ICON-NAME'
Send a sound identified by ICON-NAME to the audio output.
ICON-NAME is a symbolic name of the given sound from the standard
set listed in ⇒Standard Sound Icons, or another name from
the particular Speech Server sound icon configuration.