|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Namespaces | |
| namespace | client |
| namespace | http |
| namespace | remote_module |
| namespace | stats |
| namespace | transports |
Psyclone client for Python: talk to a running Psyclone system from outside it.
Post messages into the system by **post name** and receive what its triggers send out by **trigger
name**, over UDP, TCP or WebSocket, with CMSDK DataMessages (byte-identical to the C++ library, in the
full or the packed form). Pure Python, standard library only; Python 3.8+ on any OS.
from psyclone_client import PsycloneClient, DataMessage
with PsycloneClient.websocket("ws://host:18600/phone", device="py-1") as psy:
psy.on_trigger("Playout", lambda m: print(m.get_string("Text")))
psy.post("AudioFrame", DataMessage().set_data("audio", b"..."))
reply = psy.request("Question", DataMessage().set_string("Text", "hi"), timeout=3)