Fix socket read stream crashes and NameError on boot

This commit is contained in:
Adolfo Reyna
2026-06-18 11:35:06 -04:00
parent 5968b4934d
commit d0fcc5fc7b
4 changed files with 208 additions and 110 deletions
+5 -3
View File
@@ -10,7 +10,9 @@ import wave
import time
# Default ESP32 IP
ESP32_IP = "192.168.68.122"
ESP32_IP = "192.168.68.124"
if len(sys.argv) > 1:
ESP32_IP = sys.argv[1]
PORT = 80
URL = f"http://{ESP32_IP}:{PORT}/api/mcp"
@@ -268,7 +270,7 @@ def main():
while True:
print("\nReady for command. Choose an option:")
print(" [Enter] Record a voice command (4 seconds) on the board")
print(" [Enter] Record a voice command (10 seconds) on the board")
print(" [t] Type a text command manually")
print(" [q] Quit")
@@ -284,7 +286,7 @@ def main():
continue
else:
# Voice recording path
duration = 4
duration = 10
pcm_filename = "recording.pcm"
wav_filename = "temp_recording.wav"