morshu-server: use resolved absolute paths and pass env properly
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
|
||||
echo "🗣️ Starting Morshu TTS Server..."
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# Check if python3 is available
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
@@ -22,12 +23,13 @@ for pkg in pydub nltk g2p_en numpy; do
|
||||
done
|
||||
|
||||
# Check if the morshu wav file exists
|
||||
if [ ! -f "../morshutalk_morshu.wav" ]; then
|
||||
if [ ! -f "$SCRIPT_DIR/../morshutalk_morshu.wav" ]; then
|
||||
echo "❌ Error: morshutalk_morshu.wav not found in parent directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start the server
|
||||
echo "✅ Starting server on port ${PORT:-3002}..."
|
||||
export PORT="${PORT:-3002}"
|
||||
echo "✅ Starting server on port $PORT..."
|
||||
echo "🗣️ Using MorshuTalk engine"
|
||||
exec python3 server.py
|
||||
exec python3 "$SCRIPT_DIR/server.py"
|
||||
|
||||
Reference in New Issue
Block a user