AudioPlaybackOptions is not usable i Architect

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.

Please guide me how I can use this function.

Hello,

You have this error because the AudioPlaybackOptions function is to be used in a custom expression in the "Play Audio" block.
See the "Use expressions in task editor actions to prevent barge-in" section in this page which mentions the custom expression.

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.

Hope this clarifies.

Regards,

Thanks Jerome.
That button (the wrench) was well hidden :slight_smile:
This solved it.

Indeed - I had difficulty to find/understand it myself - as I only used AudioPlaybackOptions function few times and that was long time ago :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.