#!/usr/bin/env python3 # setup_ea_models.py — run this once, EA never disappears again import os from urllib.request import urlretrieve from pathlib import Path BASE = Path("models") BASE.mkdir(exist_ok=True) models = { "whisper/tiny.pt": "https://openaipublic.azureedge.net/main/whisper/models/65147644a518d12f04e32d6f3b26facc3f8dd46e5390956a9424a650c0ce22b9/tiny.pt", "piper/ryan-high.onnx": "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/ryan/high/en_US-ryan-high.onnx", "piper/ryan-high.onnx.json": "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/ryan/high/en_US-ryan-high.onnx.json", "wake/hey_ea.tflite": "https://github.com/dscripka/openWakeWord/releases/download/v0.5.1/hey_jarvis_v0.1.tflite", } print("Downloading EA’s brain & voice… (≈300 MB total)") for rel_path, url in models.items(): path = BASE / rel_path path.parent.mkdir(parents=True, exist_ok=True) if path.exists(): print(f"Already have {rel_path}") else: print(f"Downloading {rel_path} …") urlretrieve(url, path) print(f"Done → {path} ({path.stat().st_size // 1024 // 1024} MB)") print("\nAll EA models ready!") print("Now run: git add models/ && git commit -m 'EA models' && git push") print("Then every future 'git pull + git lfs pull' will bring them back instantly.")