Aller au contenu

Smart Transcription - Documentation Technique BFF

Version: 1.0.0
Date: 11 Mars 2026
Statut: Production


Vue d'Ensemble

Bienvenue dans la documentation technique complète du service Smart Transcription BFF (Backend For Frontend).

Cette documentation couvre l'architecture v3 avec séparation des services :
- Smart Transcription BFF (Port 8001) : Auth, RAG, Post-processing
- MeetNoo GPU Services (Port 8000) : Pipeline GPU, LLM Inference


Architecture

Architecture complète, stack technique, communication BFF ↔ MeetNoo, déploiement et sécurité.

Pipeline & Workflow

Workflow complet en 4 phases : Upload → GPU → Post-Processing → Finalization.

RAG & Enrichissement

Architecture 3-priority (Voiceprint → RAG → LLM), mean pooling, auto-save voiceprints.

LLM & Prompting

Service LLM (clean_transcription, identify_speakers), Redis Streams, prompt engineering.

Redis Streams Architecture 🆕

Nouveau v2.0: Architecture dual-stream complète (pipeline:events + workflow:events), consumer unifié, communication SSE, analyse de cohérence et validation des flux.

Sous-sections spécialisées :
- Workflow Events Architecture - Stream BFF interne (indexing RAG, post-processing)
- Executive Summary Redis v2 - Synthèse exécutive de la migration async v2.0

Modèles de Données

Schémas PostgreSQL, EnrichedSegment, VoiceprintLibrary, relations ERD.

AI Engine (Unified RAG Gateway) 🆕

Architecture RAG Gateway v2.0 : AI Search cross-projet, AI Chat SSE streaming, feedback loop, collections Qdrant multi-niveaux, score de fiabilité.

Gestion d'Erreurs

Fallback chains, retry policies, circuit breaker, graceful degradation.

Performance

Benchmarks production, optimisations, scalabilité, monitoring.


Guide de Démarrage Rapide

Installation

# Clone repository
git clone https://github.com/your-org/smart-transcription.git
cd smart-transcription

# Virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows

# Dependencies
pip install -r requirements.txt

# Environment variables
cp backend.env.example backend.env
# Edit backend.env with your credentials

Configuration

# PostgreSQL
DATABASE_URL=postgresql://user:pass@localhost:5432/smart_transcription

# Qdrant
QDRANT_HOST=localhost
QDRANT_PORT=6333

# Redis
REDIS_URL=redis://localhost:6379/0

# AWS S3
AWS_S3_BUCKET=meetnoo-storage
AWS_REGION=eu-west-3

# OpenAI
OPENAI_API_KEY=sk-...

# MeetNoo GPU Service
MEETNOO_API_URL=http://localhost:8000

Lancement

# Database migrations
alembic upgrade head

# Start server
uvicorn src.main:app --host 0.0.0.0 --port 8001 --reload

Endpoints Principaux

# Health check
GET http://localhost:8001/health

# Upload transcription with RAG enrichment
POST http://localhost:8001/api/transcripts/create-with-rag
Content-Type: multipart/form-data
Authorization: Bearer {token}
Fields: audio_file, title (optional), language (default: fr), contextual_files[] (optional)

Métriques de Production

Métrique Valeur Cible Statut
Voiceprint Match Rate 95% > 90% PASS
RAG Enrichment Success 83% > 75% PASS
Mean Pooling Accuracy 78-82% > 75% PASS
Processing Time (1h audio) 20 min < 25 min PASS
RAG Overhead 5.5% < 10% PASS
Error Rate 0.3% < 1% PASS

Architecture Globale

graph TB subgraph "Internet" U[Users/Frontend] end subgraph "Smart Transcription BFF (VPS - Port 8001)" API[FastAPI] PG[(PostgreSQL)] QD[(Qdrant)] RD[(Redis)] S3[(AWS S3)] end subgraph "MeetNoo GPU Services (VPN - Port 8000)" GPU[Ray Serve + Dramatiq] PGPU[(PostgreSQL)] LLM[Qwen 2.5-3B] end U -->|HTTPS| API API --> PG API --> QD API --> RD API --> S3 API -->|HTTP POST| GPU GPU -->|Redis Streams| RD GPU --> PGPU GPU --> LLM style API fill:#06b6d4,stroke:#fff,color:#fff style GPU fill:#f97316,stroke:#fff,color:#fff

Guides par Audience

Architectes Système

  1. Architecture BFF - Séparation services, stack, déploiement
  2. Pipeline Workflow - Orchestration complète
  3. Performance - Scalabilité, benchmarks

Backend Developers

  1. Modèles de Données - Schémas, relations, exemples
  2. Gestion d'Erreurs - Fallbacks, retry, recovery
  3. Architecture BFF - Structure projet, layering

ML/AI Engineers

  1. RAG Enrichment - 3-priority, mean pooling, voiceprints
  2. LLM Prompting - Prompt engineering, operations
  3. Performance - Optimisations ML, resource usage

DevOps/SRE

  1. Architecture - Déploiement - Docker, VPS, VPN
  2. Performance - Monitoring - Métriques, alerting
  3. Gestion d'Erreurs - Error tracking, logging

Ressources Externes


Support

Pour toute question ou problème :
- GitHub Issues : smart-transcription/issues
- Email : support@smart-transcription.com
- Documentation : Cette documentation MkDocs


Bonne lecture !