forked from QwenLM/Qwen3-TTS
-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathstart_server.sh
More file actions
executable file
·41 lines (36 loc) · 1.29 KB
/
Copy pathstart_server.sh
File metadata and controls
executable file
·41 lines (36 loc) · 1.29 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
#!/bin/bash
# Qwen3-TTS OpenAI-Compatible API Server Startup Script
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# Set environment variables
export HOST=${HOST:-"0.0.0.0"}
export PORT=${PORT:-8880}
export WORKERS=${WORKERS:-1}
export PYTHONPATH="$SCRIPT_DIR:$PYTHONPATH"
# Check for Python virtual environment
if [ -d ".venv" ]; then
echo "Activating virtual environment..."
source .venv/bin/activate
elif [ -d "venv" ]; then
echo "Activating virtual environment..."
source venv/bin/activate
fi
# Print startup banner
echo ""
echo "░░░░░░░░░░░░░░░░░░░░░░░░"
echo ""
echo " ╔═╗┬ ┬┌─┐┌┐┌╔═╗ ╔╦╗╔╦╗╔═╗"
echo " ║═╬╡│││├┤ │││╚═╗───║ ║ ╚═╗"
echo " ╚═╝└┴┘└─┘┘└┘╚═╝ ╩ ╩ ╚═╝"
echo " "
echo " OpenAI-Compatible TTS API"
echo ""
echo "░░░░░░░░░░░░░░░░░░░░░░░░"
echo ""
echo "Starting server on http://$HOST:$PORT"
echo "API Documentation: http://$HOST:$PORT/docs"
echo "Web Interface: http://$HOST:$PORT/"
echo ""
# Start the server
uvicorn api.main:app --host "$HOST" --port "$PORT" --workers "$WORKERS"