-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·170 lines (151 loc) · 4.69 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·170 lines (151 loc) · 4.69 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
# Main setup script for Meeting Notes AI
set -e
echo "======================================"
echo " Meeting Notes AI - Setup"
echo "======================================"
echo ""
# Check if already configured
CONFIG_FILE="$HOME/.config/meeting-notes/config.yaml"
if [ -f "$CONFIG_FILE" ]; then
echo "ℹ️ Existing configuration detected at:"
echo " $CONFIG_FILE"
echo ""
echo "⚠️ Running this setup may overwrite your current settings."
echo ""
echo "If you just want to change one setting, you can:"
echo " • Press ',' in the app to open settings"
echo " • Or manually edit: $CONFIG_FILE"
echo ""
read -p "Continue with setup anyway? (y/n): " CONTINUE_SETUP
if [ "$CONTINUE_SETUP" != "y" ] && [ "$CONTINUE_SETUP" != "Y" ]; then
echo ""
echo "Setup cancelled. No changes made."
exit 0
fi
echo ""
fi
# Detect python command
if command -v python &> /dev/null; then
PYTHON=python
else
PYTHON=python3
fi
# Check if running in virtual environment
if [ -z "$VIRTUAL_ENV" ]; then
echo "Creating virtual environment..."
$PYTHON -m venv venv
echo "Virtual environment created"
echo ""
echo "Please activate the virtual environment and run this script again:"
echo " source venv/bin/activate"
echo " ./setup.sh"
exit 0
fi
echo "Virtual environment detected: $VIRTUAL_ENV"
echo ""
# Check system dependencies
echo "Checking system dependencies..."
if ! command -v pactl &> /dev/null; then
echo "ERROR: pactl not found. Please install pulseaudio-utils:"
echo " Arch: sudo pacman -S pulseaudio-utils"
echo " Ubuntu/Debian: sudo apt install pulseaudio-utils"
exit 1
fi
if ! command -v ffmpeg &> /dev/null; then
echo "ERROR: ffmpeg not found. Please install it:"
echo " Arch: sudo pacman -S ffmpeg"
echo " Ubuntu/Debian: sudo apt install ffmpeg"
exit 1
fi
echo "System dependencies OK"
echo ""
# Install Python dependencies
echo "Installing Python dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
echo ""
echo "======================================"
echo " AI Provider Setup"
echo "======================================"
echo ""
echo "Choose your AI summarization provider:"
echo ""
echo " 1) Cloud AI (Recommended)"
echo " - Fast, high-quality summaries"
echo " - Choose: OpenAI, Anthropic, or OpenRouter"
echo " - Requires API key (~$0.01 per meeting)"
echo ""
echo " 2) Local AI (Ollama)"
echo " - Free, runs on your machine"
echo " - Requires Ollama installation"
echo " - Slower, uses system resources"
echo ""
echo " 3) Skip AI setup (transcription only)"
echo " - No summarization"
echo " - Can configure later in settings"
echo ""
while true; do
read -p "Enter choice [1-3]: " choice
case $choice in
1)
echo ""
echo "Running cloud AI setup..."
echo ""
echo "You'll choose between OpenAI, Anthropic, or OpenRouter."
echo "Note: You'll be prompted before any existing settings are changed."
echo ""
./setup_cloud.sh
break
;;
2)
echo ""
echo "Setting up local AI (Ollama)..."
echo ""
if ! command -v ollama &> /dev/null; then
echo "Ollama not found. Installing..."
curl -fsSL https://ollama.com/install.sh | sh
else
echo "Ollama already installed"
fi
echo ""
echo "Pulling recommended model (llama3.2:3b)..."
ollama pull llama3.2:3b
echo ""
echo "Local AI setup complete!"
echo ""
echo "Note: You can change the model in settings (press ',' in app)"
break
;;
3)
echo ""
echo "Skipping AI setup"
echo ""
echo "You can configure AI later by:"
echo " - Pressing ',' in the app"
echo " - Or running ./setup_cloud.sh for cloud AI"
break
;;
*)
echo "Invalid choice. Please enter 1, 2, or 3."
;;
esac
done
echo ""
echo "======================================"
echo " Setup Complete!"
echo "======================================"
echo ""
echo "To run the application:"
echo " $PYTHON run.py"
echo ""
echo "Keyboard shortcuts:"
echo " r - Start recording"
echo " s - Stop recording"
echo " , - Open settings"
echo " q - Quit"
echo ""
echo "Note: First transcription will download Whisper base model (~140MB)"
echo ""
echo "For more information, see README.md"
echo ""