Files
InterviewAI/setup.py
Charles Wambua dba78a2766 Improve question detection, capture stealth, latency; stop tracking model binaries
- Detection: broaden request-starters, handle contractions, allow 1-word '?'
- Audio: PTT pre-roll (no clipped first word), drop Whisper silence hallucinations,
  greedy decoding + domain initial_prompt for faster/cleaner transcription
- AI: cap spoken-answer tokens so replies return at conversational speed
- Overlay: answers persist (no auto-hide); wire Ctrl+Shift+H show/hide toggle
- Screen capture: freeze-frame at hotkey press (immune to focus-blur lockouts),
  hide selector from screen-share (NSWindowSharingNone), higher capture resolution
- Stop tracking models/ and *.zip (large binaries; add to .gitignore)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 14:36:06 +03:00

99 lines
2.7 KiB
Python

#!/usr/bin/env python3
"""
First-time setup script for Meeting Assistant
Downloads required AI models and sets up environment
"""
import os
import sys
import subprocess
import platform
def install_dependencies():
"""Install Python dependencies"""
print("📦 Installing Python dependencies...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
def download_models():
"""Download the Qwen2.5-VL vision brain (model + mmproj) into models/.
The Whisper STT model (distil-large-v3 by default) auto-downloads via
faster-whisper on first run, so it isn't fetched here.
"""
print("🤖 Downloading AI models (Qwen2.5-VL-7B + vision projector)...")
os.makedirs("models", exist_ok=True)
repo = "ggml-org/Qwen2.5-VL-7B-Instruct-GGUF"
files = [
"Qwen2.5-VL-7B-Instruct-Q4_K_M.gguf", # ~4.7 GB
"mmproj-Qwen2.5-VL-7B-Instruct-f16.gguf", # ~1.4 GB vision projector
]
try:
from huggingface_hub import hf_hub_download
except ImportError:
print("❌ huggingface_hub not installed. Run: pip install -r requirements.txt")
return
dest = os.path.abspath("models")
for fn in files:
if os.path.exists(os.path.join(dest, fn)):
print(f"{fn} already exists")
continue
print(f"Downloading {fn} (this is large; behind a proxy it may be slow)...")
try:
hf_hub_download(repo_id=repo, filename=fn, local_dir=dest)
print(f"✅ Downloaded {fn}")
except Exception as e:
print(f"❌ Failed to download {fn}: {e}")
def setup_audio():
"""Test audio setup"""
print("🎤 Testing audio input...")
try:
import sounddevice as sd
devices = sd.query_devices()
input_devices = [d for d in devices if d['max_input_channels'] > 0]
if input_devices:
print(f"✅ Found {len(input_devices)} audio input devices")
for device in input_devices:
print(f" - {device['name']}")
else:
print("⚠️ No audio input devices found")
except Exception as e:
print(f"⚠️ Audio setup error: {e}")
def main():
"""Run setup"""
print("🔧 Meeting Assistant - Setup")
print("=" * 50)
# Check Python version
if sys.version_info < (3, 8):
print("❌ Python 3.8 or higher required")
sys.exit(1)
# Platform info
print(f"💻 Platform: {platform.system()}")
# Install dependencies
install_dependencies()
# Download models
download_models()
# Setup audio
setup_audio()
print("\n✅ Setup complete!")
print("Run 'python main.py' to start the assistant")
if __name__ == "__main__":
main()