Fix socket read stream crashes and NameError on boot
This commit is contained in:
+5
-3
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user