|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object devs.speechpackage.DialogManager
public class DialogManager
The DialogManager is a component that is used to manage speech dialogs. A speech dialog is represented as a graph of dialog nodes. The dialog manager maintains an active node. When a node is active it is directing the recognition process. Typically a dialog node will define the current active grammar. The recognition result is typically used to direct the dialog manager to select the next active node. An application can easily customize the behavior at each active node.
Nested Class Summary | |
---|---|
(package private) class |
DialogManager.DialogNode
Represents a node in the dialog |
Field Summary | |
---|---|
static java.lang.String |
PROP_JSGF_GRAMMAR
Sphinx property that defines the name of the grammar component to be used by this dialog manager |
static java.lang.String |
PROP_MICROPHONE
Sphinx property that defines the name of the microphone to be used by this dialog manager |
static java.lang.String |
PROP_RECOGNIZER
Sphinx property that defines the name of the recognizer to be used by this dialog manager |
Constructor Summary | |
---|---|
DialogManager()
|
Method Summary | |
---|---|
void |
addNode(java.lang.String name,
DialogNodeBehavior behavior)
Adds a new node to the dialog manager. |
void |
allocate()
Gets the recognizer and the dialog nodes ready to run |
void |
deallocate()
Releases all resources allocated by the dialog manager |
java.lang.String |
getName()
Returns the name of this component |
edu.cmu.sphinx.recognizer.Recognizer |
getRecognizer()
|
void |
go()
Invokes the dialog manager. |
void |
newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
|
void |
register(java.lang.String name,
edu.cmu.sphinx.util.props.Registry registry)
|
void |
setInitialNode(java.lang.String name)
Sets the name of the initial node for the dialog manager |
void |
setRecognizer(edu.cmu.sphinx.recognizer.Recognizer recognizer)
Sets the recognizer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_JSGF_GRAMMAR
public static final java.lang.String PROP_MICROPHONE
public static final java.lang.String PROP_RECOGNIZER
Constructor Detail |
---|
public DialogManager()
Method Detail |
---|
public void register(java.lang.String name, edu.cmu.sphinx.util.props.Registry registry) throws edu.cmu.sphinx.util.props.PropertyException
register
in interface edu.cmu.sphinx.util.props.Configurable
edu.cmu.sphinx.util.props.PropertyException
public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps) throws edu.cmu.sphinx.util.props.PropertyException
newProperties
in interface edu.cmu.sphinx.util.props.Configurable
edu.cmu.sphinx.util.props.PropertyException
public void addNode(java.lang.String name, DialogNodeBehavior behavior)
name
- the name of the nodebehavior
- the application specified behavior for the nodepublic void setInitialNode(java.lang.String name)
name
- the name of the initial node. Must be the name of a
previously added dialog node.public void allocate() throws java.io.IOException
java.io.IOException
- if an error occurs while allocating the
recognizer.public void deallocate()
public void go()
public java.lang.String getName()
getName
in interface edu.cmu.sphinx.util.props.Configurable
public edu.cmu.sphinx.recognizer.Recognizer getRecognizer()
public void setRecognizer(edu.cmu.sphinx.recognizer.Recognizer recognizer)
recognizer
- the recognizer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |