Skip to main content

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

EnvironmentPathBranch
Production/home/dash_ra/dmsb-dash-labs/presbot-server-prodworking_v4
UAT/home/dash_ra/dmsb-dash-labs/presbot-server-uatrelease/uat

Default Ports

ServiceProductionUAT
Flask API69696970
Flower (Celery Monitor)55555556
Whisper ServiceInternal :9000Internal :9000

GPU Allocation

EnvironmentGPU ID
ProductionGPU 0
UATGPU 1

Tech Stack

Core

TechnologyPurpose
Python 3.10+Primary language
FlaskREST API framework
CeleryAsync task queue
RedisMessage broker & caching

AI/ML

TechnologyPurpose
faster-whisperSpeech-to-text transcription
F5-TTSVoice cloning (text-to-speech)
vLLM (Gemma 12B)LLM inference for grading
PyTorch 2.7+Deep learning framework
transformersHugging Face models

Audio Processing

LibraryPurpose
librosaAudio feature extraction
praat-parselmouthProsody analysis (pitch, jitter)
webrtcvadVoice Activity Detection
soundfileAudio file I/O

Infrastructure

TechnologyPurpose
Docker ComposeContainer orchestration
NVIDIA CUDA 12.8GPU acceleration
MinIOObject storage (audio files)
MongoDBDatabase
GitHub ActionsCI/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

VariableDescriptionDefault
ENVIRONMENTproduction or uatproduction
SERVER_PORTFlask API port6969
GPU_IDCUDA device ID0
REDIS_URLRedis connection stringredis://redis:6379/0
MONGO_URIMongoDB connection
MINIO_ENDPOINTMinIO storage URL
JWT_SECRETAuthentication 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

EndpointMethodDescription
/healthGETHealth check
/api/grade-presentationPOSTSubmit presentation for grading
/api/task-status/<task_id>GETCheck grading task status
/api/agent-statusGETCheck AI agent status