CPD (response detector) component

Description

Used in outbound campaigns to detect a "live" person response.

Records the conversation for a specified time (5-7 seconds), during which it tries to determine the type of sound source.

The person is detected when a second of silence elapses after the end of the caller’s greeting speech.
Robots and automata are identified at the end of a timeout or a long (more than 2 seconds) robot greeting cue.
The determination of silence shall be made at the end of the specified time interval.
A fax is detected almost immediately when the corresponding tone is detected.

The CPD algorithm used by the component is not demanding on system resources.

Table 1. System Characteristics

Index

225

Short title

cpd

Types of scenarios

IVR

Starter module

era_sip_ivr_script_component_cpd

Mode

Asynchronous

Icon

225

Branching pattern

Branching, closing

Properties

Table 2. Properties
Specification Description

Title: Timeout, s
Code: collectTimeSec
Visibility: no
Default: 5

Argument containing the time in seconds. Defines how long the call recording will be accumulated for further analysis by the answer detector.

Title: Save Record File
Code: saveRecord
Visibility: no
Default: `No'

Sign of saving the record file sent to the response detector service. Saving is performed to the directory /var/lib/era_files/answer_detector_records/<domain>/<type>

  • domain - the domain within which the conversation took place.

  • type - the type of result that the response detector returned.

Title: Result to variable
Code: result
Visibility: no
Default: — 

Variable where the reason for component termination is stored.

Title: Transition, detected
Code: transferFound
Visibility: no
Default: — 

The component to which control is passed after a "live" person is detected by the response detector.

Title: Transition, not detected
Code: transferNotFound
Visibility: no
Default: — 

The component to which control is passed if the response detector does not find a live person in the record.

Title: Transition, Error
Code: transferError
Visibility: no
Default: — 

The component to which control is passed if an error occurs.

Parameterization

CPD analysis is performed by the console application included in the platform cpd (/era_sip/priv/cpd/cpd).
The component starts CPD in analysis mode.

In analysis mode, the application takes in input portions of audio data (PCM 8000Hz 16bit mono), and outputs one of the possible results:

  • human

  • ivr

  • tone

  • fax

  • silence

The component completes successfully only if the result is 'human'.

The algorithm can be parameterized. SettingsML.json and SettingsML.json files are used as parameters SettingsSpectrum.json.
The files are located in the directory ':SYNC/common/cpd'.

An example of the command line of a startup in analysis mode:

cpd --mode=analyze --ml-settings-path=/some/path/to/SettingsML.json --spectrum-settings-path=/some/path/to/SettingsSpectrum.json --timeout=7000 --recv-timeout=3000

Parameter decoding:

--ml-settings-path  -  path to the json file with ML-parameters obtained as a result of training. Optional parameter. If not set, some stale (and suboptimal) ML-parameters are used.

--spectrum-settings-path  -  path to the json file with frequency parameters generated by the engineer. Optional parameter. If not set, the frequency analyzer is not used.

--timeout  -  full timeout of the analyzer operation in ms; after this time the analyzer outputs the obtained result. Optional parameter. By default 7000.

--recv-timeout  -  timeout for receiving the next data portion through stdin; if there is no incoming data for this time, the analyzer outputs the result. Optional parameter. By default 3000.

The app supports machine learning mode.

Training is the selection of optimal parameters for a pre-labeled (foldered) set of voice files, taking into account bias (deviation).
Bias allows you to prioritize whether to allow loss of live answers or allow bad calls to operators.

Training requires:

  1. Prepare files and place them next to the analyzer in the ML folder in five subfolders (Human, IVR, Tone, Fax, Silence)

  2. Run the analyzer from the command line with two parameters - bias (from -9 to 9, 0 is neutral) and the number of training iterations (1 is recommended for outputting current statistics and 10000 for real training).
    According to the results of training, a report on achieved accuracy, average duration of human detection and set parameters (which are saved next to each other in SettingsML.json file for further use in combat mode) is displayed.

  3. The result of SettingsML.json to be applied by the component should be placed in the ':SYNC/common/cpd' directory, replacing the previous one.

Example of a command line for starting up in training mode:

cpd --mode=learn --learn-bias=0 --learn-iterations=10000 --learn-data-dir-path=/some/path/to/wavs/ --learn-output-file-path=/some/path/to/SettingsML.json

Parameter decoding:

--learn-bias  -  priority from -9 to +9, where -9 - allow loss of live answers, 9 - allow bad calls to operators, 0 - neutral. Optional parameter. Default 0.

--learn-iterations  -  number of training iterations. Optional parameter. Default 10000.

--learn-data-dir-path  -  path to the folder with marked data for training. Mandatory parameter.

--learn-output-file-path  -  path to the output file with the training result. Optional parameter. If not specified, the result is simply printed in the console.

The marked-up folder should contain sample audio recordings for the training run. File format: *.wav PCM 8000Hz 16bit mono.
Files should be grouped by content type and placed within subfolders:

  • Fax - fax recording examples;

  • Human - examples of people’s live responses;

  • IVR - IVR examples (music, robots, voice menu, etc.);

  • Silence - examples of silence;

  • Tone - various tones, beeps, etc.