I wonder whether it is possible to refresh through script the mp3/wav files that are added to the soundboard control for an EZ-B v4 in EZ Builder. Right now it seems that the only way to refresh the file is to do it manually through EZ Builder.
My A.I. software (which is exogenous to EZ Builder) generates mp3/wav files for speech synthesis, and I basically want a script to play the latest version of the 'saythisnext.mp3' file that I store locally. I could not find anything in the learning sections or script help inside EZ Builder.
Before people kindly point me to the text-to-speech options in EZ-Builder: I want to make use of Ivona's developers cloud service so that I may also use for instance the Speech Synthesis Markup Language. Though I may switch to other tts options that allow markup for emotional intonation. In any case, I end up with a music file that I want to play.
Thanks in advance!
Upgrade to ARC Pro
Your robot can be more than a simple automated machine with the power of ARC Pro!
Optionally, if you're capable of C# programming - can provide the details necessary to create a plugin that either populates the soundboard -or performs soundboard functions that you require.
I think a plugin that populates the soundboard is the best course of action if your needs are to use the EZB speaker. Otherwise, using the file system works for PC speaker.
I do want the EZB to play the file. The plugin seems to be the best option. I trust that I'll manage C#. I just found the resources on how to make plugins so I'll let you know if I run into trouble. I need a bit of time to get familiar with API etc.
Will report back!
If your external Ai software has a link with the Ivona's cloud service, does it also have a link to ARC to get data and send data? If so, you'd want to set some sort of change variable to let ARC know the mp3 file was updated then put the play mp3 code into a loop to watch for a change of the variable and if there is a change then play your mp3.
In case you're curious; Ivona has a Java API. I have my core A.I. running in Java as well which communicates through tcp and telnet with ARC. The project is slowly becoming a mumbo-jumbo of applications, Ivona, Dragon Naturally Speaking, ARC, my Java agent platform and a Prolog based ontology system. I use webinterfaces between all of them.
@All, So you can't script playing a sound file through the EZ-B currently? I guess I did not know this.
You can, but only if the sound file has been installed in the EZ-B v4 Soundboard object. You can't just play a file directly.
Since the script language has a function for calling external programs, you can still use a script to determine when the file will play and what file it should be.
@DJSures I managed to get quite far (the plugin tutorial rocks, and thanks for the demo code!). The only thing that bugs me is:
I tried to find a way to do something like:
That will extract the entire configuration data of the soundboard. All sounds and respective data are in the SoundBoardList array. Change out the index with the new configuration. And finally, set the configuration back into the control.