|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object socket.SpeechHandler
public class SpeechHandler
The method startupRecognitionServer runs the external "recserver" command.
Nested Class Summary | |
---|---|
class |
SpeechHandler.RunnableRecognition
When running this thread: the client connects to the regserver. |
Field Summary | |
---|---|
(package private) java.lang.String[] |
backupPromptPath
|
private CalendarConfiguration |
calendarConf
|
private static boolean |
computeXCPUTime
|
private Language |
currentLanguage
|
private java.lang.String |
currentRecognitionPackage
|
private java.lang.String |
grammar
|
private java.lang.String |
lastWavFileRecorded
|
private boolean |
lastWavFileRetrieved
|
private java.lang.String |
logDirectory
|
private static java.util.logging.Logger |
logger
|
private net.sf.regulus.NBestRegResult |
nbestRegResult
|
private java.lang.String |
promptPrefix
|
private java.lang.Process |
recServerProcess
|
private static net.sf.regulus.RegClient |
regClient
|
private java.lang.Process |
ttsProcess
|
Constructor Summary | |
---|---|
SpeechHandler(CalendarConfiguration calendarConf,
ApplicationState appState)
Constructor |
Method Summary | |
---|---|
void |
abortPlayback()
|
void |
abortRecognition()
Abort an ongoing recognition |
java.lang.String |
getLastWavFileRecorded()
|
net.sf.regulus.NBestRegResult |
getNbestRegResult()
|
int |
getParamWriteWaveForms()
|
java.lang.String |
getPrimaryGrammar()
Gets the primaryGrammar used in recognition |
net.sf.regulus.RegClient |
getRegClient()
|
void |
playback(java.lang.String playback_string)
|
java.lang.String |
recognizeFile(java.lang.String file,
java.lang.String grammar)
|
protected void |
reconfigure(ApplicationState newAppState)
|
void |
sendMsgToRegServer(java.lang.String msg)
|
void |
setComputeCPUTimeEnabled(boolean enabled)
|
boolean |
setParam(java.lang.String param,
java.lang.String value)
|
void |
setWaitDialogMessage(int progress,
java.lang.String message)
|
boolean |
shutdown()
|
private void |
shutdownPlayback()
stops any TTS processes running |
private void |
shutdownRecognition()
|
net.sf.regulus.NBestRegResult |
startRecognition()
Start a recognition request in a new thread and |
void |
startup()
|
private void |
startupRecognition()
Starts recognition server and client |
private void |
startupRecognitionServer()
This simply runs the external "recserver" command |
private void |
startupRegServer()
Invoke Regserver with GLM |
private void |
startupVocalizer()
Run vocaliser with tts parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger logger
private final CalendarConfiguration calendarConf
private Language currentLanguage
private static net.sf.regulus.RegClient regClient
private java.lang.Process recServerProcess
private java.lang.Process ttsProcess
private java.lang.String promptPrefix
private java.lang.String grammar
private java.lang.String currentRecognitionPackage
private java.lang.String lastWavFileRecorded
private java.lang.String logDirectory
private boolean lastWavFileRetrieved
private static boolean computeXCPUTime
java.lang.String[] backupPromptPath
private net.sf.regulus.NBestRegResult nbestRegResult
Constructor Detail |
---|
public SpeechHandler(CalendarConfiguration calendarConf, ApplicationState appState)
calendarRootComponent
- calendarConf
- appState
- Method Detail |
---|
public net.sf.regulus.NBestRegResult getNbestRegResult()
public void startup() throws java.lang.Exception
java.lang.Exception
private void startupVocalizer()
private void shutdownPlayback()
public boolean shutdown()
private void startupRegServer() throws java.lang.Exception
java.lang.Exception
private void startupRecognitionServer() throws java.lang.Exception
java.lang.Exception
private void startupRecognition() throws java.lang.Exception
FatalException
NuanceConfigException
java.lang.Exception
public net.sf.regulus.NBestRegResult startRecognition()
public void abortRecognition()
public java.lang.String getPrimaryGrammar()
private void shutdownRecognition()
protected void reconfigure(ApplicationState newAppState) throws java.lang.Exception
newAppState
-
java.lang.Exception
public void playback(java.lang.String playback_string) throws java.lang.Exception
string
-
java.lang.Exception
public void abortPlayback()
public java.lang.String getLastWavFileRecorded()
public int getParamWriteWaveForms()
public boolean setParam(java.lang.String param, java.lang.String value)
public void setWaitDialogMessage(int progress, java.lang.String message)
public void setComputeCPUTimeEnabled(boolean enabled)
b
- public void sendMsgToRegServer(java.lang.String msg) throws java.lang.Exception
java.lang.Exception
public net.sf.regulus.RegClient getRegClient()
public java.lang.String recognizeFile(java.lang.String file, java.lang.String grammar) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |