Automatic Speech Recognition
WhisperKit
Core ML
Portuguese
Spanish
English
macos
apple-silicon
swift
live-captions
subtitles
speech-recognition
machine-translation
on-device
local-first
ollama
Instructions to use Veronyka/livecaption with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- WhisperKit
How to use Veronyka/livecaption with WhisperKit:
# Install CLI with Homebrew on macOS device brew install whisperkit-cli # View all available inference options whisperkit-cli transcribe --help # Download and run inference using whisper base model whisperkit-cli transcribe --audio-path /path/to/audio.mp3 # Or use your preferred model variant whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose
- Notebooks
- Google Colab
- Kaggle
Download scripts/fetch_models.sh from Veronyka/livecaption: direct link, hf CLI and curl.
- Browser
- Download file 2.63 kB
-
https://huggingface.co/Veronyka/livecaption/resolve/main/scripts/fetch_models.sh
- Command line
-
hf download hf://Veronyka/livecaption/scripts/fetch_models.sh
-
curl -L -o fetch_models.sh https://huggingface.co/Veronyka/livecaption/resolve/main/scripts/fetch_models.sh
2.63 kB
| # Baixa os modelos abertos dos repositórios OFICIAIS e importa o tradutor no Ollama. | |
| # Whisper small (CoreML) .... argmaxinc/whisperkit-coreml (+ tokenizer de openai/whisper-small) | |
| # Hy-MT2-1.8B (GGUF Q4_K_M) .. tencent/Hy-MT2-1.8B-GGUF (SHA-256 conferido) | |
| # Uso: zsh scripts/fetch_models.sh [--skip-ollama] Pasta de destino: $LC_PROJECT (padrão: ~/Library/Application Support/LiveCaption) | |
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| DATA="${LC_PROJECT:-$HOME/Library/Application Support/LiveCaption}" | |
| GGUF=Hy-MT2-1.8B-Q4_K_M.gguf | |
| GGUF_SHA256=dc5f44fcf1fa496ee7ad725982c0c8c553a4de00259b53af84c4b89fb0c06699 | |
| # Revisões conferidas em 2026-11-11 (travadas para o download ser reproduzível) | |
| REV_WHISPERKIT=0f63a7800b00dd0226abd051b906c246e1907482 | |
| REV_WHISPER=973afd24965f72e36ca33b3055d56a652f456b4d | |
| REV_HYMT2=a0c709d9fac510f2c807aa3af52872340dc37a4a | |
| command -v hf >/dev/null || { echo "Falta o comando 'hf'. Instale com: pip install -U huggingface_hub"; exit 1; } | |
| mkdir -p "$DATA/models/whisper/hf/models/openai/whisper-small" "$DATA/models/mt" | |
| echo "Pasta de dados: $DATA" | |
| echo "[1/3] Whisper small (CoreML)…" | |
| hf download argmaxinc/whisperkit-coreml --revision "$REV_WHISPERKIT" --include "openai_whisper-small/*" --local-dir "$DATA/models/whisper" >/dev/null | |
| echo "[2/3] Tokenizer do Whisper…" | |
| hf download openai/whisper-small tokenizer.json tokenizer_config.json config.json --revision "$REV_WHISPER" --local-dir "$DATA/models/whisper/hf/models/openai/whisper-small" >/dev/null | |
| echo "[3/3] Hy-MT2 1.8B (GGUF)…" | |
| hf download tencent/Hy-MT2-1.8B-GGUF "$GGUF" LICENSE.txt --revision "$REV_HYMT2" --local-dir "$DATA/models/mt" >/dev/null | |
| echo "Conferindo SHA-256 do GGUF…" | |
| got=$(shasum -a 256 "$DATA/models/mt/$GGUF" | cut -d' ' -f1) | |
| if [[ "$got" != "$GGUF_SHA256" ]]; then | |
| echo "ERRO: SHA-256 diferente do esperado ($got). Arquivo não é o GGUF oficial; apague $DATA/models/mt e tente de novo."; exit 1 | |
| fi | |
| echo "ok: $GGUF confere com o publicado pela Tencent." | |
| [[ "${1:-}" == "--skip-ollama" ]] && { echo "Pulando a importação no Ollama (--skip-ollama)."; exit 0; } | |
| command -v ollama >/dev/null || { echo "Ollama não encontrado (https://ollama.com). Instale e rode de novo, ou use --skip-ollama."; exit 1; } | |
| curl -s -m 3 localhost:11434/api/tags >/dev/null || { echo "O servidor do Ollama não está rodando: abra o app do Ollama (ou 'ollama serve') e rode de novo."; exit 1; } | |
| cp "$ROOT/assets/hymt2.Modelfile" "$DATA/models/mt/Modelfile" | |
| ( cd "$DATA/models/mt" && ollama create hymt2-1.8b -f Modelfile ) | |
| echo "Pronto. Próximo passo: zsh scripts/build_app.sh --install" | |