31 lines
802 B
Bash
31 lines
802 B
Bash
#!/bin/bash
|
|
|
|
# Fix torchcodec dependency issue
|
|
|
|
echo "🔧 Fixing torchcodec dependency..."
|
|
|
|
# Activate virtual environment if it exists
|
|
if [ -d ".venv" ]; then
|
|
echo "🔧 Activating virtual environment..."
|
|
source .venv/bin/activate
|
|
fi
|
|
|
|
# Install torchcodec
|
|
echo "📦 Installing torchcodec..."
|
|
uv pip install torchcodec>=0.1.0
|
|
|
|
# Also install other audio-related dependencies
|
|
echo "📦 Installing additional audio dependencies..."
|
|
uv pip install librosa>=0.10.0
|
|
uv pip install ffmpeg-python>=0.2.0
|
|
|
|
# Test the import
|
|
echo "🧪 Testing audio imports..."
|
|
python test_audio_deps.py
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "🎯 torchcodec dependency fixed!"
|
|
echo "💡 You can now run the optimized processing script."
|
|
else
|
|
echo "❌ Failed to install torchcodec. Please check your system."
|
|
fi |