Appendix C: Speech-Queuing Interface Prototypes


AUDIT_clear

Parameters
void AUDIT_clear (void)
none
Return Codes
none
Functionality
Deletes entire Audit trail.

AUDIT_retrieve

Parameters
void AUDIT_retrieve (char *auditstr)
Pointer for the last text item in audit trail
Return Codes
none
Functionality
Returns a pointer to the last item stored in the audit trail, then deletes that item from the audit trail.

SPEECH_add

Parameters
BOOL SPEECH_add(char *pText)
Text to be spoken
Return Codes
TRUE - text successfully added to queue
FALSE - Unable to add text to queue
There is no text to add.
Speech is turned off and this is not a priority item.
An error occurred while allocating memory
Functionality
SPEECH_add This will add the text item to the queue, with the parameters set up by SPEECH_priority .
If the current class being spoken is the same as the class to be added and there is nothing in the queue, then the current message being spoken will be terminated and the item to be added to the queue will be spoken immediately.
All text added to the queue through SPEECH_add will be added to the audit trail.

SPEECH_empty

Parameters
BOOL SPEECH_empty (void)
None
Return Codes
TRUE
- the speech queue is empty
FALSE
- the speech queue is not empty
Functionality
Determines whether or not the speech queue has text remaining in the queue to be spoken.

SPEECH_flush

Parameters
void SPEECH_flush (BOOL justemptyQ)
With justemptyQ being TRUE only the queue is cleared
With justemptyQ being FALSE the queue is cleared and the synthesizer is signalled to stop speaking immediately.
Return Codes
none
Functionality
Empties the speech queue, and may stops the synthesizer from speaking

SPEECH_NA_add

Parameters
BOOL SPEECH_NA_add(char *pText)
Text to be spoken
Return Codes
TRUE - text successfully added to queue
FALSE - Unable to add text to queue
There is no text to add.
Speech is turned off and this is not a priority item.
An error occurred while allocating memory
Functionality
Same as SPEECH_add except the text won't be added to the audit trail

SPEECH_next

Parameters
BOOL SPEECH_next (void)
none
Return Codes
Returns whether or not the voice synthesizer was currently speaking.
Functionality
Stops the synthesizer from speaking and then speaks the next item in the queue.

SPEECH_pause

Parameters
void SPEECH_pause (BOOL flag)
If flag is TRUE speech is paused
If flag is FALSE speech is resumed.
Return Codes
none
Functionality
Pauses speech depending upon the flag. When speech is resumed, SPEECH_next is automatically called

SPEECH_priority

Parameters
void SPEECH_priority(BOOL newclass, BOOL priority, BOOL pauseafter, int nVoice,
BOOL spell, char cclass, char subclass)
Newclass - is this a new class of text, otherwise use previous class.
Priority item
Should the voice synthesizer pause after this text has been spoken
The voice the synthesizer will use to speak this text
Should the voice synthesizer spell out the text?
The class of the text.
The subclass within the class of text to be spoken.
Return Codes
none
Functionality
Sets the parameters of the next text item that will be added to the queue.

SPEECH_skip

Parameters
void SPEECH_skip (BOOL shutup)
Stop the synthesizer from speaking immediately
Return Codes
none
Functionality
This routine may terminate the current message being spoken. The current message being spoken has associated with it a subclass, if the next thing in the queue to be spoken has the same subclass it will be removed from the queue. This will continue until either the next subclass in the queue is different from the subclass that was skipped or a new class is at the head of the queue. At which time the current item at the head of the queue will be spoken.

SPEECH_speaking

Parameters
BOOL SPEECH_speaking (void)
None
Return Codes
TRUE
- the voice synthesizer is currently speaking
FALSE
- the speech synthesizer is not currently speaking
Functionality
Determines whether or not the synthesizer is currently speaking.

WhatWasThat

Parameters
void WhatWasThat(void)
none
Return Codes
none
Functionality
Speaks the last message that was spoken. If this routine is called four times in a row, the message is spelled out to the user.

Next Previous Table of Contents