public class SpeechRecognizeCommand extends AbstractAgiCommand
Recognizes speech.
| Constructor and Description |
|---|
SpeechRecognizeCommand(String prompt,
int timeout)
Creates a new SpeechRecognizeCommand that plays the given prompt and listens for speech and dtmf.
|
SpeechRecognizeCommand(String prompt,
int timeout,
int offset)
Creates a new SpeechRecognizeCommand that plays the given prompt and listens for for speech and dtmf.
|
| Modifier and Type | Method and Description |
|---|---|
String |
buildCommand()
Returns a string suitable to be sent to asterisk.
|
int |
getOffset()
Returns the offset samples to skip when playing the prompt.
|
String |
getPrompt()
Returns the prompt to play.
|
int |
getTimeout()
Returns the maximum recognition time in milliseconds.
|
void |
setOffset(int offset)
Sets the offset samples to skip when playing the prompt.
|
void |
setPrompt(String prompt)
Sets the prompt to play.
|
void |
setTimeout(int timeout)
Sets the maximum recognition time in milliseconds.
|
escapeAndQuote, escapeAndQuote, setAsteriskVersion, toStringpublic SpeechRecognizeCommand(String prompt, int timeout)
prompt - the prompt to play.timeout - the maximum recognition time in milliseconds.public SpeechRecognizeCommand(String prompt, int timeout, int offset)
prompt - the prompt to play.timeout - the maximum recognition time in milliseconds.offset - the offset samples to skip when playing the prompt.public String getPrompt()
public void setPrompt(String prompt)
prompt - the prompt to play.public int getTimeout()
public void setTimeout(int timeout)
timeout - the maximum recognition time in milliseconds, or -1 for no timeout.public int getOffset()
public void setOffset(int offset)
offset - the offset samples to skip when playing the prompt.public String buildCommand()
AgiCommandbuildCommand in interface AgiCommandbuildCommand in class AbstractAgiCommandCopyright © 2004–2022. All rights reserved.