Refactor Vosk service startup script to use start_with_deps.sh for both async and Gunicorn modes
This commit is contained in:
51
vosk/vosk_service/install_deps.sh
Normal file
51
vosk/vosk_service/install_deps.sh
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Installation script for Vosk service dependencies
|
||||
|
||||
echo "🚀 Installing Vosk service dependencies..."
|
||||
|
||||
# Check if we're in the right directory
|
||||
if [ ! -f "app_optimized.py" ]; then
|
||||
echo "❌ Please run this script from the vosk_service directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
echo "📦 Installing dependencies..."
|
||||
|
||||
# Core dependencies
|
||||
pip install vosk>=0.3.45
|
||||
pip install Flask>=2.3.0
|
||||
pip install soundfile>=0.12.1
|
||||
|
||||
# Async dependencies
|
||||
pip install aiohttp>=3.8.0
|
||||
pip install asyncio-throttle>=1.0.0
|
||||
|
||||
# Production server
|
||||
pip install gunicorn>=21.0.0
|
||||
|
||||
# Additional dependencies
|
||||
pip install numpy>=1.24.0
|
||||
pip install requests>=2.31.0
|
||||
|
||||
echo "✅ Dependencies installed successfully!"
|
||||
|
||||
# Test imports
|
||||
echo "🧪 Testing imports..."
|
||||
python -c "
|
||||
try:
|
||||
import flask
|
||||
import aiohttp
|
||||
import gunicorn
|
||||
import vosk
|
||||
import soundfile
|
||||
import numpy
|
||||
import requests
|
||||
print('✅ All modules imported successfully!')
|
||||
except ImportError as e:
|
||||
print(f'❌ Import error: {e}')
|
||||
exit(1)
|
||||
"
|
||||
|
||||
echo "🎯 Vosk service is ready to run!"
|
||||
Reference in New Issue
Block a user