couple-repo/Projects/PAUSE/SecondVoice.md
StillHammer c408959fdf Major repo update: First DONE project + execution patterns validated
## Projects
-  videotoMP3Transcriptor → DONE (first shipped project! 🎉)
- GroveEngine → WIP (reference doc with 46 commits/3 weeks)
- WeChat Homework Bot → WIP (comprehensive mini program plan)
- ocr_pdf_service → CONCEPT (from PAUSE)
- SecondVoice → PAUSE (failed attempt, will restart)

## Execution Patterns (Nov 2025)
- 102 commits in 3 weeks (aissia: 33, groveengine: 46, confluent: 23)
- 71% active time (15/21 days)
- VERDICT: Alexis EXECUTES, not "plan only"
- Balance: Big architectural projects + Fast shipping (videotoMP3 in 2 days)

## Couple
- Hospital incident 29 nov documented (successful deescalation)
- Pattern confirmed: Physical needs > Emotional management
- Pattern confirmed: Retreat > Insist when tension

## Updated files
- Status_Projets.md: Full project status with execution data
- Alexis.md: Profile update with execution proof + hospital incident
- CLAUDE.md: Current project state (5 WIP, 6 PAUSE, 1 DONE, 4 CONSTANT, 6 CONCEPT)
- New: Projects/DONE/ folder structure
- New: wechat_miniapp_homework.md (880 lines)
- New: couple_backlog/29_novembre_2025_hopital.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 17:41:24 +08:00

409 lines
12 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SecondVoice - Meeting Translation System
**Status** : PAUSE
**Créé** : 17 novembre 2025
**Moved to PAUSE** : 30 novembre 2025
**Type** : Projet support multivecteur
**Tentative** : Échec initial, relance prévue (besoin réel identifié)
---
## Problème Résolu
**Contexte** :
- Meetings avec Tingting (contexte professionnel ou relationnel)
- Alexis ne comprend pas assez le chinois
- **Conséquence** : Inconfort personnel → Conflits avec Tingting
- **Impact** : Ne peut pas supporter efficacement Tingting dans ces situations
**Besoin critique** :
- Comprendre conversations en chinois en temps réel
- Pouvoir intervenir intelligemment si nécessaire
- Éviter conflits causés par incompréhension/sentiment d'inutilité
---
## Solution Technique
### Architecture
```
Audio Input (Meeting)
Whisper API (STT - Speech-to-Text)
Claude Haiku (Traduction contextuelle CN → FR/EN)
Display real-time (Terminal/GUI)
```
### Stack
**STT** : OpenAI Whisper API
- Excellent sur chinois mandarin
- $0.006/minute (~$0.36/heure)
- Real-time streaming
**Traduction** : Claude Haiku API
- Meilleure compréhension contexte culturel chinois
- Nuances conversationnelles préservées
- ~$0.03-0.05/heure
- **Total cost** : ~$0.40/heure meeting
**Langage** : C++
- Raison : Réutilisation code pour assistant personnel futur
- Test écosystème C++ avec projet réel
- Production-ready dès le départ
**Platform** : Windows + Linux (cross-platform)
---
## Success Criteria
**MVP validé si** : Fonctionne dans 1 meeting sans problème majeur
**Critères de succès** :
1. Transcription chinois précise (>85% accuracy)
2. Traduction FR/EN compréhensible en contexte
3. Latence acceptable (<5s)
4. Pas de crash pendant meeting
5. Alexis comprend assez pour éviter conflits post-meeting
---
## Scope MVP
### Phase 1 - POC Fonctionnel (Urgent)
**Features** :
- Audio capture (microphone input)
- **Recording complet** (WAV/MP3 sauvegardé avec timestamp)
- Whisper API call (STT)
- Claude Haiku API call (traduction live)
- Display output real-time (console ou simple GUI)
- **Bouton "Fin de conversation"** Trigger auto-processing
- **Auto-summary post-meeting** (Claude API analyse transcript complet)
- Résumé conversation
- Action items extraits
- Points clés / décisions
- Saved as `summary_YYYY-MM-DD.md`
- **Export backlog structuré** :
- Audio original (WAV/MP3)
- Transcript chinois (TXT)
- Traduction française (TXT)
- Summary auto-généré (MD)
- Metadata (JSON: timestamp, durée, participants)
- Gestion erreurs basique (reconnexion API)
**Non-inclus dans MVP** :
- Diarization (qui parle quand) - Phase 2
- Interface graphique élaborée - Phase 2
- Replay avec seek/pause - Phase 2
- Multi-speakers advanced - Phase 2
- Système de recherche - Phase 2
### Phase 2 - Enhancement (Après validation MVP)
**Features avancées** :
- **Système de recherche** (full-text search dans backlog)
- Recherche par mot-clé (CN ou FR)
- Recherche par date/participant
- Recherche sémantique (Claude embeddings)
- "Quand on a parlé de X la dernière fois ?"
- Speaker diarization (identifier qui parle)
- Interface graphique complète (Qt ou ImGui)
- Replay mode (seek/pause dans transcript synchro audio)
- Multi-language support étendu (JP/EN/CN/autre)
- Optimization performance (latency, accuracy)
---
## Roadmap
### Semaine 1 (Urgent)
1. **Setup projet C++** (CMake, dependencies)
2. **HTTP client** (cpp-httplib + nlohmann/json)
3. **Audio capture + recording** (PortAudio + WAV/MP3 writer)
4. **Whisper client** (API integration + transcript save)
5. **Claude client live** (API integration traduction real-time)
6. **Pipeline integration** (bout-à-bout)
### Semaine 2
7. **Bouton "Fin de conversation"** (trigger post-processing)
8. **Claude summary auto** (analyse transcript markdown summary)
9. **Export backlog structuré** (audio + transcripts + summary + metadata)
10. **Test avec audio réel** (sample meetings chinois)
11. **Debug + stabilisation**
12. **Test en condition réelle** (prochain meeting avec Tingting)
### Post-MVP (Phase 2)
13. **Système de recherche** (SQLite FTS5 ou vector search)
14. **Diarization** (pyannote.audio ou AssemblyAI)
15. **GUI complète** (ImGui ou Qt)
16. **Replay mode** (audio + transcript synchronisé)
17. **Optimizations** (latency, accuracy, cost)
---
## Dépendances Techniques
### C++ Libraries
**Required** :
- `cpp-httplib` (HTTP client, header-only)
- `nlohmann/json` (JSON parsing, header-only)
- `PortAudio` (audio capture, cross-platform)
**Optional** :
- `spdlog` (logging)
- `CLI11` (command-line args)
- `ImGui` (GUI si Phase 2)
**Package manager** : vcpkg ou conan
---
## Risques & Mitigations
| Risque | Impact | Mitigation |
|--------|--------|------------|
| **Whisper accuracy insuffisante** | Bloquant | Tester avec samples chinois d'abord, fallback Azure Speech si besoin |
| **Latence trop élevée** | Moyen | Optimiser chunks audio, considérer streaming |
| **API costs explosent** | Faible | $0.40/h acceptable, mais monitor usage |
| **C++ complexity ralentit MVP** | Moyen | Accepter code moins optimal pour MVP, refactor après |
| **Pas de meeting avant longtemps** | Moyen | Créer test scenarios avec audio samples |
---
## Lien Projets
### Support Multivecteur
**SecondVoice aide** :
1. **Relation Tingting** : Supporter dans contexte professionnel (meetings parents/admin)
2. **Business project** : Comprendre meetings business chinois
3. **AISSIA** : Réutilisation code C++ pour assistant personnel
4. **Apprentissage chinois** : Exposure réel au chinois contextualisé
**Pas un side quest** - Résout problème actif causant conflits
---
## Alternatives Testées (Rejetées)
**Pourquoi pas services existants ?**
| Service | Problème identifié |
|---------|-------------------|
| Google Translate Live | Qualité traduction insuffisante (contexte perdu) |
| Microsoft Translator | Latence élevée, accuracy chinois moyenne |
| Azure Speech | (Non spécifié - à retester ?) |
| Mobile apps | Interface inadaptée, pas assez discret |
**Conclusion** : Build custom nécessaire pour quality + control
---
## Questions Ouvertes
### Techniques
1. Diarization vraiment nécessaire pour MVP ? (Non - décidé)
2. Output format : Terminal ou GUI minimal ?
3. Langue output : FR ou EN ? (À confirmer avec Alexis)
### Produit
1. Usage uniquement avec Tingting ou générique tous meetings ?
2. Recording audio acceptable ou privacy concern ?
3. Intervention Alexis attendue (donc besoin speak aussi) ou juste écoute passive ?
### Relationnel
1. Tingting au courant ? (Pas confirmé dans discussion)
- **ACTION REQUISE** : En parler avec elle avant d'utiliser en meeting réel
- Elle doit savoir pourquoi et comment ça aide votre équipe
---
## Coûts
### Développement
- **Time investment** : 1-2 semaines (MVP)
- **Learning curve C++** : Alexis déjà compétent, écosystème existant
### Opérationnel
- **Par meeting (1h)** : ~$0.40
- **Par mois (10 meetings)** : ~$4
- **Annuel** : ~$50
**Acceptable** : Oui, résout problème réel pour coût négligeable
---
## Next Steps
**Immédiat** (Alexis gère la tech) :
1. Setup projet C++ (CMake + dependencies)
2. Prototype Whisper API call
3. Prototype Claude API call
4. Audio capture test
5. Integration pipeline
**Avant premier usage réel** :
1. **Parler avec Tingting** :
- Expliquer objectif (mieux la supporter)
- Demander son avis (utile pour elle ?)
- Clarifier son rôle attendu dans meetings
2. Test avec sample audio chinois
3. Validation latency/quality acceptable
---
## Recording & Backlog
### Pourquoi c'est critique
**Backlog conversationnel = asset majeur** :
1. **Post-meeting analysis**
- Relire conversation si détail oublié
- Vérifier exactement ce qui a été dit (vs ce qu'on pense avoir entendu)
- Comprendre nuances ratées en temps réel
2. **Résolution conflits**
- "Tu as dit X" Backlog prouve réalité
- Évite gaslighting involontaire (mémoire sélective)
- Base factuelle pour discussions post-meeting
3. **Learning machine**
- Corpus chinois réel contextualisé
- Phrases/expressions récurrentes identifiables
- Training data pour améliorer modèles custom
4. **Legal/Business protection**
- Si meetings business : preuve accords oraux
- Timestamped, auditable
- CYA (Cover Your Ass)
5. **Pattern detection**
- Analyser conversations longue durée
- Identifier thèmes récurrents
- Insights impossibles à voir en temps réel
### Format Backlog Proposé
```
meetings/
├── 2025-11-20_14h30_ParentsMeeting/
│ ├── audio_original.wav # Audio brut complet
│ ├── transcript_cn.txt # STT chinois
│ ├── translation_fr.txt # Traduction française
│ ├── metadata.json # Timestamp, participants, durée
│ └── summary_claude.md # Résumé généré post-meeting
└── 2025-11-22_10h00_BusinessCall/
└── ...
```
### Privacy & Consent
**IMPORTANT** :
- **Tingting DOIT savoir** que meetings sont enregistrés
- **Autres participants** aussi (légalement requis dans certains contextes)
- **Storage sécurisé** : Encryption at rest (AES-256)
- **Retention policy** : Combien de temps garder ? (GDPR-like)
**Consent workflow** :
1. Avant meeting : "Je vais enregistrer pour mieux comprendre, OK ?"
2. Si oui Record + notify
3. Si non Live translation only, pas de recording
### Workflow Complet
**Pendant meeting** :
1. Start recording Audio + STT real-time
2. Whisper transcrit chinois Display
3. Claude traduit FR Display
4. Tout sauvegardé en background (audio + transcript running)
**Fin de meeting** :
1. **Clic "Fin de conversation"**
2. **Auto-processing déclenché** :
- Finalise audio file (WAV/MP3)
- Finalise transcripts (CN + FR)
- **Claude analyse transcript complet** :
```
Résumé conversation + Action items + Décisions + Points clés
```
- Génère `summary_YYYY-MM-DD_HHhMM.md`
- Save metadata.json (timestamp, durée, participants)
3. **Export structuré** :
```
meetings/2025-11-20_14h30_ParentsMeeting/
├── audio_original.wav
├── transcript_cn.txt
├── translation_fr.txt
├── summary.md Auto-généré
└── metadata.json
```
4. **Notification** : "Meeting sauvegardé + résumé prêt"
### Post-Processing Potential (Phase 2+)
**Une fois backlog existe** :
1. **Système de recherche** (Phase 2)
- **Full-text search** : SQLite FTS5 sur transcripts
- "Cherche 'contract' dans tous les meetings"
- Résultats : Liste meetings + snippets + timestamp
- **Recherche sémantique** : Claude embeddings
- "Trouve conversations sur argent/salaire/budget"
- Même si mots exacts pas utilisés
- **Filtres** :
- Par date range
- Par participant
- Par durée
- Par langue (CN/FR)
- **Interface** :
- CLI : `./secondvoice search "keyword"`
- GUI : Search bar + results list
2. **Analytics** (Phase 2+)
- Temps de parole par personne
- Sentiment analysis
- Topics récurrents
- Trend analysis long terme
3. **Training custom models** (Phase 3+)
- Fine-tune Whisper sur vos voix
- Fine-tune traduction sur votre vocabulaire
- Amélioration accuracy continue
---
## Impact Attendu
### Pour Alexis
- Compréhension meetings en temps réel
- Réduction stress/inconfort
- Capacité intervention intelligente si nécessaire
- **Backlog pour review post-meeting** (nouveau)
- **Preuve factuelle conversations** (nouveau)
### Pour Tingting
- Support effectif d'Alexis (pas juste présence passive)
- Réduction conflits post-meeting (dus à incompréhension)
- Sentiment d'équipe renforcé
- **Archive conversations importantes** (nouveau)
### Pour la Relation
- Preuve initiative concrète (ACTION-004 : réfléchir à votre avenir)
- Résolution proactive problème identifié
- Investment dans collaboration couple
- **Base factuelle pour résoudre désaccords mémoire** (nouveau)
---
*Créé : 17 novembre 2025*
*Priorité : URGENT*
*Stack : C++17, Whisper API, Claude Haiku, PortAudio, cpp-httplib*
*Success : 1 meeting sans problème majeur*