|
|
| string SpeechScript.makeCall(string
number) |
|
Make an outbound call to a number. This command can only be used
as the first command in an outbound dialing script. Returns "busy" if the
number was busy. You can't call makeCall more than once in a script, even if it
returned "busy". |
| void SpeechScript.dial(string DTMF_string) |
|
Dial a DTMF digit string. This command can only be used once a
call is established. |
| string SpeechScript.listen(string phrases) |
|
Listen to the caller using ASR. phrases: bar separated list of
phrases that can be recognized. Ex: "one|two|three". This function will return
the recognized phrase or "undefined" if not recognized or on silence. |
| string
SpeechScript.promptAndListen(string prompt, string phrases) |
|
Same as "listen", but with TTS prompt string. prompt: TTS
text to be played before the ASR is activated. |
| string
SpeechScript.promptAndListenNumber(string prompt) |
|
Same as promptAndListen except grammar is predefined to be the set
of all natural numbers. |
| string
SpeechScript.promptAndRecordPhrase(string prompt, string file_name) |
|
Play a prompt and then record what the caller says. This function
uses silence detection so recording will stop once the caller stops talking.
Returns the name of the file recorded. |
| string SpeechScript.playFile(string
file_name) |
|
Play a recorded prompt. The prompt must have already be part of
the users prompt list. |
| void SpeechScript.speak(string text) |
|
Speack some text using TTS. |
| string SpeechScript.getCallDID() |
|
Get the DID number of the current call. |
| string SpeechScript.getCallANI() |
|
Get the ANI number of the caller (may or may not be available). |
| void SpeechScript.sleep(int msec) |
|
Pause for some period of time. msec: number of
milliseconds to pause. |
| WebSession
SpeechScript.startWebSession(string URL) |
|
Start a web data collection session. URL: URL that session will
start on. Ex: "http://www.google.com".
Returns a WebSession object to be used later with other functions. |
| string WebSession.doPost(string URL,
string parameters) |
|
Use a web session to post to a web page. Returns the page HTTP
response data as a string. |
| void SpeechScript.logInfo(string
message) |
|
Log a message to the system log for debugging. |
| void SpeechScript.sendEmail(string
to_address, string from_address, string subject, string body, string
attachment_path) |
|
Send an email message. Attachment path must be a file in the users
script directory, like a recorded prompt. Attachment path can be an empty
string "". |
| void storePersistantUserValue(string name,
string value) |
|
Store a named value in callers persistant storage. |
| string getPersistantUserValue(string name) |
|
Get a named value out of callers persistant storage. |
| string promptAndRecognizeDataFileEntry(string
prompt,string data_file_name, bool speak_data) |
|
Plays a prompt, then reads grammar and TTS responses from a
data file that you have uploaded. This allows you to use speech to lookup
information in large datasets that you define (dictionary, contact list, etc.).
If speak_data is false, it will not speak the TTS response in the data file.
File format:
<phrase1>|TTS response1
<phrase2>|TTS response2
.
.
|
| bool speakDataFileEntry(string
data_file_name, string entry_value) |
|
Speak a TTS phrase that is stored in a data file that you have
uploaded. entry_value is the key/phrase that is used to find the entry in the
file to speak. See above function for the data file format. |
| public string[] getDataFileEntry(string
data_file_name, int entry_index) |
|
Get a data file entry that is stored in a data file that you have
uploaded. entry_index is the index into the file that is used to find the entry
in the file. See above function for the data file format. |
| public int getDataFileEntryIndex(string
data_file_name, string entry_value) |
|
Get the index of a entry (phrase) in the data file. |
| public bool loadPromptDatabase(string
database_file_name) |
|
Loads a prompt database to be used by all functions that play prompts.
Prompt database is a comma separated value where each line represents a
mapping between a prompt transcription and the name of a wave file to be
played. For example:
Hello how are
you,hello.wav wednesday,wednesday.wav . . .
|
|
|