#!/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()