If we would like to play multiple audios in sequence in a single playAudio action node, do we have to use expression to build the audio sequence?
[CK]: It's hard to build expression because typeahead doesn't work when you try to playback some system prompt.
How do we enable/disable barge-in in playAudio action node?
On a side note, it's good to have PureCloud functions available in typeahead when we build the expressions in VS Code.
Yes, for multiple audio sequences in a single play audio action you will have to use an expression to build the audio sequence.
To enable/disable barge-in, you need to use an expression. It set by using the AudioPlaybackOptions function in the expression. Here is an example of enabling barge-in on an expression.
AudioPlaybackOptions(ToAudioTTS("Hello, this audio playback allows for barge."), true)
You can find out more by using the Expression Help within Architect. Some things to note around the AudioPlaybackOptions function:
Boolean bargeIn : Whether or not to allow barge-in by DTMF or speech recognition during the audio playback.
NOT_SET is not allowed
Must be a literal value.
Usage Restrictions
When used in an expression, this must be the last operation specified in the expression text to be valid.
Also, since we do not create JSON Schemas for expressions within Architect, there is no data for the typeahead plugin to use. You can always create an expression within a flow in the Architect UI and copy it to your YAML file as well.
This is actually a bug we also just recently found and will be fixed in the next release of Archy. We plan on releasing the new version soon, as it just requires a little more testing yet. Thanks for reporting this issue though!
We just released Archy version 0.2.2 which has the fix for the callTask action. We have updated the JSON schema files so the typeahead plugin should be picking up the new targetTaskRef property and you should be able to set this value now as well.