public class AndroidSpeechRecognition extends AbstractSpeechRecognizer
Modifier and Type | Class and Description |
---|---|
class |
AndroidSpeechRecognition.Command |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
lastThingRecognized |
static org.slf4j.Logger |
log |
int |
port |
boolean |
runningserver |
cfgDir, dnaPool, MESSAGE_RECORDING_FORMAT_BINARY, MESSAGE_RECORDING_FORMAT_XML
Constructor and Description |
---|
AndroidSpeechRecognition(java.lang.String n) |
Modifier and Type | Method and Description |
---|---|
void |
addCommand(java.lang.String actionPhrase,
java.lang.String name,
java.lang.String method,
java.lang.Object... params) |
void |
addMouth(SpeechSynthesis mouth)
This method should listen for
Mouth events
FIXME - should be deprecated - use Attach Pattern !
|
void |
addTextListener(TextListener service) |
void |
clearLock()
This will unlock lockOutAllGrammarExcept(lockPhrase)
|
boolean |
getAutoListen() |
java.lang.String |
getClientAddress() |
static ServiceType |
getMetaData()
This static method returns all the details of the class without it having
to be constructed.
|
java.lang.String |
getServerAddress() |
boolean |
isListening()
track the state of listening process
|
void |
listeningEvent(java.lang.Boolean event)
Event is sent when the listening Service is actually listening or not.
|
void |
lockOutAllGrammarExcept(java.lang.String lockPhrase)
The ear service will not listen anymore
until the magical keyword "lockPhrase" said
or clearLock() method called
|
static void |
main(java.lang.String[] args) |
void |
onEndSpeaking(java.lang.String utterance) |
void |
onStartSpeaking(java.lang.String utterance) |
void |
pauseListening()
method to suppress recognition listening events This is important when a
Speech Recognizer is listening --> then Speaking, typically you don't want
the STT to listen to its own speech, it causes a feedback loop and with STT
not really very accurate, it leads to weirdness -- additionally it does not
recreate the speech processor - so its not as heavy handed
|
java.lang.String |
publishText(java.lang.String text) |
java.lang.String |
recognized(java.lang.String text) |
void |
resumeListening() |
void |
setAutoListen(boolean autoListen)
If setAutoListen is True, webkitspeech red microphone will auto rearm.
|
void |
setContinuous(boolean b) |
void |
setPort(int p) |
void |
startListening() |
void |
startRecognition()
Deprecated.
|
void |
startServer() |
void |
startService() |
void |
stopListening() |
void |
stopServer() |
void |
stopService()
Stops the service.
|
attach
addListener, addListener, addTask, addTask, addTask, addTaskOneShot, allowDisplay, allowDisplay, attach, broadcastState, buildDna, buildDna, buildDnaKeys, buildDnaNames, clearLastError, close, containsTask, copyShallowFrom, createPeer, createPeer, createRootReserved, detach, detach, detach, echoHeartbeat, error, error, error, getAttached, getCfgDir, getComm, getDeclaredMethodNames, getDeclaredMethods, getDescription, getDna, getDnaString, getHostName, getInbox, getInstanceId, getIntanceName, getInterfaceSet, getLastError, getMessageSet, getMetaData, getMethodMap, getMethodNames, getMethods, getMethodToolTip, getMsg, getName, getNotifyList, getNotifyListKeySet, getOutbox, getPeerKey, getPeerName, getServiceResourceFile, getSimpleName, getTasks, getThisThread, getType, hasError, hasPeers, help, help, in, info, info, invoke, invoke, invoke, invokeOn, isAttached, isAttached, isLocal, isReady, isRunning, isRuntime, isVirtual, load, load, logTimeEnable, mergeDna, mergeDna, mergePeerDna, movePeerDna, out, out, preProcessHook, preRoutingHook, publishError, publishQueueStats, publishState, publishStats, publishStatus, purgeTask, purgeTasks, releasePeers, releaseService, removeAllListeners, removeListener, requiresSecurity, reserve, reserve, reserveRoot, reserveRoot, reserveRootAs, run, save, save, save, send, send, send, send, sendBlocking, sendBlocking, sendBlocking, sendBlocking, sendPeer, setInstanceId, setName, setPeer, setSecurityProvider, setState, setThisThread, setVirtual, sleep, stackToString, startHeartbeat, startPeer, startPeer, startRecording, stopHeartbeat, stopMsgRecording, subscribe, subscribe, subscribe, toString, unsubscribe, unsubscribe, unsubscribe, updateStats, warn, warn
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getName
public boolean runningserver
public int port
public java.lang.String lastThingRecognized
public static final org.slf4j.Logger log
public static void main(java.lang.String[] args) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.String publishText(java.lang.String text)
public void addTextListener(TextListener service)
public java.lang.String recognized(java.lang.String text)
public void setPort(int p)
public java.lang.String getClientAddress()
public java.lang.String getServerAddress()
public void startListening()
@Deprecated public void startRecognition()
public void startServer()
public void stopServer()
public void startService()
startService
in interface ServiceInterface
startService
in class Service
public void stopService()
Service
stopService
in interface ServiceInterface
stopService
in class Service
public static ServiceType getMetaData()
public void listeningEvent(java.lang.Boolean event)
SpeechRecognizer
public void resumeListening()
public void stopListening()
public void addMouth(SpeechSynthesis mouth)
SpeechRecognizer
public void onStartSpeaking(java.lang.String utterance)
public void onEndSpeaking(java.lang.String utterance)
public void lockOutAllGrammarExcept(java.lang.String lockPhrase)
SpeechRecognizer
public void clearLock()
SpeechRecognizer
public void pauseListening()
SpeechRecognizer
public void setAutoListen(boolean autoListen)
SpeechRecognizer
public void setContinuous(boolean b)
public boolean isListening()
SpeechRecognizer
public boolean getAutoListen()
public void addCommand(java.lang.String actionPhrase, java.lang.String name, java.lang.String method, java.lang.Object... params)