Mac M1 optimizations, fix train pipeline, add Hey Cosmo wake word model
- Fix install_mac.sh: use venv + Python 3.12 (3.14 incompatible with ML libs) - Fix run_mac.sh: activate venv, add CPU thread optimization env vars - Fix agent.py: remove f-string from SYSTEM_PROMPT template (NameError on import) - Add missing deps: sounddevice, pydub, imageio-ffmpeg, omegaconf - Optimize for M1: torch.inference_mode, set_num_threads, OMP/MKL tuning - Switch to qwen2.5:3b for faster LLM responses on Mac - Switch Whisper to medium model with auto compute (small+int8 had poor Russian) - Add initial_prompt for better Russian transcription - Add open_app tool for native macOS app launching - Fix TTS: sanitize Latin text to Cyrillic for Silero compatibility - Fix wake word echo: add cooldown after TTS, reset model state, raise threshold - Make "Слушаю" TTS synchronous to avoid mic interference - Fix train Dockerfile: remove tensorflow/onnx2tf (only ONNX needed), fix deps - Fix train.sh: use wget for dataset download, add --shm-size=2g - Add trained hey_cosmo.onnx wake word model - Add TODO section to CLAUDE.md (ChatterBox TTS, Ollama Modelfile ideas) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,18 +7,22 @@ audio:
|
||||
silence_duration: 1.0
|
||||
|
||||
whisper:
|
||||
model_size: "small" # На Mac без GPU — small быстрее чем distil-large
|
||||
model_size: "medium" # medium — лучшее качество русского на CPU (small слишком много ошибок)
|
||||
device: "cpu" # Mac Intel/Apple Silicon — CPU (MPS пока не стабилен в faster-whisper)
|
||||
compute_type: "int8" # int8 быстрее на CPU
|
||||
compute_type: "auto" # auto вместо int8 — int8 слишком сильно режет качество русского
|
||||
language: "ru"
|
||||
initial_prompt: "Cosmo, открой браузер, найди программу, запусти приложение." # подсказка для русского контекста
|
||||
|
||||
ollama:
|
||||
base_url: "http://localhost:11434"
|
||||
model: "qwen2.5:7b"
|
||||
model: "qwen2.5:3b" # 3b быстрее на M1 (~2x), достаточно для голосовых команд
|
||||
temperature: 0.2
|
||||
max_tokens: 1024
|
||||
max_agent_steps: 10
|
||||
|
||||
performance:
|
||||
num_threads: 4 # CPU потоки для torch (TTS/Whisper)
|
||||
|
||||
tts:
|
||||
enabled: true
|
||||
silero_speaker: "eugene" # xenia (женский) baya aidar eugene kseniya
|
||||
|
||||
Reference in New Issue
Block a user