Skip to content

Commit

Permalink
play bell sounds asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
Jef808 committed Feb 5, 2024
1 parent c3d7a2e commit 7ee2b92
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 161 deletions.
7 changes: 2 additions & 5 deletions listener/listener_with_wake_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pvporcupine
import pvrecorder
import socket
import subprocess
import sys

PROJECT_ROOT = Path(os.getenv('PROJECT_ROOT'))
Expand Down Expand Up @@ -68,7 +69,7 @@ def recorder_context_manager(device_index, frame_length):

def play_sound(wav_file):
"""Play a ding sound to indicate that the wake word was detected."""
os.system(f"aplay {wav_file}")
subprocess.Popen(["aplay", str(wav_file)])


def main():
Expand All @@ -80,10 +81,6 @@ def main():
sensitivities = [0.1] * len(keyword_paths)
device_index = -1
frame_length = 512

def console_status(flag):
return 'Listening for wake word' if not flag else 'Transcribing'

client = None

try:
Expand Down
77 changes: 0 additions & 77 deletions make-prompt/make_prompt.py

This file was deleted.

76 changes: 0 additions & 76 deletions make-prompt/shell.py

This file was deleted.

3 changes: 0 additions & 3 deletions speech-command

This file was deleted.

0 comments on commit 7ee2b92

Please sign in to comment.