-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_web_interface.py
More file actions
66 lines (57 loc) · 2.1 KB
/
Copy pathdebug_web_interface.py
File metadata and controls
66 lines (57 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python3
"""
Debug the web interface microphone issue
"""
import webbrowser
import time
def main():
print("🌐 JAI Web Interface Debug")
print("=" * 50)
print("📋 Checking web interface setup...")
# Check if web server is running
try:
import requests
response = requests.get("http://localhost:3000", timeout=5)
if response.status_code == 200:
print("✅ Web server running on port 3000")
else:
print(f"❌ Web server error: {response.status_code}")
except:
print("❌ Web server not running on port 3000")
return
# Check if JAI server is running
try:
response = requests.get("http://localhost:8080/healthz", timeout=5)
if response.status_code == 200:
print("✅ JAI server running on port 8080")
else:
print(f"❌ JAI server error: {response.status_code}")
except:
print("❌ JAI server not running on port 8080")
return
print("\n🔧 Troubleshooting Steps:")
print("1. Open browser to: http://localhost:3000")
print("2. Press F12 to open Developer Tools")
print("3. Click Console tab")
print("4. Click the microphone button")
print("5. Check for any error messages in console")
print("\n🎯 Expected Behavior:")
print("- Button should turn red when recording")
print("- Status should show 'Recording...'")
print("- After stopping, should show 'Processing...'")
print("- Then show response from JAI")
print("\n⚠️ Common Issues:")
print("- Microphone permission denied")
print("- Browser blocking microphone access")
print("- API endpoint mismatch")
print("- JavaScript errors")
# Open browser automatically
try:
print("\n🌐 Opening web interface...")
webbrowser.open("http://localhost:3000")
print("✅ Browser opened to http://localhost:3000")
except Exception as e:
print(f"❌ Could not open browser: {e}")
print("Please manually open: http://localhost:3000")
if __name__ == "__main__":
main()