Playing background audio during a call
The bot can dynamically play background audio during a call.
For example, soft ambient music can be played in the background while the bot speaks, to enhance user experience.
Playing from a Remote Audio File via URL
Background audio can be streamed from a remote server by specifying the audio file URL and related parameters such as format, volume, and caching.
The audio file format must be a supported format listed below.
How do I use it?
To enable this feature, the VoiceAI Connect Administrator should configure the following parameter:
Parameter |
Type |
Description |
---|---|---|
|
Boolean |
Enables background music playback.
|
This feature is configured by the bot using the following parameters:
Parameter |
Type |
Description |
---|---|---|
String |
Defines the URL of the audio file to be played. To stop playback, set |
|
String |
Defines the format of the audio file:
|
|
Boolean |
Enables or disables caching of the audio file.
|
|
Integer |
Defines the playback volume. Range: -32 to 32 dB Default: 0 dB |
Example
The following example enables background music with a volume of -5 dB:
{ "type": "event", "name": "config", "sessionParams": { "backgroundPlayURL": "https://example.com/audio-ulaw.wav", "backgroundPlayMediaFormat": "wav/ulaw", "backgroundPlayGainDb": -5 }
Playing from Pre-recorded Tone File (PRT)
Background audio can be played using a pre-recorded tone stored on the AudioCodes SBC, configured via the backgroundTone
parameter
With this method, the bot cannot dynamically change the background audio during a call.
How do I use it?
This feature is configured by the VoiceAI Connect Administrator only, using the following bot configuration parameter:
Parameter |
Type |
Description |
---|---|---|
String |
Defines which recorded audio (user defined tone type) to play from the PRT file. The syntax is shown below: "backgroundTone": "1" (e.g., "backgroundTone": "1"is the toned defined for UserDefined_1). |