File size: 1,086 Bytes
aad9d66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

# Pre-startup script for HuggingFace Spaces
# This runs before the main application

echo "πŸš€ Initializing Music Generation Studio..."

# Verify espeak-ng installation
if command -v espeak-ng &> /dev/null; then
    echo "βœ… espeak-ng is installed"
    espeak-ng --version
else
    echo "❌ espeak-ng not found"
    exit 1
fi

# Verify ffmpeg
if command -v ffmpeg &> /dev/null; then
    echo "βœ… ffmpeg is installed"
    ffmpeg -version | head -1
else
    echo "❌ ffmpeg not found"
fi

# Create necessary directories
mkdir -p outputs/music
mkdir -p outputs/mixed
mkdir -p models
mkdir -p logs

echo "βœ… Directories created"

# Check Python version
python --version

# Verify key dependencies
echo "πŸ“¦ Verifying Python packages..."
python -c "import torch; print(f'βœ… PyTorch {torch.__version__}')" || echo "❌ PyTorch not found"
python -c "import gradio; print(f'βœ… Gradio {gradio.__version__}')" || echo "❌ Gradio not found"
python -c "import phonemizer; print('βœ… phonemizer OK')" || echo "❌ phonemizer not found"

echo "βœ… Pre-startup checks complete"