Record Audio

Starts audio recording during the IVR communication process.

Starting from IBM RPA 23.0.3, this command is removed from the product. For more information, see Removed.

Important:As a result from the command's removal on IBM RPA 23.0.3, it no longer works on newer IBM RPA client versions.

Command availability: IBM RPA SaaS and IBM RPA on premises

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

ivrRecordFile [--escapedigits(String)] [--timeout(TimeSpan)] (String)=value

Input parameter

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Escape digits escapedigits Optional Text Digit to stop an already started audio recording.
Timeout timeout Optional Time Span, Number, Text Maximum time interval for audio recording.

If no value is defined in the parameter of type Timeout, the execution uses the context time defined by the Set Timeout command. If the script does not use this command, the default time is 5 seconds.

Output parameter

Designer mode label Script mode name Accepted variable types Description
Target Path value Text Returns the directory where audio is stored after recording.

Example

During the IVR communication process, the Record Audio command is used to record all interaction that occurs after its insertion into the script, and the user may be able to press an escape digit to stop audio recording.

defVar --name voiceEngine --type SpeechEngine
defVar --name language --type Language
defVar --name audioFileRecorded --type String
// Creates the vocalization and language to be used by the IVR.
googleEngine --culture "en-US" --voice "en-US-Standard-D" voiceEngine=value
createLanguage --culture "en-US" --speech ${voiceEngine} language=value
// Connects the IVR interaction interface with the user.
botConnect --type "Ivr" --language ${language} --timeout "00:02:00"
	botSay --text "Hi! For your safety this call is being recorded. To stop recording, type 1." --textformat "0"
	// Start of audio recording.
	ivrRecordFile --escapedigits 1 --timeout "00:00:10" audioFileRecorded=value
botDisconnect
Note:When you run this command using IVR type, you get prompted by a window to call the IVR. This window might show a phone number or the Zoiper QR code to calls via the Zoiper application. You see this window in debug mode in the IBM RPA Studio.

Starting from IBM RPA 23.0.3, this window isn't available due to the IVR removal. For more information, see Removed.