speech-dispatcher: Speech output control commands in C
4.1.3 Speech Output Control Commands
------------------------------------
Stop Commands
.............
-- C API function: int spd_stop(SPDConnection* connection);
Stops the message currently being spoken on a given connection. If
there is no message being spoken, does nothing. (It doesn't touch
the messages waiting in queues). This is intended for stops
executed by the user, not for automatic stops (because
automatically you can't control how many messages are still waiting
in queues on the server).
'connection' is the SPDConnection* connection created by
spd_open().
It returns 0 on success, -1 otherwise.
-- C API function: int spd_stop_all(SPDConnection* connection);
The same as spd_stop(), but it stops every message being said,
without distinguishing where it came from.
It returns 0 on success, -1 if some of the stops failed.
-- C API function: int spd_stop_uid(SPDConnection* connection, int
target_uid);
The same as spd_stop() except that it stops a client client
different from the calling one. You must specify this client in
'target_uid'.
'target_uid' is the unique ID of the connection you want to execute
stop() on. It can be obtained from spd_history_get_client_list().
History Commands in C.
It returns 0 on success, -1 otherwise.
Cancel Commands
...............
-- C API function: int spd_cancel(SPDConnection* connection);
Stops the currently spoken message from this connection (if there
is any) and discards all the queued messages from this connection.
This is probably what you want to do, when you call spd_cancel()
automatically in your program.
-- C API function: int spd_cancel_all(SPDConnection* connection);
The same as spd_cancel(), but it cancels every message without
distinguishing where it came from.
It returns 0 on success, -1 if some of the stops failed.
-- C API function: int spd_cancel_uid(SPDConnection* connection, int
target_uid);
The same as spd_cancel() except that it executes cancel for some
other client than the calling one. You must specify this client in
'target_uid'.
'target_uid' is the unique ID of the connection you want to execute
cancel() on. It can be obtained from
spd_history_get_client_list(). History Commands in C.
It returns 0 on success, -1 otherwise.
Pause Commands
..............
-- C API function: int spd_pause(SPDConnection* connection);
Pauses all messages received from the given connection. No
messages except for priority 'notification' and 'progress' are
thrown away, they are all waiting in a separate queue for resume().
Upon resume(), the message that was being said at the moment
pause() was received will be continued from the place where it was
paused.
It returns immediately. However, that doesn't mean that the speech
output will stop immediately. Instead, it can continue speaking
the message for a while until a place where the position in the
text can be determined exactly is reached. This is necessary to be
able to provide 'resume' without gaps and overlapping.
When pause is on for the given client, all newly received messages
are also queued and waiting for resume().
It returns 0 on success, -1 if something failed.
-- C API function: int spd_pause_all(SPDConnection* connection);
The same as spd_pause(), but it pauses every message, without
distinguishing where it came from.
It returns 0 on success, -1 if some of the pauses failed.
-- C API function: int spd_pause_uid(SPDConnection* connection, int
target_uid);
The same as spd_pause() except that it executes pause for a client
different from the calling one. You must specify the client in
'target_uid'.
'target_uid' is the unique ID of the connection you want to pause.
It can be obtained from spd_history_get_client_list().
History Commands in C.
It returns 0 on success, -1 otherwise.
Resume Commands
...............
-- C API function: int spd_resume(SPDConnection* connection);
Resumes all paused messages from the given connection. The rest of
the message that was being said at the moment pause() was received
will be said and all the other messages are queued for synthesis
again.
'connection' is the SPDConnection* connection created by
spd_open().
It returns 0 on success, -1 otherwise.
-- C API function: int spd_resume_all(SPDConnection* connection);
The same as spd_resume(), but it resumes every paused message,
without distinguishing where it came from.
It returns 0 on success, -1 if some of the pauses failed.
-- C API function: int spd_resume_uid(SPDConnection* connection, int
target_uid);
The same as spd_resume() except that it executes resume for a
client different from the calling one. You must specify the client
in 'target_uid'.
'target_uid' is the unique ID of the connection you want to resume.
It can be obtained from spd_history_get_client_list().
History Commands in C.
It returns 0 on success, -1 otherwise.