-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·65 lines (56 loc) · 1.75 KB
/
setup.sh
File metadata and controls
executable file
·65 lines (56 loc) · 1.75 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
#!/bin/bash
set -e
echo "=== Music Reels Generator - Setup ==="
echo ""
# Check for Homebrew
if ! command -v brew &> /dev/null; then
echo "ERROR: Homebrew not found. Install from https://brew.sh"
exit 1
fi
echo "✓ Homebrew found"
# Install FFmpeg
if command -v ffmpeg &> /dev/null; then
echo "✓ FFmpeg found: $(which ffmpeg)"
else
echo "Installing FFmpeg..."
brew install ffmpeg
echo "✓ FFmpeg installed"
fi
# Install whisper-cpp
if command -v whisper-cpp &> /dev/null; then
echo "✓ whisper-cpp found: $(which whisper-cpp)"
else
echo "Installing whisper-cpp..."
brew install whisper-cpp
echo "✓ whisper-cpp installed"
fi
# Download whisper model if not present
MODEL_DIR="$HOME/.local/share/whisper-cpp/models"
MODEL_FILE="$MODEL_DIR/ggml-medium.bin"
if [ -f "$MODEL_FILE" ]; then
echo "✓ Whisper model found: $MODEL_FILE"
else
echo "Downloading whisper medium model (1.5 GB)..."
mkdir -p "$MODEL_DIR"
# Try using whisper-cpp's download script if available
if command -v whisper-cpp-download-ggml-model &> /dev/null; then
whisper-cpp-download-ggml-model medium "$MODEL_DIR"
else
# Direct download
curl -L "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-medium.bin" \
-o "$MODEL_FILE" \
--progress-bar
fi
if [ -f "$MODEL_FILE" ]; then
echo "✓ Whisper model downloaded"
else
echo "WARNING: Could not download model. You'll need to manually download ggml-medium.bin to $MODEL_DIR"
fi
fi
echo ""
echo "=== Setup Complete ==="
echo ""
echo "To build and run:"
echo " Option 1 (Xcode): open MusicReelsGenerator.xcodeproj"
echo " Option 2 (CLI): swift build && .build/debug/MusicReelsGenerator"
echo ""