amd@v3
Answering Machine Detection.
| Version | amd@v3 |
| Runs in | inbound-call and your own branches |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tts | object | Text-to-speech prompt: text (1 to 1024 characters), with an optional voice or language (exclusive). Without them, the defaults of the branch or of the scenario apply. text-to-speech prompt: text, and voice or language | ||
audioFile | object | An audio file of your library, by its SID (REST API v2 identifier). audio file of your library: sid | ||
language | af-ZA, am-ET, ar-AE… (140 values) | Language for Speech Recognition and Text-to-Speech. See Voices & Audio accepts ${{ }} | ||
timeout | integer | 6 | 1..10 · accepts ${{ }} | |
minWords | integer | 4 | 1..10 · accepts ${{ }} | |
yesHints | array of string | 1..10 items · accepts ${{ }} | ||
noHints | array of string | 1..10 items · accepts ${{ }} |
Every parameter that accepts ${{ }} can be computed from an expression.
How it works
AMD is for Answering Machine Detection Same as amd@v2, with the same prompt parameters as play@v3: tts (text-to-speech) or audioFile (audio file of your library). Set at most one of them. Key presses are ignored.
Examples
Short example
- action: amd@v3
params:
timeout: 4
yesHints:
- message
- voicemail
result: $amdFull example with defaults
- action: amd@v3
params:
tts: # or audioFile: { sid: 'fdsanjkf' }, or none
text: Hello? # (1..1024 characters)
# voice: en-US-AvaMultilingual # or language: en-US (default: the language below)
# language: en-US # stt language (default: the scenario defaults)
timeout: 6 # 1..10
minWords: 4 # if at least minWords words are said, it is considered a voicemail
yesHints: # words that would match a voicemail (none by default, 1..10)
- voicemail
noHints: # words that would match a human (none by default, 1..10)
- hello
result: $amdUsing the result
- if: $amd.detected == 'machine'
then:
- action: log@v1
params:
message: Machine detected
- action: hangup@v1Result
Set result: $myVariable to keep it. Result of amd@v2 and amd@v3 (Answering Machine Detection)
| Field | Type | Description |
|---|---|---|
ok | boolean | true when a decision was made (detected is not empty) |
timeout | boolean | true when no decision was made in time |
error | string | Only present on error: hangup when the callee hung up, canceled, or the error message |
detected | machine, human, "" | |
recognized | string | The hint that matched, or the text said when minWords was reached |
{
"ok": true,
"timeout": false,
"detected": "machine",
"recognized": "voicemail"
}Older versions
Older versions keep working in existing scenarios. Use the version above in new scenarios.
amd@v2: Answering Machine Detectionamd@v1: Use amd@v2 instead amd@v1 is deprecated, use amd@v3
Updated about 3 hours ago
Did this page help you?
