From 7cdebdc8f84ca7be86177d12547e500e8b81a42b Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 19 Feb 2026 07:02:52 +0000 Subject: [PATCH] server_microphone.py aktualisiert --- server_microphone.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/server_microphone.py b/server_microphone.py index f3649d9..326f1c0 100644 --- a/server_microphone.py +++ b/server_microphone.py @@ -63,14 +63,14 @@ async def run_test(): pixels.off() avm_sid.lights_off() run_stop_only_once_flag = False - if "wand" in finalResult and "an" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + if "vogel" in finalResult and "an" in finalResult and activation_word in finalResult and run_stop_only_once_flag: print("SCHALTER EIN!") pixels.think() time.sleep(1) pixels.off() avm_sid.table_on() run_stop_only_once_flag = False - if "wand" in finalResult and "aus" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + if "vogel" in finalResult and "aus" in finalResult and activation_word in finalResult and run_stop_only_once_flag: print("SCHALTER AUS!") pixels.think() time.sleep(1) @@ -123,18 +123,30 @@ async def run_test(): pixels.off() subprocess.Popen(["sh", "/home/pi/tagesschau/start_platt.sh"]) run_stop_only_once_flag = False - if "nova" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + if "nova" in finalResult and "leise" in finalResult and activation_word in finalResult and run_stop_only_once_flag: pixels.think() time.sleep(1) pixels.off() subprocess.Popen(["sh", "/home/pi/radio/start_nova.sh"]) run_stop_only_once_flag = False - if "funk" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + if "funk" in finalResult and "leise" in finalResult and activation_word in finalResult and run_stop_only_once_flag: pixels.think() time.sleep(1) pixels.off() subprocess.Popen(["sh", "/home/pi/radio/start_dlf.sh"]) run_stop_only_once_flag = False + if "nova" in finalResult and "laut" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + pixels.think() + time.sleep(1) + pixels.off() + subprocess.Popen(["sh", "/home/pi/radio/start_nova_loud.sh"]) + run_stop_only_once_flag = False + if "funk" in finalResult and "laut" in finalResult and activation_word in finalResult and run_stop_only_once_flag: + pixels.think() + time.sleep(1) + pixels.off() + subprocess.Popen(["sh", "/home/pi/radio/start_dlf_loud.sh"]) + run_stop_only_once_flag = False if ("stop" in finalResult or "stopp" in finalResult) and activation_word in finalResult and run_stop_only_once_flag: pixels.think() time.sleep(1)