Playing filler audio while non-messaging nodes are processing

First, it is best for us to host this audio on your own servers to make sure the link does not go down. Please also note that you own the rights to any audio used or that the audio is royalty/copyright free.

In the dialog where you want to filler audio to start, create a message node to add an audio file in the IVR responses section:

Example audio used: https://www.fesliyanstudios.com/play-mp3/773

As it is right now, it will start to play the audio file, and then halt on the next entity node that explicitly asks for input from the user. It will then wait until the audio file is finished before prompting the message to user.

We do not want this; we want the audio file to stop playing immediately when it reaches the next node that outputs a message to the chat.

So, we create another message node right before a node which have (requires) a user prompt message:

This “endaudio” message node sends a Javascript message to the IVR-Audiocodes channel. This JS message stops any message that is currently being played, including the audio file we are playing. This will make the audio file end whenever this endaudio node is reached.

The JS code used here is:

var message ={
"activities": [
{
"type": "event",
"name": "abortPrompts",
"timestamp":new Date().toISOString(),
"id":new Date().getTime()
}
]
};

print(JSON.stringify(message));

Check this out!!!

1 Like

Hello, we have this same problem. The JS message to stop the audio file we are playing does not work for us. Simply, the 19 seconds of audio are always played. What could be the problem?
image

Hello Maria,

Please find the below article for the reported issue, this will be helpful for you.

Thank you,
Srujan Madderla
Kore.ai Community Team

1 Like