Refactor Vosk service startup script to use start_with_deps.sh for both async and Gunicorn modes
This commit is contained in:
34
vosk/test_files/fix_flask_error.sh
Normal file
34
vosk/test_files/fix_flask_error.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Quick fix for Flask module error
|
||||
|
||||
echo "🔧 Fixing Flask module error..."
|
||||
|
||||
# Navigate to vosk_service directory
|
||||
cd ../vosk_service
|
||||
|
||||
# Make the startup script executable
|
||||
chmod +x start_with_deps.sh
|
||||
|
||||
# Install dependencies
|
||||
echo "📦 Installing dependencies..."
|
||||
pip install Flask>=2.3.0
|
||||
pip install aiohttp>=3.8.0
|
||||
pip install gunicorn>=21.0.0
|
||||
pip install vosk>=0.3.45
|
||||
pip install soundfile>=0.12.1
|
||||
pip install numpy>=1.24.0
|
||||
pip install requests>=2.31.0
|
||||
|
||||
# Test if Flask is now available
|
||||
echo "🧪 Testing Flask import..."
|
||||
python -c "import flask; print('✅ Flask imported successfully!')"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "🎯 Flask module error fixed!"
|
||||
echo "💡 You can now run the service with:"
|
||||
echo " cd vosk/vosk_service"
|
||||
echo " ./start_with_deps.sh"
|
||||
else
|
||||
echo "❌ Flask import still failing. Please check your Python environment."
|
||||
fi
|
||||
Reference in New Issue
Block a user