Play Sound
Plays the sound of a .wav or Windows™ audio file.
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.
playSound --method(PlaySoundMethod) --item(PlaySoundItem) --file(String)
Input parameters
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 |
---|---|---|---|---|
Sound Type | method |
Required |
PlaySoundMethod |
The File type accepts a .wav file from your computer. The Windows type uses one of the operating system's default sounds. |
Sound | item |
Only when Sound Type is Windows |
PlaySoundItem |
Sound types from Windows: Asterisk, Beep, Exclamation, Hand, and Question. |
File | files |
Only when Sound Type is File |
Text |
The file path. It must have extension .wav . |
Example
The following example uses the command to play the Windows's beep sound.
playSound --method "Windows" --item "Beep"
Limitations
The command does not support files with libavformat 58.29.100. As a workaround, you can convert the file to use another .wav
file encoding.