-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (47 loc) · 1.49 KB
/
setup.sh
File metadata and controls
executable file
·55 lines (47 loc) · 1.49 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
#!/bin/bash
# VibeMic Native — setup script for Ubuntu
set -e
echo "=== VibeMic Native Setup ==="
# System dependencies
echo "Installing system dependencies..."
sudo apt-get update -qq
sudo apt-get install -y -qq sox libsox-fmt-all xdotool xclip libnotify-bin python3-tk
# Python dependencies
echo "Installing Python packages..."
pip3 install --user openai pystray pynput Pillow
# Create .env if missing
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
if [ ! -f "$SCRIPT_DIR/.env" ]; then
cp "$SCRIPT_DIR/.env.example" "$SCRIPT_DIR/.env"
echo ""
echo "⚠️ Created .env — edit it and add your OpenAI API key:"
echo " $SCRIPT_DIR/.env"
fi
# Make executable
chmod +x "$SCRIPT_DIR/vibemic.py"
# Desktop entry for autostart / app launcher
DESKTOP_FILE="$HOME/.local/share/applications/vibemic.desktop"
mkdir -p "$(dirname "$DESKTOP_FILE")"
cat > "$DESKTOP_FILE" << EOF
[Desktop Entry]
Type=Application
Name=VibeMic
Comment=Voice-to-text — Press PgDn to record
Exec=python3 $SCRIPT_DIR/vibemic.py
Icon=audio-input-microphone
Terminal=false
Categories=Utility;Audio;
StartupNotify=false
EOF
# Autostart entry (optional)
AUTOSTART_DIR="$HOME/.config/autostart"
mkdir -p "$AUTOSTART_DIR"
cp "$DESKTOP_FILE" "$AUTOSTART_DIR/vibemic.desktop"
echo ""
echo "✅ Setup complete!"
echo ""
echo "To run: python3 $SCRIPT_DIR/vibemic.py"
echo "To find: Search 'VibeMic' in your app launcher"
echo "Autostart: Enabled (runs on login)"
echo ""
echo "Usage: Press PgDn to start recording, PgDn again to stop & type."