diff options
| author | yum <yum.food.vr@gmail.com> | 2022-11-23 12:24:07 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-11-23 12:25:05 -0800 |
| commit | ae9ac5ba5942447f47d8d996d2d340381e730c33 (patch) | |
| tree | 9f59a4f51587584d34b7d183cfef9eae51a50bfd /transcribe.py | |
| parent | 9f87674d1b484a2e61e87ad53d8ebcf9985dce6b (diff) | |
Tweak speech indicator
Use a single indicator with 3 states:
1. green: actively speaking
2. orange: waiting for paging
3. red: up-to-date
Use slightly nicer colors.
Diffstat (limited to 'transcribe.py')
| -rw-r--r-- | transcribe.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/transcribe.py b/transcribe.py index b316014..48a97ba 100644 --- a/transcribe.py +++ b/transcribe.py @@ -288,8 +288,9 @@ def sendAudio(audio_state): audio_state.transcribe_lock.acquire() text = audio_state.committed_text + " " + audio_state.text - is_paging = not osc_ctrl.sendMessageLazy(audio_state.osc_client, text, + ret = osc_ctrl.sendMessageLazy(audio_state.osc_client, text, audio_state.tx_state) + is_paging = (ret == osc_ctrl.SEND_MSG_LAZY_SENT_NON_EMPTY) osc_ctrl.indicatePaging(audio_state.osc_client, is_paging) audio_state.transcribe_lock.release() @@ -301,12 +302,15 @@ def readControllerInput(audio_state): RECORD_STATE = 0 PAUSE_STATE = 1 state = PAUSE_STATE + osc_ctrl.indicateSpeech(audio_state.osc_client, False) + osc_ctrl.indicatePaging(audio_state.osc_client, False) while audio_state.run_app == True: time.sleep(0.05) event = steamvr.pollButtonPress(session) if event == steamvr.EVENT_RISING_EDGE: + print("event get") if state == RECORD_STATE: state = PAUSE_STATE osc_ctrl.indicateSpeech(audio_state.osc_client, False) |
