-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
79 lines (63 loc) · 2.06 KB
/
setup.sh
File metadata and controls
79 lines (63 loc) · 2.06 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
echo "=========================================="
echo " Truth-Lens Setup Script"
echo "=========================================="
echo ""
# Check Python version
python_version=$(python3 --version 2>&1 | awk '{print $2}')
echo "✓ Python version: $python_version"
# Create virtual environment
echo ""
echo "Creating virtual environment..."
python3 -m venv venv
source venv/bin/activate
# Upgrade pip
echo ""
echo "Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo ""
echo "Installing dependencies..."
pip install -r requirements.txt
# Create directories
echo ""
echo "Creating project directories..."
mkdir -p data/raw/real data/raw/fake data/processed data/models logs temp .cache
# Create sample data structure file
cat > data/README.md << 'DATAREADME'
# Data Directory Structure
## Organization
```
data/
├── raw/
│ ├── real/ # Place authentic human speech samples here
│ └── fake/ # Place AI-generated speech samples here
├── processed/ # Preprocessed features (auto-generated)
└── models/ # Trained model files (auto-generated)
```
## Dataset Preparation
1. Download audio files (WAV or MP3 format)
2. Organize into `real/` and `fake/` folders
3. Ensure balanced dataset (similar number of files in each)
### Recommended Datasets
- **ASVspoof 2019 LA**: https://www.asvspoof.org/
- **Fake-or-Real (FoR)**: Available on Kaggle
- **Generate your own**: Use ElevenLabs, Resemble.ai, or other TTS services
## Quick Start
Minimum dataset size for hackathon demo:
- 100 real audio files
- 100 fake audio files
- Each file: 3-10 seconds duration
DATAREADME
echo ""
echo "=========================================="
echo " Setup Complete!"
echo "=========================================="
echo ""
echo "Next steps:"
echo " 1. Activate environment: source venv/bin/activate"
echo " 2. Add audio files to data/raw/real and data/raw/fake"
echo " 3. Train model: python src/train.py"
echo " 4. Start API: python src/api/app.py"
echo " 5. Open frontend: http://localhost:3000"
echo ""