osVoiceMaskDictionary osVoiceMaskDictionary (function)

Mask words registered in the voice recognition system


#include <ultra64.h> /* ultra64.h */
s32 osVoiceMaskDictionary(OSVoiceHandle *hd, u8 *maskpattern, int size);


The osVoiceMaskDictionary function is for masking words registered in the voice recognition system. It can selecting words from those registered in the dictionary which are to be recognized and which are not to be recognized.

hd is the Voice Recognition System control structure. The Voice Recognition System must be initialized with the osVoiceInit function before the osVoiceMaskDictionary function is called. Specify the word mask pattern in maskpattern. The mask data for all words are enumerated in maskpattern. The number of bytes in maskpattern is specified in size.

In the mask data, one byte equals one word. A zero (0) indicates to mask (do not recognize a word) and a one (1) indicates not to mask (recognize a word).The word number (the number assigned the registered words in the order that they were registered) sequence in the mask data corresponds with the LSB to MSB sequence. In other words, bit 0 of the first byte corresponds with word No. 0, while bit 7 corresponds with word No. 7. If the number of words is not a multiple of 8, put zeros (0) in the remaining most significant bits of the last byte of the mask data.

If the osVoiceMaskDictionary function has not been called, all of the words are unmasked.

The returned value is an error code. A 0 (zero) is returned when processing ends normally. If an error occurs, this function has the following error codes.


Nothing is connected to the controller port.


Something other than the Voice Recognition System is connected to the controller port.


There was no response from the Voice Recognition System. There may be a problem with the hardware.


There was a data transmission failure. There is a problem in the Voice Recognition System connection.


There is an error in the function call method or in the argument. This error will not occur if the function is being used correctly.

See also

osVoiceCheckWord, osVoiceClearDictionary, osVoiceControlGain, osVoiceCountSyllables, osVoiceGetReadData, osVoiceInit, osVoiceSetWord, osVoiceStartReadData, and osVoiceStopReadData

Revision History

1999/04/30 Changed Format