-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·58 lines (51 loc) · 2.06 KB
/
install.sh
File metadata and controls
executable file
·58 lines (51 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
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "🎙 whisp installer"
echo "────────────────────────"
# Check Python version
python3 -c "import sys; assert sys.version_info >= (3, 9), 'Python 3.9+ required'" 2>/dev/null || {
echo "❌ Python 3.9+ is required"
exit 1
}
# System dependencies for audio capture
if [[ "$OSTYPE" == "darwin"* ]]; then
echo " macOS detected — PortAudio should be available via system frameworks."
echo " If you get audio errors, run: brew install portaudio"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo " Linux detected — ensuring PortAudio is available..."
if command -v apt-get &>/dev/null; then
sudo apt-get install -y portaudio19-dev python3-dev 2>/dev/null || true
elif command -v dnf &>/dev/null; then
sudo dnf install -y portaudio-devel python3-devel 2>/dev/null || true
fi
fi
# Create venv
echo " Creating virtual environment..."
python3 -m venv .venv
source .venv/bin/activate
# Install deps
echo " Installing Python dependencies..."
pip install --upgrade pip -q
pip install -r requirements.txt -q
# Create whisp symlink
echo " Creating whisp symlink..."
chmod +x "$SCRIPT_DIR/whisp"
if [ -w /usr/local/bin ]; then
ln -sf "$SCRIPT_DIR/whisp" /usr/local/bin/whisp
echo " Symlinked: /usr/local/bin/whisp -> $SCRIPT_DIR/whisp"
else
echo " Note: Cannot write to /usr/local/bin. To add whisp to PATH, run:"
echo " sudo ln -sf \"$SCRIPT_DIR/whisp\" /usr/local/bin/whisp"
fi
echo ""
echo "✅ Installation complete!"
echo ""
echo "Usage:"
echo " whisp # Record + enrich + index"
echo " whisp -o ~/my-repo/notes # Custom output dir"
echo " whisp --model small.en # Better accuracy"
echo " whisp --list-devices # Show mic options"
echo " whisp --no-post-process # Skip AI enrichment"
echo " whisp --no-index # Skip bryanbot indexing"
echo ""