Sound Events in Rules
- 03 Nov 2020
- 1 Minute to read
- Contributors
- Print
- DarkLight
Sound Events in Rules
- Updated on 03 Nov 2020
- 1 Minute to read
- Contributors
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Sound Events in Java Rules
Sounds can be added in Java rules. Create a SoundEvent
and add it to DialogWorkspace
. A sound will be played according to severity assuming no other sounds with higher severity are added.
Example
private void createSound(String soundName) {
SoundEvent soundEvent = new SoundEvent(SoundEvent.SEV_INFO);
soundEvent.setSoundName(soundName);
dialogWorkspace.setSoundEvent(soundEvent);
}
Sound Events in Java Dynamic Rules
Sounds can also be added in Java dynamic rules. Use the same approach as in regular Java rules; create a SoundEvent
and add it toDialogWorkspace
.
Was this article helpful?