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 requestDetection settingsAlso accepts
InteractionCreateCpaRequestcpa_settings (human or machine classification and prompt end detection)audio_consume_settings, vad_settings, general_interaction_settings
InteractionCreateAmdRequestamd_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.

SettingTypeDefaultRange or valuesDescription
human_residence_time_msInteger1800Positive millisecondsThe maximum amount of speech for a human residence classification. Shorter speech is classified HUMAN RESIDENCE.
human_business_time_msInteger3000Positive millisecondsThe 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_msInteger5000Positive millisecondsThe maximum silence to allow before human speech is detected. When it is reached, the result is UNKNOWN SILENCE.
max_time_from_connect_msInteger0 (disabled)Positive millisecondsThe 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_detectBooleanfalsetrue, falseEnables 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_msInteger10000 (10 seconds)Positive millisecondsThe 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 hearsResult
No speech before unknown_silence_timeout_msUNKNOWN SILENCE
Speech shorter than human_residence_time_msHUMAN RESIDENCE
Speech between human_residence_time_ms and human_business_time_msHUMAN BUSINESS
Speech longer than human_business_time_msUNKNOWN 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:

SettingScaled value
human_business_time_msThe lower of max_time_from_connect_ms and 3000
human_residence_time_msThe lower of the scaled business time and 1800
unknown_silence_timeout_msThe 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.

SettingTypeDefaultRange or valuesDescription
amd_enableBooleantruetrue, falseEnables answering machine beep detection.
amd_input_textStringAMDAny stringThe string returned when an answering machine beep is detected.
fax_enableBooleantruetrue, falseEnables fax tone detection.
fax_input_textStringFAXAny stringThe string returned when a fax tone is detected.
sit_enableBooleantruetrue, falseEnables detection of special information tones (SIT).
busy_enableBooleanfalsetrue, falseEnables busy tone detection.
busy_input_textStringBUSYAny stringThe string returned when a busy tone is detected.
screening_enableBooleanfalsetrue, falseEnables 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_msIntegerNot specifiedPositive millisecondsThe 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.

SettingTypeDefaultRange or valuesDescription
sit_reorder_local_input_textStringSIT REORDER LOCALAny stringReturned for a SIT reorder (local) tone.
sit_vacant_code_input_textStringSIT VACANT CODEAny stringReturned for a SIT vacant code tone.
sit_no_circuit_local_input_textStringSIT NO CIRCUIT LOCALAny stringReturned for a SIT no circuit (local) tone.
sit_intercept_input_textStringSIT INTERCEPTAny stringReturned for a SIT intercept tone.
sit_reorder_distant_input_textStringSIT REORDER DISTANTAny stringReturned for a SIT reorder (distant) tone.
sit_no_circuit_distant_input_textStringSIT NO CIRCUIT DISTANTAny stringReturned for a SIT no circuit (distant) tone.
sit_other_input_textStringSIT OTHERAny stringReturned 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.

SettingTypeDefaultRange or valuesDescription
use_vadBooleanNot specifiedtrue, falseWhen false, all audio selected by the audio consume settings is processed. When true, VAD detects when speech starts and stops.
eos_delay_msInteger800Positive millisecondsSilence required after speech before the end of speech is declared, which generates the CPA result. See the guidance below.
barge_in_timeout_msInteger-1 (infinite)-1, or positive millisecondsThe longest silence allowed while waiting for input before a timeout is reported.
end_of_speech_timeout_msInteger-1 (infinite)-1, or positive millisecondsThe total time the other party may speak after barge-in is detected, before an end-of-speech timeout occurs.
audio_consume_modeEnumerationAUDIO_CONSUME_MODE_STREAMINGSTREAMING, BATCHWhether the interaction consumes streamed audio or audio loaded beforehand.
stream_start_locationEnumerationSTREAM_START_LOCATION_STREAM_BEGINSee the ASR referenceWhere processing starts when streaming mode is used.
audio_consume_max_msInteger0 (all audio sent)Positive millisecondsLimits 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_ms to 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 fieldMRCP grammar settinggRPC defaultMRCP grammar default
human_residence_time_msSTREAM|CPA_HUMAN_RESIDENCE_TIME18001800
human_business_time_msSTREAM|CPA_HUMAN_BUSINESS_TIME30003000
unknown_silence_timeout_msSTREAM|CPA_UNKNOWN_SILENCE_TIMEOUT50005000
max_time_from_connect_msSTREAM|CPA_MAX_TIME_FROM_CONNECT0 (disabled)Not used unless specified
prompt_end_detectThe cpa_prompt_end.grxml grammarfalseEnabled by using the grammar
prompt_end_timeout_msNone documented10000None documented
amd_enableAMD_CUSTOM_ENABLEtrueSet in the grammar
amd_input_textAMD_CUSTOM_INPUT_TEXTAMDBEEP
fax_enableFAX_CUSTOM_ENABLEtrueSet in the grammar
fax_input_textFAX_CUSTOM_INPUT_TEXTFAXFAX
sit_enableSIT_CUSTOM_ENABLEtrueSet in the grammar
sit_*_input_text (seven fields)SIT_*_CUSTOM_INPUT_TEXT (seven settings)As listed aboveSame strings
busy_enableBUSY_CUSTOM_ENABLEfalsefalse
busy_input_textBUSY_CUSTOM_INPUT_TEXTBUSYBUSY
tone_detect_timeout_msSTREAM|BARGE_IN_TIMEOUT (for AMD)Not specifiedSet in the grammar
screening_enableThe amd_screening_tone.grxml grammarfalseEnabled by using the grammar
eos_delay_msSTREAM|VAD_EOS_DELAY800800 for AMD, 1200 for CPA
barge_in_timeout_msSTREAM|BARGE_IN_TIMEOUT-1Forced above the largest CPA value for CPA
end_of_speech_timeout_msSTREAM|END_OF_SPEECH_TIMEOUT-1Forced 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

SymptomLikely cause and fix
A setting appears to have no effectCheck 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 machinesSpeech 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 agentsThe 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 answerseos_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 detectedbusy_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 expectsThe 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 ignoredEither prompt_end_detect is true, which ignores other CPA modes, or max_time_from_connect_ms is set, which overrides the three timing settings.

Related Articles


Was this article helpful?