SpeechControl

Stops, pauses, or resumes some text that is speaking aynchronously.

Synopsis

error = SpeechControl(voice,operation)

Args

voice is the voice parameter that was returned by SpeechOpen().

operation is one of the following:

Operation Meaning
'S' (S)top playback
'P' (P)ause playback
'TYPE' The format (ie, 0, 1, or 2)
'R' (R)esume previously paused playback

If omitted, operation defaults to 'S'.

Returns

If success, an empty string is returned (""). If an error, an error message is returned.

Notes

If you pass a voice that was already closed, then SpeechClose() does nothing.

If you omit voice, or pass an empty string, a SYNTAX condition is raised. CONDITION('E') returns error number 40.5 and CONDITION('D') returns the message Missing argument in invocation of "SpeechControl"; argument 1 is required.

In order for SpeechControl to have any effect, you must have specified the 'A' flag when calling SpeechSpeak().

Examples

/* Stop playback */
error = SpeechControl(voice)
IF error \== "" THEN SAY 'Error:' error

/* Pause playback */
error = SpeechControl(voice, 'P')
IF error \== "" THEN SAY 'Error:' error