diff options
| author | yum <yum.food.vr@gmail.com> | 2022-11-25 17:57:42 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-11-25 17:57:42 -0800 |
| commit | 89a929fe76e4dbd56436288055366d9416c13e74 (patch) | |
| tree | 4ac046c405a7f790bfb3cff42daec86c56a9ab9a /transcribe.py | |
| parent | bf213509f7811e096b9d850999aaf54d18324eec (diff) | |
Add on/off sound indicator (local)
Now we have a visual and auditory indicator for transcription. The
auditory indicator is only heard by the user, and can be used to reset
the state of the board prior to displaying.
Diffstat (limited to 'transcribe.py')
| -rw-r--r-- | transcribe.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/transcribe.py b/transcribe.py index 48a97ba..f9aee9f 100644 --- a/transcribe.py +++ b/transcribe.py @@ -13,6 +13,9 @@ from pydub import effects as pydub_effects # License: MIT. import pyaudio import numpy as np +# python3 -m pip install playsound==1.2.2 +# License: MIT. +from playsound import playsound import steamvr import string_matcher import sys @@ -314,11 +317,13 @@ def readControllerInput(audio_state): if state == RECORD_STATE: state = PAUSE_STATE osc_ctrl.indicateSpeech(audio_state.osc_client, False) + playsound(os.path.abspath("Sounds/Noise_Off.wav")) audio_state.audio_paused = True elif state == PAUSE_STATE: state = RECORD_STATE osc_ctrl.indicateSpeech(audio_state.osc_client, True) + playsound(os.path.abspath("Sounds/Noise_On.wav")) audio_state.transcribe_lock.acquire() audio_state.audio_lock.acquire() |
