Component Audio Recording

Table of Contents

Description

Records the audio coming from the subscriber to a local file.
Places the file in a temporary directory for the lifetime of the script. Saving the file from the script requires that the file is then moved to any stationary storage location.

Table 1. System Characteristics

Index

208

Short title

record

Types of scenarios

IVR

Starter module

r_sip_ivr_script_component_record

Mode

Asynchronous

Icon

208

Branching pattern

Branching, closing

Properties

Table 2. Properties
Specification Description

Title: Mode
Code: mode
Visibility: no
Default: `Synchronous Recording'

Selects the recording mode.
Possible options:

  • Synchronous recording (syncRecFile, 0) - usual mode of recording to a file with subsequent packing to the selected codec and returning the file path to the variable.

  • StreamingRaw` (growingRaw, 1) - mode of recording to the specified file in short portions, for example, to organize streaming to the speech recognition service by external means.

Title: Path to Variable
Code: pathToVarMode
Visibility: yes
Default: Yes

Switch to save the file path with a write to variable.

Title: File path to a variable
Code: nameVar
Visibility: yes
Default: — 

Variable to save the path to the file with the recorded voice.
Applies only in synchronous recording mode.

The file is placed in a temporary directory of the script and will be deleted when the script completes.
Long-term file retention requires the script to further move the file to a stationary storage location.

The recording is made on the server with the mg role serving the current call, and then transferred to the server with the ivr role serving the current scenario. The transfer always takes place within the site.

Title: File path
Code: toFilepath
Visibility: yes
Default: — 

Argument specifying the path to the file for streaming (growing file).
Applies only in streaming recording mode.

Title: Wav Title
Code: addWavHeader
Visibility: yes
Default: No

Allows you to add a wav header to a growing file.
Applies only in streaming recording mode.

A size equivalent to the selected maximum recording time is written to the Wav header.

Title: Codec
Code: codec
Visibility: yes
Default: PCMA

Codec/format of the recorded file (synchronous recording mode only). Packing is performed at the end of recording with the mixer.
Possible options:

  • PCM (pcm, '0')

  • PCMA (pcma, '1')

  • PCMU (pcmu, '2')

  • GSM (gsm, '3')

  • MP3 8-bit (mp3_8, '4')

  • MP3 16-bit (mp3_16, '5')

  • MP3 24-bit (mp3_24, '6')

Title: Codec
Code: codecRaw
Visibility: yes
Default: PCMA

Codec/format of the recorded file (for streaming mode only).
Possible options:

  • L16/8000 (pcm8000, '0') - PCM 8000 Hz 16 bit mono.

  • L16/16000 (pcm16000, '1') - PCM 16000 Hz 16 bit mono.

Title: Buffer, ms
Code: bufferDurMs
Visibility: no
Default: 250

Argument defining the period of dumping the written data to the stream file.
Applies to the streaming recording mode only.

Title: Timeout, s
Code: recTimeSec
Visibility: no
Default: — 

Recording timeout before automatic interruption, in seconds.

Title: Buffer for DTMF
Code: dtmfBuffer
Visibility: no
Default: — 

Variable to store received DTMF characters.

Title: Clear buffer DTMF
Code: clearDtmfBuffer
Visibility: yes
Default: `Yes'

Buffer pre-clearance switch DTMF.

Title: Number of characters
Code: maxSymbolCount
Visibility: no
Default: — 

An argument containing a limit on the number of characters that can be entered.
When the specified number of DTMF characters is received during the component execution, the recording is automatically terminated and the last portion of voice data is sent to the recognition service.

Title: Interrupt Symbols
Code: interruptSymbols
Visibility: no
Default: — 

A string containing sequences of interrupt characters separated by commas.
When a character sequence matching one of the specified interrupt sequences is detected at the end of the DTMF buffer, the recording is automatically terminated and the last portion of data is sent to the recognition service.
For example, *, 7, 123, 9395.

Title: Cut interrupt characters
Code: clearInterrupt
Visibility: yes
Default: Yes

Disable the operation of removing interrupt characters from the DTMF buffer after an interrupt sequence is detected.

Title: Break background (layer) when voice is detected
Code: `stopPlayerIdOnVad

Visibility: no
Default: `"default"`", "Background Playback Layer (playerId field of the background playback component of the previously started playback) to be stopped when a voice is detected in the subscriber’s channel.

Title: Interrupt when silence is detected
Code: abortOnSilence
Visibility: no
Default: `No'

Silence detection and auto interrupt mode switch.
Silence is defined as a signal below the sensitivity threshold that is longer than 200 ms.
The timer is timed only after voice detection (a signal above the sensitivity threshold lasting more than half a second, within which signal areas below the sensitivity threshold lasting less than 200 ms can be detected).

Title: `Interval of Silence, from
Code: silenceTimeoutSec
Visibility: yes
Default: 2

Argument containing the timeout time when silence is detected in seconds. If a voice appears above the sensitivity threshold within the specified timeout, the timer is reset until silence is detected again.
In most cases, 2 seconds is a comfortable interval.

Title: VAD threshold, dB
Code: vadThreshold
Visibility: no
Default: 30

Argument defining the sensitivity threshold that differentiates between voice and silence levels. The default is 30 dB.

Title: Transition
Code: transfer
Visibility: no
Default: — 

The component to which control is passed when the operation completes typing the desired number of characters.

Title: Transition, Time
Code: transferTimeout
Visibility: no
Default: — 

Component to which control is passed on timeout termination.

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