android.speech.recognition.SrecGrammar Class Reference

Inheritance diagram for android.speech.recognition.SrecGrammar:

Inheritance graph
[legend]
Collaboration diagram for android.speech.recognition.SrecGrammar:

Collaboration graph
[legend]

List of all members.


Detailed Description

Grammar on an SREC recognizer.

Author:
Gili Tzabari, Marc Robitaille

Public Member Functions

virtual UAPI_EXPORT void addItem (const char *slotName, const SlotItemProxy &item, int weight, const char *semanticMeaning, ReturnCode::Type &returnCode)=0
virtual UAPI_EXPORT void addItemList (const char *slotName, SlotItemProxy **items, int *weights, const char **semanticMeanings, ARRAY_LIMIT itemsCount, ReturnCode::Type &returnCode)=0
virtual void compileAllSlots (ReturnCode::Type &returnCode)=0
virtual void resetAllSlots (ReturnCode::Type &returnCode)=0
virtual void save (const char *path, ReturnCode::Type &returnCode)=0
virtual void load (ReturnCode::Type &returnCode)=0
virtual void unload (ReturnCode::Type &returnCode)=0

Protected Member Functions

UAPI_EXPORT SrecGrammar ()
virtual UAPI_EXPORT ~SrecGrammar ()

Friends

class SrecGrammarProxy
class EmbeddedGrammarProxy
class GrammarProxy

Constructor & Destructor Documentation

UAPI_EXPORT android.speech.recognition.SrecGrammar.SrecGrammar (  )  [protected]

Prevent construction.

virtual UAPI_EXPORT android.speech.recognition.SrecGrammar.~SrecGrammar (  )  [protected, virtual]

Prevent destruction.


Member Function Documentation

virtual UAPI_EXPORT void android.speech.recognition.SrecGrammar.addItem ( const char *  slotName,
const SlotItemProxy &  item,
int  weight,
const char *  semanticMeaning,
ReturnCode::Type returnCode 
) [pure virtual]

Adds an item to a slot.

Parameters:
slotName the name of the slot
item the item to add to the slot.
weight the weight of the item. Smaller values are more likely to get recognized. This should be >= 0.
semanticMeaning the value that will be returned if this item is recognized. This should be of the form "V='Jen_Parker'"
returnCode ILLEGAL_ARGUMENT if slotName, item or semanticMeaning are null or if semanticMeaning is not in the form "key=value". ILLEGAL_STATE if the associated recognizer has been deleted. HOMONYM_COLLISION if another item with the same pronunciation already exists in the slot.

virtual UAPI_EXPORT void android.speech.recognition.SrecGrammar.addItemList ( const char *  slotName,
SlotItemProxy **  items,
int *  weights,
const char **  semanticMeanings,
ARRAY_LIMIT  itemsCount,
ReturnCode::Type returnCode 
) [pure virtual]

Add a list of item to a slot.

Parameters:
slotName the name of the slot
items the array of SlotItems to add to the slot.
weights the array of weights for each item in the list. Smaller values are more likely to get recognized. This should be >= 0.
semanticMeanings the array of strings that will be returned for each item during recognition.
itemsCount number of items in the list
Exceptions:
IllegalArgumentException if slotName, items, weights or semanticMeanings are null;if any semanticMeaning of the list is not of the format "V='Jen_Parker' if the size of list parameters is not equal."

virtual void android.speech.recognition.EmbeddedGrammar.compileAllSlots ( ReturnCode::Type returnCode  )  [pure virtual, inherited]

Compiles items that were added to any of the grammar slots.

Parameters:
returnCode ILLEGAL_ARGUMENT if the associated recognizer has been deleted

virtual void android.speech.recognition.EmbeddedGrammar.resetAllSlots ( ReturnCode::Type returnCode  )  [pure virtual, inherited]

Removes all words added to all slots.

Parameters:
returnCode ILLEGAL_ARGUMENT if the associated recognizer has been deleted

virtual void android.speech.recognition.EmbeddedGrammar.save ( const char *  path,
ReturnCode::Type returnCode 
) [pure virtual, inherited]

Saves the compiled grammar.

Parameters:
path the path to save the grammar to
returnCode ILLEGAL_ARGUMENT if the associated recognizer has been deleted

virtual void android.speech.recognition.Grammar.load ( ReturnCode::Type returnCode  )  [pure virtual, inherited]

Indicates that the grammar will be used in the near future.

Parameters:
returnCode ILLEGAL_ARGUMENT if the associated recognizer has been deleted

virtual void android.speech.recognition.Grammar.unload ( ReturnCode::Type returnCode  )  [pure virtual, inherited]

Indicates that the grammar won't be used in the near future.

Parameters:
returnCode ILLEGAL_ARGUMENT if the associated recognizer has been deleted


Generated on Thu May 1 17:16:52 2008 for UAPI by  doxygen 1.5.3