Please be advised that the Audiokinetic offices will close at 3:00 p.m. EST on December 23rd, 2019 for the holiday period, and will reopen on January 3rd, 2020 at 9:00 a.m. EST. Learn more.

Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Issues with generating soundbanks via python waapi

0 votes
We are integrating wwise authoring in our python/flask based web app through waapi-client-python, and I'm trying to figure out the best way to generate the soundbanks after edits have been made. There's several issues:

1) it seems generating soundbanks through waapi is only possible via the ak.wwise.ui.commans.execute command, which needs the full-blown UI editor to be launched. Our intent was to use the lean waapi CLI host, but this is not a strict necessity
2) when we are using the above command, the waapi client's web socket times out after ~15 seconds which throws an error. The soundbank generation continues in the UI, but we have no way of knowing when it is done.
3) I considered alternatively to do the soundbank generation via the command line directly without waapi - but this scenario has the issue that the wwise cli warns that it is a bad idea to run multiple instances for the same project - and we already have a cli running permanently as waapi host for regular requests.

Any ideas for a good solution here?
asked Nov 8 in General Discussion by Maarten D. (100 points)

1 Answer

+1 vote

1) Coming in Wwise 2019.2, we will add support for generating soundbanks through dedicated WAAPI function, in CLI and UI modes. For 2019.1, you will need to rely on ak.wwise.ui.commans.execute.

2) This is a very unfortunate issue. There must be a timeout in our python waapi client. We will create an issue on our side. If you are interested to investigate, the sources are here: https://github.com/audiokinetic/waapi-client-python

3) Yes, it is possible to run into issues when running multiple instances of wwise on the same project because there are shared resources that could get corrupted, especially during conversion and soundbank generation.

answered Nov 12 by Bernard R. (Audiokinetic) (27,510 points)
Thanks for replying!

- Happy to hear that 2019.2 will have a dedicated function for this!
- In the mean time, I have found the source of the timeouts and can work around this. In the autobahn module, the wamp client transport factory has an autoping interval of 10 second & timeout of 5 seconds - see https://autobahn.readthedocs.io/en/latest/_modules/autobahn/asyncio/wamp.html . I suspect the client gets no ping reply when this command is executed, which disconnects the client. Increasing these autoping values allow me to finish long runs.
I can confirm that with a custom autobahn branch where the autoping timeouts are removed, we obtain the desired behavior.

One snag is that the full editor blocks on a popup when it detects changes on disk, after which API calls are denied until the popup is confirmed; this makes it less ideal as an API host.

Is there an ETA on 2019.2 ?
You might want to try ak.wwise.debug.enableAutomationMode if you wish to avoid any popup to show-up.

https://www.audiokinetic.com/library/edge/?source=SDK&id=ak_wwise_debug_enableautomationmode.html

ETA for 2019.2 is end of January
...