Version: 2.2 (Phase 5: MediaSoup SFU Complete)
Status: ✅ PRODUCTION - Phase 5 COMPLETE 🎉
Last Updated: November 17, 2025
🔗 Live Demo: https://jbcalling.site ✅
📊 WebRTC Gateway: https://webrtc.jbcalling.site ✅
📚 API Docs: https://api.jbcalling.site ✅
🎥 Video Calling: Full bidirectional video/audio working ✅
Phase 5: 100% COMPLETE - MediaSoup SFU Full Bidirectional Video 🎉
✅ 13/13 Services Running (100%) - Deprecated P2P signaling removed
✅ Frontend v1.0.43 Deployed (Complete MediaSoup SFU Implementation)
✅ Gateway v1.0.7 Running (MediaSoup SFU with CORS fix)
✅ IPv6 Dual-Stack (Gateway 1.0.6-ipv6 deployed)
✅ WebRTC Firewall Configured (UDP/TCP 40000-40100, IPv4 + IPv6)
✅ Full Bidirectional Video (Host ↔ Join users)
✅ Consume Existing Producers (Late join sees all participants)
✅ Architecture Simplified (Removed P2P signaling, unified Gateway SFU)
Latest: 8 critical Gateway API compatibility fixes completed
Architecture: MediaSoup SFU with consume existing producers logic
Next Phase: Translation pipeline integration (STT → Translation → TTS)
Details: See SYSTEM-STATUS-OCT15-2025.md
➡️ Investigation: TRAEFIK-GATEWAY-INVESTIGATION-OCT15.md
➡️ Next Steps: WRAP-UP-OCT15.md
October 14:
October 15:
Hệ thống videocall đa người với dịch thuật tự động thời gian thực, hỗ trợ 10+ ngôn ngữ, bao gồm tiếng Việt.
| Tier | Features | Target Users |
|---|---|---|
| 🆓 Free | Text captions + gTTS audio | Individual users |
| 💎 Premium | + XTTS voice clone (async) | Professionals |
| 💼 Pro | + Speaker diarization | Small teams |
| 🏢 Enterprise | Custom model + SLA | Corporations |
Core Features:
Latency (End-to-end):
STT: ~400-600ms (PhoWhisper streaming)
Translation: ~300-500ms (NLLB-200 cached)
TTS: ~1.2s first chunk, ~80ms streaming (XTTS v2)
Total: <1.5s (meets target)
Accuracy (Benchmarks):
STT: >90% (PhoWhisper Vietnamese)
Translation: BLEU >35 (NLLB-200)
Voice similarity: >80% (XTTS v2)
Capacity (Current):
Concurrent rooms: 5-10 rooms
Users per room: 4-6 (optimal), max 10
Total concurrent: 20-60 users
WebRTC: 2 MediaSoup workers (translation02)
| Aspect | v1.0 Original | v2.0 Revised | Justification |
|---|---|---|---|
| Voice Synthesis | XTTS real-time | gTTS + XTTS async | XTTS takes 30-60s on CPU |
| End-to-end Latency | <1s target | 1.3-1.5s acceptable | SOTA research: 2-2.5s |
| Diarization | Always-on | Optional (Pro tier) | CPU-intensive (maxes cores) |
| Concurrent Capacity | 10+ rooms | 3-5 rooms (scalable) | STT bottleneck validated |
| User Model | Single tier | Free/Premium/Pro/Enterprise | Match value to features |
Research Sources: Nature 2024, ICLR 2024, IWSLT 2024, production GitHub issues
Economic Model Validated:
| Component | Technology | Performance | Tier |
|---|---|---|---|
| Orchestration | Docker Swarm | 3 instances | All |
| Backend | FastAPI (Python) | Async, <50ms overhead | All |
| Frontend | React + Next.js | SSR, responsive | All |
| WebRTC | MediaSoup 3.x | ~500 consumers/worker | All |
| STT | Whisper small-int8 | 500-800ms, 85-92% | All |
| STT Vietnamese | PhoWhisper-large | 90-95% accuracy | Pro |
| Translation | NLLB-200-distilled | 150-300ms, 85-90% | All |
| Quick TTS | gTTS | 200-300ms, MOS 3.0 | Free |
| Voice Clone | XTTS v2 | 30-60s async, MOS 4.5 | Premium |
| Fallback TTS | pyttsx3 | 100ms offline | All |
| Diarization | PyAnnote 3.1 | 88% accuracy, opt-in | Pro |
| Database | PostgreSQL + pgvector | Vector search | All |
| Cache/Queue | Redis + Celery | Background jobs | All |
| Monitoring | Prometheus + Grafana | Real-time metrics | All |
⚠️ UPDATED: Cấu hình thực tế (Oct 4, 2025)
Instance 1 (translation01):
Type: c4d-standard-4 (⚠️ REDUCED from c2d-highcpu-8)
CPU: 4 vCPUs (AMD Turin)
RAM: 15 GB
Disk: 100GB Hyperdisk Balanced
Location: asia-southeast1-a
Public IP: 34.143.235.114
Internal IP: 10.148.0.5
Role: Manager + AI Processing
⚠️ Risk: Chỉ 2GB RAM overhead, cần monitor sát
Instance 2 (translation02):
Type: c2d-standard-4 (⚠️ REDUCED from c2d-highcpu-8)
CPU: 4 vCPUs (AMD Milan)
RAM: 16 GB
Disk: 100GB SSD persistent
Location: asia-southeast1-b
Public IP: 34.142.190.250
Internal IP: 10.148.0.3
Role: Worker + WebRTC Gateway
⚠️ Capacity: 2 workers (thay vì 6), ~1000 consumers
Instance 3 (translation03):
Type: c2d-highcpu-4
CPU: 4 vCPUs
RAM: 8 GB
Disk: 50GB SSD persistent
Location: asia-southeast1-c (TBD)
Role: Worker + Monitoring
Original Target (8 vCPU):
Concurrent rooms: 3-5
MediaSoup workers: 6
Total consumers: 3000
Adjusted Reality (4 vCPU):
Concurrent rooms: 1-2 (MVP safe)
MediaSoup workers: 2
Total consumers: ~1000
STT latency: ~1.5-2s (slower)
⚠️ Recommendation:
- Start with 1 room, 4-6 users
- Monitor performance closely
- Upgrade to 8 vCPU if need to scale
CRITICAL: Điền thông tin thực vào docs/00-REQUIRED-INFO.md
Xem chi tiết: docs/00-REQUIRED-INFO.md
Sau khi đọc tài liệu, quyết định:
00-REQUIRED-INFO.md → Bắt đầu Phase 1# Clone repository
git clone <repo-url>
cd jbcalling_translation_realtime
# Điền thông tin thực
nano docs/00-REQUIRED-INFO.md
# Setup Docker Swarm (trên translation01)
./scripts/setup/init-swarm.sh
# Deploy stack
docker stack deploy -c infrastructure/swarm/stack.yml translation
# Verify
docker service ls
docker stack ps translation
Chi tiết: Xem docs/02-SETUP-GUIDE.md (sẽ update sau)
| File | Purpose | Status | Read Time |
|---|---|---|---|
00-REQUIRED-INFO.md | Credentials checklist | ⚠️ CẦN ĐIỀN | 5 min |
01-ARCHITECTURE.md | System architecture | ✅ UPDATED v2.0 | 20 min |
05-AI-MODELS.md | AI model configs | ✅ UPDATED v2.0 | 15 min |
12-FEASIBILITY-ANALYSIS.md | Full research | ✅ NEW | 30 min |
FEASIBILITY-SUMMARY.md | Executive summary | ✅ NEW | 5 min |
UPDATE-SUMMARY.md | Change log v2.0 | ✅ NEW | 10 min |
STATUS.md | Project status | ✅ UPDATED | 5 min |
| File | Purpose | Status |
|---|---|---|
02-SETUP-GUIDE.md | Infrastructure setup | 🔄 TBD |
03-DOCKER-SWARM.md | Swarm configuration | 🔄 TBD |
04-SERVICES.md | Service specifications | 🔄 TBD |
06-WEBRTC.md | WebRTC implementation | 🔄 TBD |
07-API-REFERENCES.md | API documentation | 🔄 TBD |
08-DEPLOYMENT.md | Deployment guide | 🔄 TBD |
09-MONITORING.md | Monitoring setup | 🔄 TBD |
10-TROUBLESHOOTING.md | Common issues | 🔄 TBD |
11-ROADMAP.md | Development roadmap | 🔄 TBD |
Total: 21 weeks (~5 months)
Performance:
Text latency: <900ms (target: 650ms avg)
Audio latency: <1.5s (target: 1.3s avg)
Concurrent rooms: 3-5 per instance
Uptime: >99.5%
Accuracy:
STT WER: <10% (English), <15% (Vietnamese)
Translation BLEU: >30 (industry standard)
Voice similarity: >80% (user satisfaction)
Capacity:
Users per room: 4-6 (optimal)
Total concurrent: 15-50 (MVP), 100-200 (Growth)
CPU usage: <80% sustained
Memory usage: <70% sustained
MVP Target (3 months):
Free users: 100-300
Premium users: 20-50
Revenue: $100-250/month
Cost: $600/month
Status: Loss acceptable (validation phase)
Growth Target (6 months):
Free users: 500-1000
Premium users: 120-200
Revenue: $600-1000/month
Cost: $600-800/month
Status: Breakeven
Scale Target (12 months):
Free users: 2000-5000
Premium users: 300-500
Pro users: 20-50
Revenue: $2500-4000/month
Cost: $1200-1500/month
Status: Profitable 2x
Vui lòng đọc docs/01-ARCHITECTURE.md và .github/copilot-instructions.md trước khi contribute.
docs/ folder[Chưa xác định - TBD]
Research Papers:
Open-source Projects:
Last Updated: 2025-01-04
Version: 2.0
Status: ✅ Feasibility Validated - Ready for Implementation
Trước khi setup, bạn cần chuẩn bị:
Hugging Face Token (Required)
Instance IPs
Domain Name (Recommended)
Secrets
git clone <REPOSITORY_URL>
cd jbcalling_translation_realtime
BẮT BUỘC đọc các documents theo thứ tự:
docs/
├── 01-ARCHITECTURE.md # Hiểu kiến trúc hệ thống
├── 02-SETUP-GUIDE.md # Hướng dẫn setup chi tiết
├── 05-AI-MODELS.md # Thông tin về AI models
└── 11-ROADMAP.md # Kế hoạch phát triển
# Install dependencies
pip install -r requirements.txt
npm install
# Setup pre-commit hooks
pre-commit install
# Run tests
pytest
npm test
Follow: docs/02-SETUP-GUIDE.md
┌─────────────────────────────────────────┐
│ Load Balancer (Traefik) │
└────────────┬────────────────────────────┘
│
┌──────┴──────┐
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Frontend │ │ API │
│ React │ │ FastAPI │
└──────────┘ └─────┬────┘
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│WebRTC │ │ Redis │ │Postgres│
│Gateway │ │ Queue │ │ DB │
└────┬───┘ └────┬───┘ └────────┘
│ │
└────┬─────┘
│
┌────────┼────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────┐ ┌──────┐
│Whisper │ │NLLB │ │XTTS │
│ (STT) │ │(TL) │ │(TTS) │
└─────────┘ └─────┘ └──────┘
Xem chi tiết: docs/01-ARCHITECTURE.md
jbcalling_translation_realtime/
├── .github/ # GitHub workflows, copilot instructions
├── docs/ # Documentation
├── services/ # Microservices
│ ├── api/ # API Gateway (FastAPI)
│ ├── transcription/ # Speech-to-text service
│ ├── translation/ # Translation service
│ ├── voice-cloning/ # Voice synthesis service
│ ├── diarization/ # Speaker diarization
│ ├── gateway/ # WebRTC gateway (MediaSoup)
│ ├── frontend/ # React frontend
│ └── monitoring/ # Monitoring stack
├── shared/ # Shared code
│ ├── models/ # Data models
│ ├── utils/ # Utilities
│ └── config/ # Configurations
├── infrastructure/ # Infrastructure as Code
│ ├── docker-compose.yml # Development compose
│ └── swarm/ # Production stack files
├── scripts/ # Automation scripts
│ ├── setup/ # Setup scripts
│ ├── deploy/ # Deployment scripts
│ └── maintenance/ # Maintenance scripts
└── tests/ # Test suites
Xem chi tiết: .github/copilot-instructions.md
# Start core services
docker-compose up -d postgres redis
# Start API
cd services/api
uvicorn main:app --reload
# Start transcription service
cd services/transcription
python main.py
# Start frontend
cd services/frontend
npm run dev
# Unit tests
pytest tests/unit/
# Integration tests
pytest tests/integration/
# E2E tests
pytest tests/e2e/
# Load tests
locust -f tests/load/locustfile.py
docker-compose up -d
# Deploy stack
docker stack deploy -c infrastructure/swarm/stack.yml translation
# Scale services
docker service scale translation_transcription=4
Xem chi tiết: docs/08-DEPLOYMENT.md
Access monitoring dashboards:
Default credentials:
Xem chi tiết: docs/09-MONITORING.md
Service won't start
# Check logs
docker service logs translation_<service_name>
# Check events
docker events --filter 'type=service'
Out of memory
# Check usage
docker stats
# Scale down
docker service scale translation_transcription=1
Model loading fails
# Re-download models
docker exec -it <container> python scripts/download_models.py
Xem chi tiết: docs/10-TROUBLESHOOTING.md
We welcome contributions! Please:
git checkout -b feature/amazing-feature)git commit -m 'feat: Add amazing feature')git push origin feature/amazing-feature)feat: Add new feature
fix: Fix bug
docs: Update documentation
refactor: Code refactoring
test: Add tests
chore: Maintenance tasks
Messages in Vietnamese are encouraged for business logic changes.
[Specify your license here]
Architecture Version: 2.0
Implementation Status: Phase 0 Complete (Research & Planning)
Xem chi tiết: docs/11-ROADMAP.md
If you find this project useful, please give it a ⭐!
Built with ❤️ using only CPU and free software
Version: 2.0 | Last Updated: 2025-01-04
Version: 2.2 (Phase 5: MediaSoup SFU Complete)
Status: ✅ PRODUCTION - Phase 5 COMPLETE 🎉
Last Updated: November 17, 2025
🔗 Live Demo: https://jbcalling.site ✅
📊 WebRTC Gateway: https://webrtc.jbcalling.site ✅
📚 API Docs: https://api.jbcalling.site ✅
🎥 Video Calling: Full bidirectional video/audio working ✅
Phase 5: 100% COMPLETE - MediaSoup SFU Full Bidirectional Video 🎉
✅ 13/13 Services Running (100%) - Deprecated P2P signaling removed
✅ Frontend v1.0.43 Deployed (Complete MediaSoup SFU Implementation)
✅ Gateway v1.0.7 Running (MediaSoup SFU with CORS fix)
✅ IPv6 Dual-Stack (Gateway 1.0.6-ipv6 deployed)
✅ WebRTC Firewall Configured (UDP/TCP 40000-40100, IPv4 + IPv6)
✅ Full Bidirectional Video (Host ↔ Join users)
✅ Consume Existing Producers (Late join sees all participants)
✅ Architecture Simplified (Removed P2P signaling, unified Gateway SFU)
Latest: 8 critical Gateway API compatibility fixes completed
Architecture: MediaSoup SFU with consume existing producers logic
Next Phase: Translation pipeline integration (STT → Translation → TTS)
Details: See SYSTEM-STATUS-OCT15-2025.md
➡️ Investigation: TRAEFIK-GATEWAY-INVESTIGATION-OCT15.md
➡️ Next Steps: WRAP-UP-OCT15.md
October 14:
October 15:
Hệ thống videocall đa người với dịch thuật tự động thời gian thực, hỗ trợ 10+ ngôn ngữ, bao gồm tiếng Việt.
| Tier | Features | Target Users |
|---|---|---|
| 🆓 Free | Text captions + gTTS audio | Individual users |
| 💎 Premium | + XTTS voice clone (async) | Professionals |
| 💼 Pro | + Speaker diarization | Small teams |
| 🏢 Enterprise | Custom model + SLA | Corporations |
Core Features:
Latency (End-to-end):
STT: ~400-600ms (PhoWhisper streaming)
Translation: ~300-500ms (NLLB-200 cached)
TTS: ~1.2s first chunk, ~80ms streaming (XTTS v2)
Total: <1.5s (meets target)
Accuracy (Benchmarks):
STT: >90% (PhoWhisper Vietnamese)
Translation: BLEU >35 (NLLB-200)
Voice similarity: >80% (XTTS v2)
Capacity (Current):
Concurrent rooms: 5-10 rooms
Users per room: 4-6 (optimal), max 10
Total concurrent: 20-60 users
WebRTC: 2 MediaSoup workers (translation02)
| Aspect | v1.0 Original | v2.0 Revised | Justification |
|---|---|---|---|
| Voice Synthesis | XTTS real-time | gTTS + XTTS async | XTTS takes 30-60s on CPU |
| End-to-end Latency | <1s target | 1.3-1.5s acceptable | SOTA research: 2-2.5s |
| Diarization | Always-on | Optional (Pro tier) | CPU-intensive (maxes cores) |
| Concurrent Capacity | 10+ rooms | 3-5 rooms (scalable) | STT bottleneck validated |
| User Model | Single tier | Free/Premium/Pro/Enterprise | Match value to features |
Research Sources: Nature 2024, ICLR 2024, IWSLT 2024, production GitHub issues
Economic Model Validated:
| Component | Technology | Performance | Tier |
|---|---|---|---|
| Orchestration | Docker Swarm | 3 instances | All |
| Backend | FastAPI (Python) | Async, <50ms overhead | All |
| Frontend | React + Next.js | SSR, responsive | All |
| WebRTC | MediaSoup 3.x | ~500 consumers/worker | All |
| STT | Whisper small-int8 | 500-800ms, 85-92% | All |
| STT Vietnamese | PhoWhisper-large | 90-95% accuracy | Pro |
| Translation | NLLB-200-distilled | 150-300ms, 85-90% | All |
| Quick TTS | gTTS | 200-300ms, MOS 3.0 | Free |
| Voice Clone | XTTS v2 | 30-60s async, MOS 4.5 | Premium |
| Fallback TTS | pyttsx3 | 100ms offline | All |
| Diarization | PyAnnote 3.1 | 88% accuracy, opt-in | Pro |
| Database | PostgreSQL + pgvector | Vector search | All |
| Cache/Queue | Redis + Celery | Background jobs | All |
| Monitoring | Prometheus + Grafana | Real-time metrics | All |
⚠️ UPDATED: Cấu hình thực tế (Oct 4, 2025)
Instance 1 (translation01):
Type: c4d-standard-4 (⚠️ REDUCED from c2d-highcpu-8)
CPU: 4 vCPUs (AMD Turin)
RAM: 15 GB
Disk: 100GB Hyperdisk Balanced
Location: asia-southeast1-a
Public IP: 34.143.235.114
Internal IP: 10.148.0.5
Role: Manager + AI Processing
⚠️ Risk: Chỉ 2GB RAM overhead, cần monitor sát
Instance 2 (translation02):
Type: c2d-standard-4 (⚠️ REDUCED from c2d-highcpu-8)
CPU: 4 vCPUs (AMD Milan)
RAM: 16 GB
Disk: 100GB SSD persistent
Location: asia-southeast1-b
Public IP: 34.142.190.250
Internal IP: 10.148.0.3
Role: Worker + WebRTC Gateway
⚠️ Capacity: 2 workers (thay vì 6), ~1000 consumers
Instance 3 (translation03):
Type: c2d-highcpu-4
CPU: 4 vCPUs
RAM: 8 GB
Disk: 50GB SSD persistent
Location: asia-southeast1-c (TBD)
Role: Worker + Monitoring
Original Target (8 vCPU):
Concurrent rooms: 3-5
MediaSoup workers: 6
Total consumers: 3000
Adjusted Reality (4 vCPU):
Concurrent rooms: 1-2 (MVP safe)
MediaSoup workers: 2
Total consumers: ~1000
STT latency: ~1.5-2s (slower)
⚠️ Recommendation:
- Start with 1 room, 4-6 users
- Monitor performance closely
- Upgrade to 8 vCPU if need to scale
CRITICAL: Điền thông tin thực vào docs/00-REQUIRED-INFO.md
Xem chi tiết: docs/00-REQUIRED-INFO.md
Sau khi đọc tài liệu, quyết định:
00-REQUIRED-INFO.md → Bắt đầu Phase 1# Clone repository
git clone <repo-url>
cd jbcalling_translation_realtime
# Điền thông tin thực
nano docs/00-REQUIRED-INFO.md
# Setup Docker Swarm (trên translation01)
./scripts/setup/init-swarm.sh
# Deploy stack
docker stack deploy -c infrastructure/swarm/stack.yml translation
# Verify
docker service ls
docker stack ps translation
Chi tiết: Xem docs/02-SETUP-GUIDE.md (sẽ update sau)
| File | Purpose | Status | Read Time |
|---|---|---|---|
00-REQUIRED-INFO.md | Credentials checklist | ⚠️ CẦN ĐIỀN | 5 min |
01-ARCHITECTURE.md | System architecture | ✅ UPDATED v2.0 | 20 min |
05-AI-MODELS.md | AI model configs | ✅ UPDATED v2.0 | 15 min |
12-FEASIBILITY-ANALYSIS.md | Full research | ✅ NEW | 30 min |
FEASIBILITY-SUMMARY.md | Executive summary | ✅ NEW | 5 min |
UPDATE-SUMMARY.md | Change log v2.0 | ✅ NEW | 10 min |
STATUS.md | Project status | ✅ UPDATED | 5 min |
| File | Purpose | Status |
|---|---|---|
02-SETUP-GUIDE.md | Infrastructure setup | 🔄 TBD |
03-DOCKER-SWARM.md | Swarm configuration | 🔄 TBD |
04-SERVICES.md | Service specifications | 🔄 TBD |
06-WEBRTC.md | WebRTC implementation | 🔄 TBD |
07-API-REFERENCES.md | API documentation | 🔄 TBD |
08-DEPLOYMENT.md | Deployment guide | 🔄 TBD |
09-MONITORING.md | Monitoring setup | 🔄 TBD |
10-TROUBLESHOOTING.md | Common issues | 🔄 TBD |
11-ROADMAP.md | Development roadmap | 🔄 TBD |
Total: 21 weeks (~5 months)
Performance:
Text latency: <900ms (target: 650ms avg)
Audio latency: <1.5s (target: 1.3s avg)
Concurrent rooms: 3-5 per instance
Uptime: >99.5%
Accuracy:
STT WER: <10% (English), <15% (Vietnamese)
Translation BLEU: >30 (industry standard)
Voice similarity: >80% (user satisfaction)
Capacity:
Users per room: 4-6 (optimal)
Total concurrent: 15-50 (MVP), 100-200 (Growth)
CPU usage: <80% sustained
Memory usage: <70% sustained
MVP Target (3 months):
Free users: 100-300
Premium users: 20-50
Revenue: $100-250/month
Cost: $600/month
Status: Loss acceptable (validation phase)
Growth Target (6 months):
Free users: 500-1000
Premium users: 120-200
Revenue: $600-1000/month
Cost: $600-800/month
Status: Breakeven
Scale Target (12 months):
Free users: 2000-5000
Premium users: 300-500
Pro users: 20-50
Revenue: $2500-4000/month
Cost: $1200-1500/month
Status: Profitable 2x
Vui lòng đọc docs/01-ARCHITECTURE.md và .github/copilot-instructions.md trước khi contribute.
docs/ folder[Chưa xác định - TBD]
Research Papers:
Open-source Projects:
Last Updated: 2025-01-04
Version: 2.0
Status: ✅ Feasibility Validated - Ready for Implementation
Trước khi setup, bạn cần chuẩn bị:
Hugging Face Token (Required)
Instance IPs
Domain Name (Recommended)
Secrets
git clone <REPOSITORY_URL>
cd jbcalling_translation_realtime
BẮT BUỘC đọc các documents theo thứ tự:
docs/
├── 01-ARCHITECTURE.md # Hiểu kiến trúc hệ thống
├── 02-SETUP-GUIDE.md # Hướng dẫn setup chi tiết
├── 05-AI-MODELS.md # Thông tin về AI models
└── 11-ROADMAP.md # Kế hoạch phát triển
# Install dependencies
pip install -r requirements.txt
npm install
# Setup pre-commit hooks
pre-commit install
# Run tests
pytest
npm test
Follow: docs/02-SETUP-GUIDE.md
┌─────────────────────────────────────────┐
│ Load Balancer (Traefik) │
└────────────┬────────────────────────────┘
│
┌──────┴──────┐
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Frontend │ │ API │
│ React │ │ FastAPI │
└──────────┘ └─────┬────┘
│
┌───────────┼───────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│WebRTC │ │ Redis │ │Postgres│
│Gateway │ │ Queue │ │ DB │
└────┬───┘ └────┬───┘ └────────┘
│ │
└────┬─────┘
│
┌────────┼────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────┐ ┌──────┐
│Whisper │ │NLLB │ │XTTS │
│ (STT) │ │(TL) │ │(TTS) │
└─────────┘ └─────┘ └──────┘
Xem chi tiết: docs/01-ARCHITECTURE.md
jbcalling_translation_realtime/
├── .github/ # GitHub workflows, copilot instructions
├── docs/ # Documentation
├── services/ # Microservices
│ ├── api/ # API Gateway (FastAPI)
│ ├── transcription/ # Speech-to-text service
│ ├── translation/ # Translation service
│ ├── voice-cloning/ # Voice synthesis service
│ ├── diarization/ # Speaker diarization
│ ├── gateway/ # WebRTC gateway (MediaSoup)
│ ├── frontend/ # React frontend
│ └── monitoring/ # Monitoring stack
├── shared/ # Shared code
│ ├── models/ # Data models
│ ├── utils/ # Utilities
│ └── config/ # Configurations
├── infrastructure/ # Infrastructure as Code
│ ├── docker-compose.yml # Development compose
│ └── swarm/ # Production stack files
├── scripts/ # Automation scripts
│ ├── setup/ # Setup scripts
│ ├── deploy/ # Deployment scripts
│ └── maintenance/ # Maintenance scripts
└── tests/ # Test suites
Xem chi tiết: .github/copilot-instructions.md
# Start core services
docker-compose up -d postgres redis
# Start API
cd services/api
uvicorn main:app --reload
# Start transcription service
cd services/transcription
python main.py
# Start frontend
cd services/frontend
npm run dev
# Unit tests
pytest tests/unit/
# Integration tests
pytest tests/integration/
# E2E tests
pytest tests/e2e/
# Load tests
locust -f tests/load/locustfile.py
docker-compose up -d
# Deploy stack
docker stack deploy -c infrastructure/swarm/stack.yml translation
# Scale services
docker service scale translation_transcription=4
Xem chi tiết: docs/08-DEPLOYMENT.md
Access monitoring dashboards:
Default credentials:
Xem chi tiết: docs/09-MONITORING.md
Service won't start
# Check logs
docker service logs translation_<service_name>
# Check events
docker events --filter 'type=service'
Out of memory
# Check usage
docker stats
# Scale down
docker service scale translation_transcription=1
Model loading fails
# Re-download models
docker exec -it <container> python scripts/download_models.py
Xem chi tiết: docs/10-TROUBLESHOOTING.md
We welcome contributions! Please:
git checkout -b feature/amazing-feature)git commit -m 'feat: Add amazing feature')git push origin feature/amazing-feature)feat: Add new feature
fix: Fix bug
docs: Update documentation
refactor: Code refactoring
test: Add tests
chore: Maintenance tasks
Messages in Vietnamese are encouraged for business logic changes.
[Specify your license here]
Architecture Version: 2.0
Implementation Status: Phase 0 Complete (Research & Planning)
Xem chi tiết: docs/11-ROADMAP.md
If you find this project useful, please give it a ⭐!
Built with ❤️ using only CPU and free software
Version: 2.0 | Last Updated: 2025-01-04