Enhance batch_confirm_hf_optimized.py to ensure torchcodec is installed before loading the dataset, and update requirements_optimized.txt to include torchcodec. Modify run_optimized_192cores_no_root.sh to install additional audio dependencies and test audio imports.
This commit is contained in:
31
vosk/test_files/fix_torchcodec.sh
Normal file
31
vosk/test_files/fix_torchcodec.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user