summaryrefslogtreecommitdiffstats
path: root/osc_ctrl.py
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-11-22 15:36:19 -0800
committeryum <yum.food.vr@gmail.com>2022-11-22 18:13:18 -0800
commitbd8b63a357bb374f5875f0fedf2d677589419810 (patch)
tree0bb804459ebb7ad50e2a817bd842afd946339b30 /osc_ctrl.py
parent27a67666c320bed3b4a18e415eb9702b03f8f0b5 (diff)
Rework input controls
Press joystick once to start recording, again to stop. When you start recording, any previous text on the board is cleared. Add 2 visual indicators: one to indicate speech, another to indicate that audio is paging.
Diffstat (limited to 'osc_ctrl.py')
-rw-r--r--osc_ctrl.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/osc_ctrl.py b/osc_ctrl.py
index be853dc..ea0c145 100644
--- a/osc_ctrl.py
+++ b/osc_ctrl.py
@@ -292,6 +292,14 @@ def clear(client, tx_state):
tx_state.last_msg_encoded = []
+def indicateSpeech(client, is_speaking: bool):
+ addr = "/avatar/parameters/" + generate_utils.getIndicator0Param()
+ client.send_message(addr, is_speaking)
+
+def indicatePaging(client, is_paging: bool):
+ addr = "/avatar/parameters/" + generate_utils.getIndicator1Param()
+ client.send_message(addr, is_paging)
+
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-i", default="127.0.0.1", help="OSC server IP")