Places the file in a temporary directory for the life of the script. To save a file from a script, it must be subsequently moved to any permanent storage location.
Audio Recording Component
:icons:font :hardbreaks: :imagesdir: ../../../assets/images :toc-title: Contents :toc:
Description
Records sound coming from the subscriber to a local file. +\
Index |
|
Short name |
|
Script types |
|
Start module |
|
Mode |
Asynchronous |
Icon |
|
Branching type |
Branching, closing |
Properties
| Specification | Description |
|---|---|
Name: Mode
Code: |
"Select recording mode. Possible options: |
|
0) - the usual mode of recording to a file, followed by packaging in the selected codec and returning the file path to a variable. |
|
1) - recording mode to the specified file in short portions, for example, to organize streaming sending to the speech recognition service by external means. Name: Path to variable
Code: |
Default: Yes" |
"Switch to save the path to the file and write it to a variable." |
Name: Path to file in variable
Code: |
"Variable for saving the path to the file with the recorded voice. Applicable only in synchronous recording mode. The file is located in the script’s temporary directory and will be deleted when the script completes. |
To save a file for a long time |
the script requires further movement of the file to a permanent storage location. |
The recording is carried out on a server with the mg role |
serving the current call, and then transferred to a server with the ivr role, serving the current scenario. The transfer always takes place within the site. Name: Path to file
Code: |
Default: --" |
"Argument specifying the path to the file for streaming recording (growing file). Applicable only in streaming recording mode. Name: Wav title
Code: |
Default: No" |
"Allows you to add a wav header to a growing file. Applicable only in streaming recording mode. The Wav header contains a size equivalent to the selected maximum recording time. Name: Codec
Code: |
Default: `PCMA`" |
"Codec/recorded file format (for synchronous recording mode only). Packing is done upon completion of recording using a mixer. Possible options: |
|
'0') |
|
'1') |
|
'2') |
|
'3') |
|
'4') |
|
'5') |
|
'6') |
|
'7') |
|
'8') Name: Codec
Code: |
Default: `PCMA`" |
"Codec/recorded file format (for streaming recording mode only). Possible options: |
|
'0') - PCM 8000 Hz 16 bit mono. |
|
'1') - PCM 16000 Hz 16 bit mono. |
Name: Buffer |
ms
Code: |
Default: 250" |
"Argument defining the period for flushing recorded data to the stream file. Applies only to streaming recording mode. |
Name: Timeout |
s
Code: |
Default: --" |
"Recording timeout before automatic interruption, in seconds." |
Name: Buffer for DTMF
Code: |
"Variable for storing received DTMF characters." |
Name: Clear DTMF buffer
Code: |
"DTMF buffer pre-clear switch." |
Name: Number of characters
Code: |
"An argument containing a limit on the number of characters entered. |
After receiving the specified number of DTMF characters during the execution of a component |
the recording is automatically completed and the last portion of voice data is sent to the recognition service." |
Name: Interrupt characters
Code: |
"A string containing sequences of break characters separated by commas. |
After detecting a character sequence at the end of the DTMF buffer that matches one of the specified interrupt sequences |
the recording is automatically completed and the last portion of data is sent to the recognition service. |
For example |
|
Name: Cut interrupt characters
Code: |
"Switch for the operation of removing interrupt characters from the DTMF buffer after detecting an interrupt sequence." |
Name: |
"Background playback layer (the playerId field of the background playback component launched earlier), which should be stopped when a voice is detected in the subscriber’s channel. Name: Abort when silence is detected
Code: |
Default: No" |
"Silence detection and automatic interrupt mode switch. Silence is considered to be a signal below the sensitivity threshold with a length of more than 200 ms. |
The timer starts only after a voice is detected (a signal above the sensitivity threshold lasting more than half a second |
within which signal zones below the sensitivity threshold lasting less than 200 ms can be detected). |
Name: Silence interval, s
Code: |
"Argument containing the timeout time when silence is detected in seconds. If a voice is heard 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. |
Can be specified in decimal format |
for example '1.6'. |
-dB
Code: |
|
Default: `30`" |
"Argument setting the VAD threshold. VAD detector parameter. The specified value is used with a negative sign (in decibels) to determine the silence cutoff threshold relative to the possible maximum. The stream is analyzed in 20 ms frames. Each audio frame is considered either voice or silence (the average loudness level of the frame) based on a cutoff threshold. |
Thus |
the detector has two states: voice and silence. When transitioning between states, an event is generated about the transition to another state. Initially, the detector is in a silent state. |
The generation of a voice detection signal occurs in a state of silence when several frames in a row are voice (parameter 'Voice threshold |
ms'). |
The generation of a silence detection signal occurs in the voice state after several frames in a row are recognized as silence (the 'Silence threshold |
ms' parameter). |
With a value of 30 |
the detector better detects silence; with a value of 40, the detector better detects the appearance of a voice. |
The component exits after the timeout specified in the Silence interval |
s field has expired, counting from the beginning of the silence segment detected by the detector from the voice state. |
min. duration, ms
Code: |
|
Default: `120`" |
"Argument that sets the minimum threshold VAD duration for generating the VAD UP signal. VAD detector parameter. |
To generate a signal |
several 20 ms frames in a row are required with an average level above the set VAD threshold. The specified value determines the number of frames. |
tolerance, %
Code: |
|
Default: `20`" |
"An argument that sets the permissible deviation in the sequence of voice frames. VAD detector parameter. |
For example |
the minimum duration is set to 210 (ms), deviation 20 (%). Thus, signaling the presence of voice would require a sequence of 11 frames, 9 of which would be voice frames. A value of 0 means that all 11 frames in a row must be voice (have an average level above the VAD threshold). |
min. duration, ms
Code: |
|
Default: `500`" |
"An argument that sets the minimum threshold duration of frames with silence for generating the VAD DOWN signal. VAD detector parameter. |
To generate a signal |
several 20 ms frames in a row are required with an average level below the set VAD threshold. The specified value determines the number of frames. |
tolerance, %
Code: |
|
Default: `10`" |
"An argument that sets the permissible deviation in the sequence of voice frames. VAD detector parameter. |
For example |
the minimum duration is set to 210 ms, deviation 20%. Thus, signaling the presence of voice would require a sequence of 11 frames, 9 of which would be voice frames. A value of 0 means that all 11 frames in a row must be silent (have an average level below the VAD threshold). Name: Transition
Code: |
Default: --" |
"The component to which control is transferred upon completion of the operation of typing the required number of characters." |
Name: Transition, time
Code: |
"The component to which control is transferred upon completion due to a timeout." |
Name: Transition, error
Code: |
"The component to which control is transferred when an error is detected, for example, the path to the file for streaming recording is incorrectly specified." |