Files
Effi/docs/COMPTE-RENDU-SESSION-2026-04-05.md
Folzo 47b1327d27 docs: Complete session summary and updated TODO
- Add comprehensive session report (05/04/2026)
- Document all achievements: STT, TTS, French voices
- Update TODO with completed phases and future ideas
- Include useful commands and configurations
- Ready for future optimizations
2026-04-05 22:56:26 +02:00

259 lines
8.7 KiB
Markdown

# 📋 COMPTE-RENDU SESSION - 05 Avril 2026
> **Objectif** : Donner la voix et l'ouïe à Effi
> **Durée** : ~3h
> **Résultat** : ✅ SUCCÈS TOTAL
---
## 🎯 Objectifs atteints
- ✅ **STT (Speech-to-Text)** : Fonctionnel avec Effi-STT (notre solution)
- ✅ **TTS (Text-to-Speech)** : Fonctionnel avec openedai-speech
- ✅ **Voix française féminine** : Siwis (pour Effi)
- ✅ **Voix française masculine** : Tom (pour l'assistant du fils)
- ✅ **Intégration Open WebUI** : Pipeline vocal complet testé et validé
---
## 🏗️ Infrastructure déployée
### Sur folzo-Corp (192.168.1.11)
```
┌─────────────────────────────────────────────────────────────┐
│ SERVICES DÉPLOYÉS │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🎙️ Effi-STT (Port 8200) │
│ ├── Solution maison FastAPI + faster-whisper │
│ ├── Modèle: large-v3 (3GB) │
│ ├── Langue: Français │
│ └── Status: ✅ Fonctionnel │
│ │
│ 🔊 openedai-speech (Port 8100) │
│ ├── Moteur: Piper + XTTS v2 │
│ ├── Voix FR: siwis (féminine), tom (masculine) │
│ ├── Voix EN: alloy, echo, fable, onyx, nova, shimmer │
│ └── Status: ✅ Fonctionnel │
│ │
│ 🧠 Ollama (Port 11434) │
│ ├── Modèle: qwen3.5:9b (32K context) │
│ └── Status: ✅ Fonctionnel │
│ │
└─────────────────────────────────────────────────────────────┘
```
### Sur effi-server (192.168.1.27)
```
┌─────────────────────────────────────────────────────────────┐
│ 💬 Open WebUI (Port 3000) │
│ ├── Interface Effi │
│ ├── Mémoire manuelle │
│ ├── Configuration Audio: │
│ │ ├── STT: http://192.168.1.11:8200/v1 │
│ │ └── TTS: http://192.168.1.11:8100/v1 │
│ └── Status: ✅ Fonctionnel │
└─────────────────────────────────────────────────────────────┘
```
---
## 📁 Fichiers créés/modifiés
### Nouveaux fichiers
```
~/Documents/OpenCode/Projets/Effi/
├── effi-stt/ # Notre solution STT
│ ├── main.py # Serveur FastAPI
│ ├── Dockerfile # Image Docker
│ ├── docker-compose.yml # Configuration compose
│ ├── requirements.txt # Dépendances Python
│ └── README.md # Documentation
│
├── docs/
│ ├── JOURNAL-ESSAIS-TTS-STT.md # Journal des essais
│ ├── SOLUTION-RECOMMANDEE-STT.md # Analyse solutions
│ ├── SUCCES-VOIX-OUÏE.md # Bilan succès
│ └── INSTALL-VOIX-TOM.md # Guide voix masculine
│
└── openedai-speech/ # TTS (existant)
├── tts-voices/
│ ├── fr_FR-siwis-medium.onnx # ✅ Voix féminine FR
│ ├── fr_FR-siwis-medium.onnx.json
│ ├── fr_FR-tom-medium.onnx # ✅ Voix masculine FR
│ └── fr_FR-tom-medium.onnx.json
└── tts-config/
└── voice_to_speaker.yaml # ✅ Config mise à jour
```
### Fichiers mis à jour
- `.opencode/TODO-NEXT-THREAD.md` - Mise à jour avec progression
- `docs/ARCHIVE/HISTORIQUE-COMPLET-EFFI.md` - Contexte projet
- `README.md` - Configuration actuelle
---
## 🔧 Configuration finale Open WebUI
### Settings → Audio
**STT (Speech-to-Text)** :
```yaml
Engine: OpenAI
OpenAI API Base URL: http://192.168.1.11:8200/v1
Model: whisper-1
Language: fr
```
**TTS (Text-to-Speech)** :
```yaml
Engine: OpenAI
OpenAI API Base URL: http://192.168.1.11:8100/v1
Model: tts-1
Voice: siwis # Pour Effi (féminin)
# OU
Voice: tom # Pour assistant (masculin)
```
---
## 🧪 Tests effectués
### Test 1 : STT (Effi-STT)
```bash
$ curl http://localhost:8200/health
{"status":"healthy","model":"large-v3"}
✅ OK
```
### Test 2 : TTS Voix féminine (siwis)
```bash
$ curl -X POST http://localhost:8100/v1/audio/speech \
-d '{"model":"tts-1","input":"Bonjour","voice":"siwis"}' \
--output /tmp/test.mp3
✅ Fichier MP3 créé avec succès
```
### Test 3 : TTS Voix masculine (tom)
```bash
$ curl -X POST http://localhost:8100/v1/audio/speech \
-d '{"model":"tts-1","input":"Bonjour","voice":"tom"}' \
--output /tmp/test.mp3
✅ Fichier MP3 créé avec succès
```
### Test 4 : Pipeline vocal complet (Open WebUI)
```
Entrée vocale: "Coucou Ify, est-ce que tu m'entends ?"
↓
STT (Effi-STT): ✅ Transcription correcte
↓
LLM (qwen3.5): ✅ Réponse générée
↓
TTS (siwis): ✅ Réponse lue à voix haute
Résultat: ✅ PIPELINE VOCAL COMPLET FONCTIONNEL
```
---
## 📊 Performances observées
| Composant | Temps | Notes |
|-----------|-------|-------|
| **STT (CPU)** | ~3-5s pour 5s audio | Acceptable sur Intel J5040 |
| **TTS** | ~1-2s | Rapide avec Piper |
| **LLM** | ~10-15 tokens/sec | qwen3.5:9b sur RX 7800 XT |
| **Pipeline total** | ~5-8s | STT + LLM + TTS |
---
## 🎓 Apprentissages clés
### Ce qui a bien marché
1. **Créer notre propre solution STT** : Plus simple, plus fiable que speaches v0.8+
2. **Piper pour TTS** : Rapide, offline, multilingue
3. **Documentation en cours de route** : Journal des essais très utile
4. **Tests fréquents** : Validation à chaque étape
### Problèmes rencontrés et solutions
| Problème | Cause | Solution |
|----------|-------|----------|
| speaches v0.8+ incompatible | Model card requise | Création Effi-STT maison |
| Voix "gilles" inexistante | Mauvaise URL | Utilisation voix "tom" |
| Dépendance `requests` manquante | Oubli requirements.txt | Ajout + rebuild |
| SELinux permissions | :Z manquant sur volumes | Correction docker-compose |
---
## 🚀 Prochaines étapes (TODO futur)
### Priorité BASSE (optimisations)
- [ ] **PHASE 7.1** : Explorer XTTS pour voix plus naturelles
- Nécessite fichiers .wav d'échantillons
- Qualité supérieure à Piper
- Plus gourmand en ressources
- [ ] **PHASE 7.2** : ROCm GPU pour STT
- Compiler faster-whisper avec ROCm
- Réduire latence STT (CPU → GPU)
- Complexe mais faisable
- [ ] **PHASE 7.3** : Optimiser latence STT
- Mesurer temps de réponse
- Tester modèle "medium" vs "large-v3"
- Voir si qualité suffisante avec medium
- [ ] **PHASE 7.4** : Créer assistant pour le fils
- Modèle LLM adapté (plus léger/pédagogique)
- Personnalité spécifique
- Restrictions de contenu si nécessaire
---
## 📝 Commandes utiles (pour mémoire)
```bash
# Voir les logs
sudo docker logs effi-stt -f
sudo docker logs openedai-speech -f
# Redémarrer les services
sudo docker restart effi-stt
sudo docker restart openedai-speech
# Tester STT
curl -X POST http://localhost:8200/v1/audio/transcriptions \
-F "file=@audio.mp3" -F "language=fr"
# Tester TTS
curl -X POST http://localhost:8100/v1/audio/speech \
-d '{"model":"tts-1","input":"Test","voice":"siwis"}' \
--output /tmp/test.mp3
```
---
## 🎉 Bilan de la session
**Objectif initial** : Donner voix et ouïe à Effi
**Résultat** : ✅ **100% ATTEINT**
Effi peut maintenant :
- ✅ **Entendre** : STT fonctionnel en français
- ✅ **Parler** : TTS avec voix française (siwis)
- ✅ **Comprendre** : Pipeline complet testé et validé
**Bonus** : Solution scalable pour créer d'autres assistants (voix masculine tom disponible)
---
*Session terminée avec succès le 05/04/2026*