PresBot Server
AI-powered presentation grading and voice coaching platform.
GitHub Repository: https://github.com/dmsb-dash-labs/presbot-server
Server Location
Blackwell Server - NVIDIA GPU Workstation
| Environment | Path | Branch |
|---|---|---|
| Production | /home/dash_ra/dmsb-dash-labs/presbot-server-prod | working_v4 |
| UAT | /home/dash_ra/dmsb-dash-labs/presbot-server-uat | release/uat |
Default Ports
| Service | Production | UAT |
|---|---|---|
| Flask API | 6969 | 6970 |
| Flower (Celery Monitor) | 5555 | 5556 |
| Whisper Service | Internal :9000 | Internal :9000 |
GPU Allocation
| Environment | GPU ID |
|---|---|
| Production | GPU 0 |
| UAT | GPU 1 |
Tech Stack
Core
| Technology | Purpose |
|---|---|
| Python 3.10+ | Primary language |
| Flask | REST API framework |
| Celery | Async task queue |
| Redis | Message broker & caching |
AI/ML
| Technology | Purpose |
|---|---|
| faster-whisper | Speech-to-text transcription |
| F5-TTS | Voice cloning (text-to-speech) |
| vLLM (Gemma 12B) | LLM inference for grading |
| PyTorch 2.7+ | Deep learning framework |
| transformers | Hugging Face models |
Audio Processing
| Library | Purpose |
|---|---|
| librosa | Audio feature extraction |
| praat-parselmouth | Prosody analysis (pitch, jitter) |
| webrtcvad | Voice Activity Detection |
| soundfile | Audio file I/O |
Infrastructure
| Technology | Purpose |
|---|---|
| Docker Compose | Container orchestration |
| NVIDIA CUDA 12.8 | GPU acceleration |
| MinIO | Object storage (audio files) |
| MongoDB | Database |
| GitHub Actions | CI/CD pipeline |
Folder Structure
presbot-server/
├── api/ # Flask REST API
│ └── app.py # Main API routes & endpoints
│
├── agents/ # AI Grading Agents
│ ├── audio_grading_agent.py # Evaluates audio delivery metrics
│ ├── script_grading_agent.py # Evaluates script content quality
│ ├── comparative_grading_agent.py # Compares against rubric criteria
│ └── combined_feedback_agent.py # Generates holistic feedback
│
├── tasks/ # Celery Async Tasks
│ └── grading_task.py # Main grading task orchestration
│
├── voicecoach/ # Voice Coaching Module
│ ├── app.py # VoiceCoach API endpoints
│ ├── asr_whisper.py # Whisper transcription wrapper
│ ├── coach_ollama.py # LLM-based coaching feedback
│ ├── metrics.py # Speech metrics calculation
│ ├── prosody_librosa.py # Prosody analysis (librosa)
│ ├── prosody_praat.py # Prosody analysis (Praat)
│ ├── nlp_features.py # NLP feature extraction
│ ├── rubric.py # Grading rubric definitions
│ └── demo_assets/ # Sample audio files for testing
│
├── utils/ # Shared Utilities
│ ├── llm_session.py # HTTP session management for LLM
│ ├── toon_encoder.py # TONL token-optimized encoding
│ └── utils.py # Common helper functions
│
├── config/ # Configuration
│ ├── config.py # Application settings
│ ├── rubric.json # Audio grading rubric
│ └── script_rubric.json # Script grading rubric
│
├── src/f5_tts/ # F5-TTS Voice Cloning Library
│ ├── api.py # TTS API interface
│ ├── model/ # Model architecture
│ ├── infer/ # Inference utilities
│ └── configs/ # Model configurations
│
├── voices/ # Voice Reference Audio
│ └── *.wav # Speaker reference files for cloning
│
├── ckpts/ # Model Checkpoints
│ └── (downloaded at runtime)
│
├── logs/ # Application Logs
│ ├── presbot_server.log
│ └── presbot_server_uat.log
│
├── .github/workflows/ # CI/CD
│ └── deploy.yml # GitHub Actions deployment
│
├── docker-compose.yml # Container orchestration
├── Dockerfile # Container build instructions
├── requirements.txt # Python dependencies
├── celery_app.py # Celery application config
├── whisper_service.py # Standalone Whisper microservice
├── start_server.py # Flask app entry point
├── env_config.py # Environment detection (UAT/Prod)
└── start.sh # Startup script
Services Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ Docker Network │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────────┐ ┌──────────────────┐ │
│ │ Redis │◄───│ Flask API │◄───│ Celery Workers │ │
│ │ :6379 │ │ :6969 │ │ (scalable) │ │
│ └─────────┘ └─────────────┘ └──────────────────┘ │
│ ▲ │ │ │
│ │ ▼ ▼ │
│ │ ┌───────────┐ ┌──────────┐ │
│ └────────│ Flower │ │ Whisper │ │
│ │ :5555 │ │ :9000 │ │
│ └───────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────┘
│
┌─────────────┴─────────────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ MongoDB │ │ MinIO │
│ :27017 │ │ :9000 │
└──────────┘ └──────────┘
(host) (host)
Environment Variables
| Variable | Description | Default |
|---|---|---|
ENVIRONMENT | production or uat | production |
SERVER_PORT | Flask API port | 6969 |
GPU_ID | CUDA device ID | 0 |
REDIS_URL | Redis connection string | redis://redis:6379/0 |
MONGO_URI | MongoDB connection | — |
MINIO_ENDPOINT | MinIO storage URL | — |
JWT_SECRET | Authentication secret | — |
Quick Commands
Start Services
# Production
cd /home/dash_ra/dmsb-dash-labs/presbot-server-prod
docker-compose up -d
# UAT
cd /home/dash_ra/dmsb-dash-labs/presbot-server-uat
docker-compose up -d
Scale Workers
# Scale Celery workers
docker-compose up -d --scale celery-worker=3
# Scale Whisper service
docker-compose up -d --scale whisper-service=2
View Logs
# API logs
docker-compose logs -f api
# Worker logs
docker-compose logs -f celery-worker
# All services
docker-compose logs -f
Rebuild (After Code Changes)
docker-compose up -d --build
Key API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/api/grade-presentation | POST | Submit presentation for grading |
/api/task-status/<task_id> | GET | Check grading task status |
/api/agent-status | GET | Check AI agent status |
Related Documentation
- Frontend - PresBot frontend application
- UI Deployment - Frontend deployment guide
- Server Deployment - Backend deployment guide
- Blackwell Server - GPU server details