Hi.
I´m trying to use the AudioPlaybackOptions function to control the barge in for my prompts.
The function is declareable in the expression field and you don´t get any errors there.
When you put in a simple function:
AudioPlaybackOptions(ToAudioNumber(4), false)
and press close you get an error saying:
"'AudioPlaybackOptions' at position 22 : Must be the last operation performed in an expression."
I have tried to change the audio to a prompt, "ToAudio()" etc but it always saying the same thing.
As a matter of fact, the AudioPlaybackOptions function can only be invoked once in your Play Audio block.
So when you use the Play Audio, and create an audio sequence (multiple TTS/prompts/Data/Expressions), the AudioPlaybackOptions is used underneath and is controlled by the Enable Barge-In checkbox.
If you click on the top right Sequence-Options icon (the one that looks like a wrench), you can see you can switch to custom expression.
You can then see the AudioPlaybackOptions being leveraged, and that the flag (true or false) matches what you have set in the Enable Barge-in checkbox.
If you want to invoke it by yourself, when adding the Play Audio block, you would then directly switch to the custom expression mode.
But as I said above, you can only invoke it once (and first function to be invoked in your expression).
If you have a set of prompts you want to play, with different barge-in values (some true, some false), you would have to leverage multiple Play Audio blocks.