CPA & AMD Settings Reference (gRPC)
An outbound dialer has to make three decisions the moment a call is answered: what answered (a person at home, a business, or a machine), how long to wait before deciding, and which non-conversational outcomes are worth acting on, such as a fax line, a disconnected number, or a voicemail beep. Call Progress Analysis (CPA) and Answering Machine Detection (AMD) settings are how you set those trade-offs. Set them too tight and you abandon live people; set them too loose and you connect agents to machines. This reference lists every CPA and AMD setting in the gRPC API, with its type, default, and effect, so you can tune them directly in protobuf fields without grammars.
Using MRCP instead? MRCP integrations configure the same behavior with <meta> tags in CPA and AMD grammars. See Grammars in CPA & AMD, and use the mapping table at the end of this article to translate between the two. For how settings are inherited from the deployment, session, and interaction levels, see Speech Settings: Hierarchy, Inheritance and Value Types.
Where CPA and AMD settings go
CPA and AMD run as two separate interactions on the same session, and both process the same audio stream. Each interaction has its own create request with its own settings group, and both accept the audio consume, VAD, and general interaction settings. See CPA & AMD Integration - gRPC for the call flow.
| Interaction create request | Detection settings | Also accepts |
|---|---|---|
InteractionCreateCpaRequest | cpa_settings (human or machine classification and prompt end detection) | audio_consume_settings, vad_settings, general_interaction_settings |
InteractionCreateAmdRequest | amd_settings (tone detection: answering machine beep, fax, SIT, busy, screening) | audio_consume_settings, vad_settings, general_interaction_settings |
CPA settings
CPA classifies the answer by measuring how long the called party speaks before going silent. A person at home typically gives one short burst, a business answer is longer, and a recorded greeting runs longer still. The settings below place the boundaries between those cases.
| Setting | Type | Default | Range or values | Description |
|---|---|---|---|---|
human_residence_time_ms | Integer | 1800 | Positive milliseconds | The maximum amount of speech for a human residence classification. Shorter speech is classified HUMAN RESIDENCE. |
human_business_time_ms | Integer | 3000 | Positive milliseconds | The maximum amount of speech for a human business classification. Speech lasting longer than this is classified UNKNOWN SPEECH, which is often a recorded message. |
unknown_silence_timeout_ms | Integer | 5000 | Positive milliseconds | The maximum silence to allow before human speech is detected. When it is reached, the result is UNKNOWN SILENCE. |
max_time_from_connect_ms | Integer | 0 (disabled) | Positive milliseconds | The maximum time the CPA algorithm may take to return a human or machine classification. Use it only if you understand the implications: a shorter window lowers accuracy. See Limiting the time to a result. |
prompt_end_detect | Boolean | false | true, false | Enables detection of end of speech, used after a CPA interaction to detect when the other party stops speaking. When it is enabled, other CPA modes are ignored. See Prompt end detection. |
prompt_end_timeout_ms | Integer | 10000 (10 seconds) | Positive milliseconds | The maximum time to wait for the prompt end to be detected. When it is reached, the interaction returns PROMPT_END_TIMEOUT. |
How the thresholds produce a result
| What CPA hears | Result |
|---|---|
No speech before unknown_silence_timeout_ms | UNKNOWN SILENCE |
Speech shorter than human_residence_time_ms | HUMAN RESIDENCE |
Speech between human_residence_time_ms and human_business_time_ms | HUMAN BUSINESS |
Speech longer than human_business_time_ms | UNKNOWN SPEECH |
Setting human_business_time_ms equal to human_residence_time_ms removes the HUMAN BUSINESS result entirely. Setting both to a very small value, such as 10, leaves only UNKNOWN SPEECH and UNKNOWN SILENCE, which suits applications that only need to know whether anyone is speaking. That is not a typical configuration.
The costs are asymmetric. Lowering the boundary for machine-length speech classifies machines sooner, but it begins clipping long-winded humans into the machine bucket, which in an outbound campaign means abandoning live people. Raising it protects those people but lets more machines through as humans, wasting agent time. The defaults sit at a balance point for typical North American greeting patterns. Tune from observed results, and keep your abandoned-call obligations in view. For the reasoning behind the thresholds, see CPA Technical Specifications and CPA Tuning.
Limiting the time to a result
The classification model is designed around at least 5 seconds of audio. If your dialer needs a decision sooner, max_time_from_connect_ms lets you state that deadline once instead of tuning three timers by hand. When it is set, it overrides human_residence_time_ms, human_business_time_ms, and unknown_silence_timeout_ms, and the platform scales them to fit:
| Setting | Scaled value |
|---|---|
human_business_time_ms | The lower of max_time_from_connect_ms and 3000 |
human_residence_time_ms | The lower of the scaled business time and 1800 |
unknown_silence_timeout_ms | The same value as max_time_from_connect_ms |
- Values below 1000 ms are treated as 1000 ms, the shortest period in which the algorithm can reliably decide.
- With less than 1.8 seconds of audio available, HUMAN RESIDENCE and HUMAN BUSINESS cannot be told apart.
- If the person is still speaking when the time limit is reached, the only valid answer is UNKNOWN SPEECH, which applications usually treat as a machine.
For the full scaling rules, see CPA_MAX_TIME_FROM_CONNECT.
Prompt end detection
Prompt end detection finds the moment a recorded or automated announcement stops, such as a call screening announcement, so your application can deliver its message without talking over it. A typical flow runs a normal CPA interaction first. If it returns UNKNOWN SPEECH, the application creates a new CPA interaction with prompt_end_detect set to true and waits for PROMPT END, or for PROMPT_END_TIMEOUT if prompt_end_timeout_ms expires.
Use prompt end detection on its own. When prompt_end_detect is true, all other CPA modes are ignored. Create a dedicated interaction for it rather than combining it with the residence, business, and silence timing settings.
AMD (tone detection) settings
AMD is a signal-processing analysis of tone frequencies, not speech. Each tone class you enable is one more dead path your dialer can abandon, for example a fax line, a disconnected number, or a busy signal, and one more chance to time a voicemail message to the beep instead of the start of a greeting. Each class you leave disabled costs no detection effort.
| Setting | Type | Default | Range or values | Description |
|---|---|---|---|---|
amd_enable | Boolean | true | true, false | Enables answering machine beep detection. |
amd_input_text | String | AMD | Any string | The string returned when an answering machine beep is detected. |
fax_enable | Boolean | true | true, false | Enables fax tone detection. |
fax_input_text | String | FAX | Any string | The string returned when a fax tone is detected. |
sit_enable | Boolean | true | true, false | Enables detection of special information tones (SIT). |
busy_enable | Boolean | false | true, false | Enables busy tone detection. |
busy_input_text | String | BUSY | Any string | The string returned when a busy tone is detected. |
screening_enable | Boolean | false | true, false | Enables screening tone detection. When the beginning of a screening tone is detected, the interaction returns SCREENING. It can be used at the same time as the other tone detection settings. |
tone_detect_timeout_ms | Integer | Not specified | Positive milliseconds | The maximum time the tone detection algorithm listens for input before timing out. |
SIT result strings
When SIT detection is enabled, the platform returns one of seven strings. SIT tones are standardized by the International Telecommunication Union (ITU) and signal that a call could not be completed as dialed. You can change any string to match what your application expects.
| Setting | Type | Default | Range or values | Description |
|---|---|---|---|---|
sit_reorder_local_input_text | String | SIT REORDER LOCAL | Any string | Returned for a SIT reorder (local) tone. |
sit_vacant_code_input_text | String | SIT VACANT CODE | Any string | Returned for a SIT vacant code tone. |
sit_no_circuit_local_input_text | String | SIT NO CIRCUIT LOCAL | Any string | Returned for a SIT no circuit (local) tone. |
sit_intercept_input_text | String | SIT INTERCEPT | Any string | Returned for a SIT intercept tone. |
sit_reorder_distant_input_text | String | SIT REORDER DISTANT | Any string | Returned for a SIT reorder (distant) tone. |
sit_no_circuit_distant_input_text | String | SIT NO CIRCUIT DISTANT | Any string | Returned for a SIT no circuit (distant) tone. |
sit_other_input_text | String | SIT OTHER | Any string | Returned for any other SIT tone. |
Busy tone detection is off by default. Set busy_enable to true if you need it. Busy tones are also only detected in the first 7.5 seconds of the audio stream, and many applications only receive audio after the call has connected, so ring and busy tones may never reach the platform. Depending on your telephony platform, you may need to change its settings to pass pre-connection audio.
Audio consume and VAD settings that matter for CPA and AMD
CPA measures speech duration from the boundaries that voice activity detection (VAD) finds, so VAD timing directly shapes classification speed and accuracy. The full definitions of these groups, including the settings not shown here, are in the ASR & Transcription Settings Reference.
| Setting | Type | Default | Range or values | Description |
|---|---|---|---|---|
use_vad | Boolean | Not specified | true, false | When false, all audio selected by the audio consume settings is processed. When true, VAD detects when speech starts and stops. |
eos_delay_ms | Integer | 800 | Positive milliseconds | Silence required after speech before the end of speech is declared, which generates the CPA result. See the guidance below. |
barge_in_timeout_ms | Integer | -1 (infinite) | -1, or positive milliseconds | The longest silence allowed while waiting for input before a timeout is reported. |
end_of_speech_timeout_ms | Integer | -1 (infinite) | -1, or positive milliseconds | The total time the other party may speak after barge-in is detected, before an end-of-speech timeout occurs. |
audio_consume_mode | Enumeration | AUDIO_CONSUME_MODE_STREAMING | STREAMING, BATCH | Whether the interaction consumes streamed audio or audio loaded beforehand. |
stream_start_location | Enumeration | STREAM_START_LOCATION_STREAM_BEGIN | See the ASR reference | Where processing starts when streaming mode is used. |
audio_consume_max_ms | Integer | 0 (all audio sent) | Positive milliseconds | Limits how much audio is processed. |
Tuning eos_delay_ms for CPA
Some silence after speech is natural, so the end-of-speech delay separates the pauses between words from a person who has finished speaking. Too short, and the end-of-speech event fires early, which shortens the measured speech and can push a machine message into a human classification. Too long, and the person who answered waits in silence before your application responds.
- The CPA guidance and the MRCP grammars use 1200 ms for CPA, and the grammars apply it automatically when it is not set. The API reference default is 800 ms, so set
eos_delay_msto 1200 on CPA interactions if you want the recommended behavior. - If misclassifying a machine as a person is costly, as in many call centers, a value such as 1500 ms can improve accuracy at the cost of about 300 ms of added delay for the person answering.
- If you only need to know whether anyone is speaking (UNKNOWN SPEECH or UNKNOWN SILENCE), a value of 100 to 400 ms returns faster.
- For AMD, the delay is not used in a meaningful way, because tone detection does not look for human speech.
Mapping to MRCP grammar settings
MRCP grammars configure the same behavior with <meta> tags. In MRCP, the CPA timing defaults come from the client_property.conf file, and values in the grammar override them. Use the table to translate between the two interfaces. In gRPC, CPA and AMD are separate interactions rather than a DETECTION_MODE setting.
| gRPC field | MRCP grammar setting | gRPC default | MRCP grammar default |
|---|---|---|---|
human_residence_time_ms | STREAM|CPA_HUMAN_RESIDENCE_TIME | 1800 | 1800 |
human_business_time_ms | STREAM|CPA_HUMAN_BUSINESS_TIME | 3000 | 3000 |
unknown_silence_timeout_ms | STREAM|CPA_UNKNOWN_SILENCE_TIMEOUT | 5000 | 5000 |
max_time_from_connect_ms | STREAM|CPA_MAX_TIME_FROM_CONNECT | 0 (disabled) | Not used unless specified |
prompt_end_detect | The cpa_prompt_end.grxml grammar | false | Enabled by using the grammar |
prompt_end_timeout_ms | None documented | 10000 | None documented |
amd_enable | AMD_CUSTOM_ENABLE | true | Set in the grammar |
amd_input_text | AMD_CUSTOM_INPUT_TEXT | AMD | BEEP |
fax_enable | FAX_CUSTOM_ENABLE | true | Set in the grammar |
fax_input_text | FAX_CUSTOM_INPUT_TEXT | FAX | FAX |
sit_enable | SIT_CUSTOM_ENABLE | true | Set in the grammar |
sit_*_input_text (seven fields) | SIT_*_CUSTOM_INPUT_TEXT (seven settings) | As listed above | Same strings |
busy_enable | BUSY_CUSTOM_ENABLE | false | false |
busy_input_text | BUSY_CUSTOM_INPUT_TEXT | BUSY | BUSY |
tone_detect_timeout_ms | STREAM|BARGE_IN_TIMEOUT (for AMD) | Not specified | Set in the grammar |
screening_enable | The amd_screening_tone.grxml grammar | false | Enabled by using the grammar |
eos_delay_ms | STREAM|VAD_EOS_DELAY | 800 | 800 for AMD, 1200 for CPA |
barge_in_timeout_ms | STREAM|BARGE_IN_TIMEOUT | -1 | Forced above the largest CPA value for CPA |
end_of_speech_timeout_ms | STREAM|END_OF_SPEECH_TIMEOUT | -1 | Forced above the largest CPA value for CPA |
For CPA grammars, the platform forces the barge-in timeout and end-of-speech timeout to a value 10,000 ms greater than the largest CPA timing setting, so they never interfere with a CPA classification. On a gRPC CPA interaction, leave barge_in_timeout_ms and end_of_speech_timeout_ms at their default of -1 unless you have a reason to bound them. If you do set them, keep them larger than every CPA timing value so they cannot cut a classification short.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| A setting appears to have no effect | Check the field name against this article. Names such as cpa_prompt_end_enable, screening_tone_enable, and cpa_unknown_silence_timeout, and a detection_mode field, do not exist in the API. The correct fields are prompt_end_detect, screening_enable, and unknown_silence_timeout_ms, and CPA and AMD use separate create requests. |
| Live people are classified as machines | Speech is running past human_business_time_ms, or eos_delay_ms is too short. Review the thresholds, and consider a longer eos_delay_ms such as 1200 to 1500 ms. |
| Answering machines are connected to agents | The business threshold may be too high, or max_time_from_connect_ms is cutting the audio window short. CPA accuracy is best with at least 5 seconds of audio. |
| Agents wait too long after the person answers | eos_delay_ms is high, or no time limit is set. Lower eos_delay_ms, or set max_time_from_connect_ms and accept the accuracy trade-off. |
| Busy tones are never detected | busy_enable is false, or the telephony platform does not pass pre-connection audio. Enable it explicitly, and confirm the audio stream includes the first 7.5 seconds of the call. |
| The returned string is not what the call flow expects | The result strings are configurable. Check amd_input_text and the other *_input_text settings. The default for a beep is AMD in gRPC and BEEP in the MRCP grammars. |
| Other CPA timing settings seem to be ignored | Either prompt_end_detect is true, which ignores other CPA modes, or max_time_from_connect_ms is set, which overrides the three timing settings. |
