Commit Graph

3 Commits

Author SHA1 Message Date
alf 4ad513afda feat(voice): orchestration enrôlement — pull/archive/transcribe/enroll/deploy
- store : table voices + WAV chiffré sur disque (archive_voice_wav, voice_wav_bytes,
  transcription chiffrée, marques archived/enrolled/deployed/wav_deleted).
- voice/transfer.py : dérivation du dossier cosyvoice depuis wav_path (device-dépendant),
  pull WAV / push .cvps / delete WAV device (retour vérifié §9).
- voice/orchestrator.py : list_voices (statut par voix), prepare (pull+archive+whisper),
  enroll_deploy (enroll+push + suppression WAV device optionnelle, opt-in).
- API : GET /api/voices/{serial}, /voices/health, POST .../prepare, .../enroll.
- tests : +10 (chemins, archive chiffrée, orchestration via faux adb/bridge). 33/33.
- validé live : jerome (muet) → transcrit FR → .cvps déployé sur tablette + WAV
  archivé chiffré ; WAV device conservé (delete_source=false).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 14:39:29 +02:00
alf 92505a4cac feat(voice): moteur d'enrôlement — worker cv_venv chaud + IPC + transcription
- worker.py : process persistant sous cv_venv (teacher + Whisper chauds), protocole
  JSON-lines. Canal stdout propre (fd1→stderr) pour ne pas corrompre l'IPC avec le
  bruit torch/librosa.
- bridge.py : pont côté API py3.14 (sans torch) — lance/pilote le worker en
  subprocess, jobs sérialisés, démarrage paresseux.
- transcribe.py : Whisper sur le segment PRÉPARÉ (texte == segment enrôlé), défaut
  "small" ("base" transcrit mal le FR, validé).
- Validé live : 1 worker chaud sert ping+transcribe(fr)+enroll, réutilisé (même PID),
  protocole non corrompu (bruit libs → stderr).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 14:24:24 +02:00
alf 8fa7fe4f47 feat(voice): enroll.py — WAV → .cvps (CosyVoice), cœur prouvé sur device réel
- enroll.py : réimplémentation configurable de cv_make_prompt (env CV_REPO/CV_TEACHER),
  teacher chargé une fois (singleton), + préparation WAV obligatoire (mono/16k/~15s)
  car le tokenizer s3 plante >30s et la similarité chute <8s.
- Sortie GGUF arch cosyvoice-prompt-speech, 4 tenseurs aux dtypes exacts.
- Validé live : richard.wav (111s stéréo) → richard.cvps structurellement identique à
  damien.cvps (feat F32[80,750], embedding F32[192,1], tokens I32[375], text I8).
- Hygiène stdout (museler numba/librosa) en prévision de l'IPC worker.

NB : tourne sous cv_venv (torch), PAS sous l'API py3.14 → worker subprocess à venir.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 10:32:11 +02:00