Other Documentation

Wwise SDK 2022.1.8
Python (low-level) - WAMP Subscriber/Publisher

Initializing the project

Run the following command from any directory to install dependencies:

# Windows
py -m pip install autobahn
# macOS, Linux
python3 -m pip install autobahn

Project Code

Note: The line from waapi_uri import WAAPI_URI imports a declaration of the API paths.

It is located in <Wwise installation path>/SDK/include/AK/WwiseAuthoringAPI/py. The location of this file was added to Python's path dynamically by extending sys.path in this sample, but you can also copy-paste the file along-side the sample files.

Note that the additional file,, provides a special type of component which supports custom options to be sent to WAAPI. This file is provided in the sample's directory.

Python 3.7+

Locate the sample file <Wwise installation path>/SDK/samples/WwiseAuthoringAPI/python/low-level/wwise-pubsub-wamp/

This file contains the following code, which allows you to connect to the Wwise Authoring API.

import asyncio
import sys
import os
from autobahn.asyncio.wamp import ApplicationRunner
from ak_autobahn import AkComponent
# You may also copy-paste the file alongside this sample
sys.path.append(os.path.join(os.path.dirname(__file__), '../../../../../include/AK/WwiseAuthoringAPI/py'))
from waapi_uri import WAAPI_URI
done = False
class MyComponent(AkComponent):
def onJoin(self, details):
subscription = None
def on_object_created(**kwargs):
yield from subscription.unsubscribe()
result = kwargs[u"object"]
print("The object was created in the category: {}".format(result.get(u"category", "unknown")))
arguments = {
"from": {"id": [result.get(u"id")]},
"transform": [{"select": ["ancestors"]}],
"options": {
"return": ["name"]
res = yield from, **arguments)
ancestors = res.kwresults[u"return"]
print(u"Ancestor of {}:".format(result[u"id"]))
for ancestor in ancestors:
global done
if not done:
self.leave() # Disconnect
done = True
subscribe_args = {
"options": {
"return": ["id", "name", "category"]
# Subscribe to ak.wwise.core.object.created
# Calls on_object_created whenever the event is received
subscription = yield from self.subscribe(on_object_created,
print("Create an object in the Project Explorer")
def onDisconnect(self):
print("The client was disconnected.")
if __name__ == '__main__':
runner = ApplicationRunner(url=u"ws://", realm=u"get_ancestors_demo")
except Exception as e:
print(type(e).__name__ + ": Is Wwise running and Wwise Authoring API enabled?")

Running the project

Run the sample file from its directory using the following command:

Python 3.7+:

# Windows
# macOS, Linux

Create an object in the Project Explorer and the list of its ancestors will be displayed. The sample terminates the connection after the ancestors are retrieved.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise