File size: 4,344 Bytes
945e815 | 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 | #!/bin/bash
# SolVox Model Downloader
# Downloads all required GGUF/ONNX models for QVAC SDK
# All models are stored locally β no cloud required after download.
set -e
MODELS_DIR="./models"
mkdir -p "$MODELS_DIR"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo "β SolVox β QVAC Model Downloader β"
echo "β Downloading AI models for 100% local inference β"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo ""
# 1. LLM β Llama 3.2 3B Instruct (Q4_K_M quantization, ~2GB)
echo "π¦ [1/6] Downloading LLM: Llama 3.2 3B Instruct (Q4_K_M)..."
if [ ! -f "$MODELS_DIR/llama-3.2-3b-instruct-q4_k_m.gguf" ]; then
curl -L -o "$MODELS_DIR/llama-3.2-3b-instruct-q4_k_m.gguf" \
"https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf"
echo " β LLM model downloaded (~2.0 GB)"
else
echo " β LLM model already exists"
fi
# 2. Embeddings β Nomic Embed Text v1.5 (Q4_K_M, ~260MB)
echo "π¦ [2/6] Downloading Embeddings: Nomic Embed Text v1.5..."
if [ ! -f "$MODELS_DIR/nomic-embed-text-v1.5.Q4_K_M.gguf" ]; then
curl -L -o "$MODELS_DIR/nomic-embed-text-v1.5.Q4_K_M.gguf" \
"https://huggingface.co/nomic-ai/nomic-embed-text-v1.5-GGUF/resolve/main/nomic-embed-text-v1.5.Q4_K_M.gguf"
echo " β Embedding model downloaded (~260 MB)"
else
echo " β Embedding model already exists"
fi
# 3. Speech-to-Text β Whisper Base English (GGML, ~150MB)
echo "π¦ [3/6] Downloading STT: Whisper Base (English)..."
if [ ! -f "$MODELS_DIR/ggml-base.en.bin" ]; then
curl -L -o "$MODELS_DIR/ggml-base.en.bin" \
"https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-base.en.bin"
echo " β Whisper model downloaded (~150 MB)"
else
echo " β Whisper model already exists"
fi
# 4. Text-to-Speech β Piper TTS Amy (en_US, medium quality, ONNX, ~75MB)
echo "π¦ [4/6] Downloading TTS: Piper Amy (en_US, medium)..."
if [ ! -f "$MODELS_DIR/en_US-amy-medium.onnx" ]; then
curl -L -o "$MODELS_DIR/en_US-amy-medium.onnx" \
"https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/amy/medium/en_US-amy-medium.onnx"
curl -L -o "$MODELS_DIR/en_US-amy-medium.onnx.json" \
"https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/amy/medium/en_US-amy-medium.onnx.json"
echo " β TTS model downloaded (~75 MB)"
else
echo " β TTS model already exists"
fi
# 5. Translation β MarianMT EnglishβSpanish (OPUS, ~50MB)
echo "π¦ [5/6] Downloading Translation: ENβES..."
if [ ! -f "$MODELS_DIR/translate-en-es.bin" ]; then
echo " βΉ Translation model requires manual download from LibreTranslate"
echo " Visit: https://github.com/LibreTranslate/LibreTranslate"
echo " Or use QVAC's bundled translation models (see docs.qvac.tether.io)"
touch "$MODELS_DIR/translate-en-es.bin.placeholder"
echo " β Placeholder created β install actual model for translation"
else
echo " β Translation model already exists"
fi
# 6. OCR β PaddleOCR v4 (ONNX, ~30MB)
echo "π¦ [6/6] Downloading OCR: PaddleOCR v4..."
if [ ! -f "$MODELS_DIR/ppocr-v4.onnx" ]; then
echo " βΉ OCR model requires QVAC's bundled OCR models"
echo " See: https://docs.qvac.tether.io/addons/ocr-onnx/"
touch "$MODELS_DIR/ppocr-v4.onnx.placeholder"
echo " β Placeholder created β install actual model for OCR"
else
echo " β OCR model already exists"
fi
echo ""
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo "β Download Complete! β"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo ""
echo "Model directory: $MODELS_DIR"
echo ""
ls -lh "$MODELS_DIR"
echo ""
echo "Next steps:"
echo " 1. npm install"
echo " 2. npm run dev"
echo " 3. npm start"
|