|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--speech.Listen
The startup interaction between viaVoice's speech recognition and synthesis is buggy. Don't change things involving these below in the class's constructor.
Field Summary | |
static int |
ASLEEP
|
static int |
AWAKE
|
static int |
SLEEP
|
Method Summary | |
void |
activate(javax.speech.recognition.RuleGrammar g)
These are the methods for activating and deactivating individual grammars and their rules. |
void |
activate(javax.speech.recognition.RuleGrammar g,
String ruleName)
|
void |
addDictationListener(javax.speech.recognition.ResultListener rListener)
Registers listener as a listener for dictation events. |
javax.speech.recognition.RuleGrammar |
addGrammar(String filename)
Try to avoid using this filename mechanism to load grammars because gramars loaded this way don't really support the JSGF import mechanism. |
javax.speech.recognition.RuleGrammar |
addGrammar(URL base,
String grammarName)
Load up and add a grammar to the pool of grammars. |
void |
addSpeechStateListener(SpeechStateListener sListener)
|
void |
commitChanges()
When done mucking about, commit changes. |
void |
deactivate(javax.speech.recognition.RuleGrammar g)
|
void |
deactivate(javax.speech.recognition.RuleGrammar g,
String ruleName)
|
Vector |
getActiveGrammarNames()
|
Vector |
getActiveRules(javax.speech.recognition.RuleGrammar ruleG)
|
boolean |
getDaydreamMode()
Gets whether or not we are daydreaming. |
String |
getDictation()
Get a dictation string out of us. |
boolean |
getDictationMode()
Indicates whether Listen is always listening to dictation. |
static Listen |
getListen()
Call this to get the single static object that everything shares. |
static Listen |
getListen(TalkNSing talker)
Call this to get the single static object that everything shares. |
Vector |
getPublicRules(javax.speech.recognition.RuleGrammar ruleG)
|
AckSounds |
getTalker()
|
static boolean |
isListen()
True if Listen has been initialized. |
javax.speech.recognition.RuleGrammar |
loadJSGF(URL base,
String grammarName)
|
static void |
main(String[] args)
|
void |
pauseRecognizer()
|
String |
processString(String sText)
Process a text string against all active grammars |
String |
processString(String sText,
boolean bPlayAcknowledgement)
Process a text string against all active grammars |
void |
removeDictationListener(javax.speech.recognition.ResultListener rListener)
Unregisters listener as a listener for dictation events. |
void |
requestGoToSleep()
This is the public version of goToSleep. |
void |
requestWakeUp()
|
void |
requestWakeUp(boolean playattention)
Public wakeUp method to programatically wake up the system. |
void |
resumeRecognizer()
|
void |
setDaydreamMode(boolean b)
Sets the speech system into daydream mode. |
void |
setDictationMode(boolean alwaysDictate)
Use this to indicate whether dictation should always be on. |
void |
setTalker(Say talker)
|
void |
setTalker(TalkNSing talker)
Set what plays our noises and says our sayings., |
static Listen |
setupLinked()
Make listen use local speech out resources to talk back. |
boolean |
sleeping()
Are we in our sleeping state? |
int |
sleepingState()
|
void |
startChanges()
When starting a series of changes, call this to make sure recognizer is suspended. |
void |
stayAwake()
Make sure the system doesn't go to sleep until further notice. |
void |
updateGCListenerState()
|
void |
updateGCListenerVolume(float fVolume)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SLEEP
public static final int ASLEEP
public static final int AWAKE
Method Detail |
public static boolean isListen()
public static Listen getListen(TalkNSing talker)
public static Listen getListen()
public static Listen setupLinked()
public void setTalker(Say talker)
public AckSounds getTalker()
public void setTalker(TalkNSing talker)
public void pauseRecognizer()
public void resumeRecognizer()
public Vector getPublicRules(javax.speech.recognition.RuleGrammar ruleG)
public Vector getActiveRules(javax.speech.recognition.RuleGrammar ruleG)
public void requestGoToSleep()
public void requestWakeUp(boolean playattention)
public void requestWakeUp()
public void stayAwake()
public int sleepingState()
public boolean sleeping()
public void activate(javax.speech.recognition.RuleGrammar g)
public void activate(javax.speech.recognition.RuleGrammar g, String ruleName)
public void deactivate(javax.speech.recognition.RuleGrammar g)
public void deactivate(javax.speech.recognition.RuleGrammar g, String ruleName)
public javax.speech.recognition.RuleGrammar addGrammar(URL base, String grammarName)
public javax.speech.recognition.RuleGrammar loadJSGF(URL base, String grammarName) throws IOException, javax.speech.recognition.GrammarException, MalformedURLException
public javax.speech.recognition.RuleGrammar addGrammar(String filename)
filename
- a String
valueRuleGrammar
valuepublic String processString(String sText)
text
- a String
valueString
valuepublic String processString(String sText, boolean bPlayAcknowledgement)
sText
- a String
valuebPlayAcknowledgement
- a boolean
valueString
valuepublic void startChanges()
public void commitChanges()
public String getDictation()
public Vector getActiveGrammarNames()
public static void main(String[] args)
public void setDictationMode(boolean alwaysDictate)
getDictation()
can still be used.alwaysDictate
- if true
, always listen to dictation
in addition to rule grammars.public boolean getDictationMode()
Listen
is always listening to dictation.true
, always listens to dictation.public void addDictationListener(javax.speech.recognition.ResultListener rListener)
listener
as a listener for dictation events.listener
- a ResultListener
public void removeDictationListener(javax.speech.recognition.ResultListener rListener)
listener
as a listener for dictation events.rListener
- a ResultListener
valuepublic void setDaydreamMode(boolean b)
b
- a boolean
valuepublic boolean getDaydreamMode()
boolean
valuesetDaydreamMode(boolean)
public void addSpeechStateListener(SpeechStateListener sListener)
public void updateGCListenerState()
public void updateGCListenerVolume(float fVolume)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |