diff --git a/CONTEXT.md b/CONTEXT.md index aebf765..c293cdf 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -1167,3 +1167,11 @@ profils vocaux, enregistrements (wav/mp3), modèles, journaux et environnements l'index (`git rm --cached`, le fichier local reste sur le disque), ajoute `config.example.yaml`, `.gitignore`, le Makefile, les tests et la documentation. **Décision** : `server/conf/*.yaml` restent versionnés (pas de modèle `*.example.yaml` pour eux) ; à reprendre si l'utilisateur enregistre d'autres personnes (`conf/access.yaml` porte les noms). +- **2026-10-19** — Question de l'utilisateur : « commande si je veux la version fingerprint » ; il accepte une section **README 4.0 + « Choisir sa version »** (FR/EN : tableau main / fingerprint, `git clone -b fingerprint`, bascule, `git worktree`). Fusion dans `main` + **non faite** (avance rapide possible, sans conflit, 13 commits ; main perdrait voix/VAD/diarisation/mot de réveil) : en attente du choix + de l'utilisateur. **Incident de ma part** : une expérience de bascule, lancée dans un clone temporaire dont la création a échoué + (liens physiques inter-périphériques), s'est exécutée dans le dépôt réel : `git switch main` a **écrasé silencieusement le + `server/config.yaml` local** (git écrase les fichiers ignorés) puis le retour sur `fingerprint` l'a supprimé. Remis depuis la copie + prise avant le commit F8 (identique : `include`, `mqtt.host 192.168.1.4`, 7 pièces, Denis, 1 doigt), dépôt revenu sur `fingerprint` + @ `5dff1b3`, propre, service actif, 313 tests passent. Le README documente ce piège de bascule. diff --git a/README-EN.md b/README-EN.md index 88e75a7..66a4b05 100644 --- a/README-EN.md +++ b/README-EN.md @@ -102,6 +102,46 @@ No Base64: MQTT payloads carry raw PCM bytes. ## 4. Installation +### 4.0 Choosing your version + +Two versions live in this repository, on two branches. They do not mix: the voice code was removed from `fingerprint`. + +| | `main` | `fingerprint` | +|---|---|---| +| Who holds the board | the **voice** (voice profiles, diarization) | the **finger** placed on an R503 sensor | +| Session start | wake word "Hey Mycroft" or PTT button | finger placed, or PTT button (no identity) | +| Heavy dependencies | pyannote and torch (≈ 1.3 GB), openWakeWord | none | +| Boards | ESP32 WROOM | ESP32 WROOM or ESP32-S3 Mini | +| Configuration | versioned `server/config.yaml` | `config.example.yaml` template, ignored local copy, `server/conf/` | +| systemd service | no | yes (`make server-install`) | + +**Getting the `fingerprint` version** + +```bash +# new folder +git clone -b fingerprint https://github.com/deunix-educ/voice-assistant.git # "-b main" for the voice version +cd voice-assistant + +# repository already cloned +git fetch origin && git switch fingerprint && git pull +``` + +Then steps 4.1 and 4.2 below (`make install-system`, `make install-dev`, `make install-speech`, `make models`). +ESP32-S3 Mini: `make fw-upload FW_ENV=esp32s3mini SERIAL_PORT=/dev/ttyACM0`. + +**Switching branches in the same folder: mind `server/config.yaml`.** On `fingerprint` it is ignored by git; on `main` it is +tracked. As a result `git switch main` **replaces your file, without warning**, with the one from `main` (git overwrites ignored +files), and `git switch fingerprint` then **deletes** it. Back it up first (`cp server/config.yaml +~/config.yaml.fingerprint`) and put it back when you return. After going back to `main`, its voice dependencies must be +reinstalled (`make install-diarization`, `make install-wakeword`). + +**Safer: one folder per version**, leaving the other untouched: + +```bash +git worktree add ../voice-assistant-main main # a copy of main next to this one, with its own files +cd ../voice-assistant-main && make install-dev # its venv, its server/.env (to fill in) and its models (make models) +``` + ### 4.1 ESP32 firmware **Prerequisites:** a USB cable with data lines (not charge-only), port identified diff --git a/README.md b/README.md index b9fe415..d279987 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,46 @@ Pas de Base64 : les payloads MQTT contiennent des octets PCM bruts. ## 4. Installation +### 4.0 Choisir sa version + +Deux versions vivent dans ce dépôt, sur deux branches. Elles ne se mélangent pas : le code de la voix a été retiré de `fingerprint`. + +| | `main` | `fingerprint` | +|---|---|---| +| Qui tient la carte | la **voix** (profils vocaux, diarisation) | le **doigt** posé sur un capteur R503 | +| Début de session | mot de réveil « Hey Mycroft » ou bouton PTT | doigt posé, ou bouton PTT (sans identité) | +| Dépendances lourdes | pyannote et torch (≈ 1,3 Go), openWakeWord | aucune | +| Cartes | ESP32 WROOM | ESP32 WROOM ou ESP32-S3 Mini | +| Configuration | `server/config.yaml` versionné | modèle `config.example.yaml`, copie locale ignorée, `server/conf/` | +| Service systemd | non | oui (`make server-install`) | + +**Obtenir la version `fingerprint`** + +```bash +# dossier neuf +git clone -b fingerprint https://github.com/deunix-educ/voice-assistant.git # « -b main » pour la version avec voix +cd voice-assistant + +# dépôt déjà cloné +git fetch origin && git switch fingerprint && git pull +``` + +Puis les étapes 4.1 et 4.2 ci-dessous (`make install-system`, `make install-dev`, `make install-speech`, `make models`). +ESP32-S3 Mini : `make fw-upload FW_ENV=esp32s3mini SERIAL_PORT=/dev/ttyACM0`. + +**Changer de branche dans le même dossier : attention à `server/config.yaml`.** Sur `fingerprint` il est ignoré par git ; sur +`main` il est suivi. Résultat : `git switch main` **remplace votre fichier, sans prévenir**, par celui de `main` (git écrase +les fichiers ignorés), et `git switch fingerprint` le **supprime** ensuite. Sauvegardez-le avant (`cp server/config.yaml +~/config.yaml.fingerprint`) et remettez-le au retour. Après un retour sur `main`, ses dépendances de voix sont à réinstaller +(`make install-diarization`, `make install-wakeword`). + +**Plus sûr : un dossier par version**, sans rien changer dans l'autre : + +```bash +git worktree add ../voice-assistant-main main # une copie de main à côté, avec ses propres fichiers +cd ../voice-assistant-main && make install-dev # son venv, son server/.env (à renseigner) et ses modèles (make models) +``` + ### 4.1 Firmware ESP32 **Prérequis :** câble USB avec les données (pas charge seule), port identifié