-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-with-audio.fish
More file actions
executable file
Β·40 lines (32 loc) Β· 998 Bytes
/
start-with-audio.fish
File metadata and controls
executable file
Β·40 lines (32 loc) Β· 998 Bytes
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
#!/usr/bin/env fish
# Start Flask Translation Server and Next.js Dev Server
echo "π Starting Hellowbot with Audio Translation..."
echo ""
# Check if Python is available
if not command -v python3 &> /dev/null
echo "β Python3 is not installed. Please install Python 3.8 or higher."
exit 1
end
# Check if Node.js is available
if not command -v node &> /dev/null
echo "β Node.js is not installed. Please install Node.js."
exit 1
end
# Start Flask server in background
echo "π‘ Starting Flask translation server..."
cd hintoeng
venv/bin/python app.py &
set FLASK_PID $last_pid
cd ..
# Wait for Flask server to start
echo "β³ Waiting for Flask server to initialize..."
sleep 3
# Start Next.js dev server
echo "π Starting Next.js development server..."
echo ""
echo "π± Chat interface: http://localhost:3000/chat"
echo "π€ Click the microphone icon to record and translate audio"
echo ""
npm run dev
# Cleanup: Kill Flask server when Next.js exits
kill $FLASK_PID