You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An AI-powered speaking/language practice application with multi-provider LLM support, real-time WebSocket chat, speech processing, and comprehensive evaluation scoring.
WebSocket: ws/roleplay/{session_id} (send/receive messages, end session)
RoleplayEngine: context-aware AI replies, 7-dimension evaluation
Frontend: RolePlayPage with setup → conversation → report flow
Multi-Provider LLM System (Post Phase 11)
FallbackLLMProvider chains providers in order (configurable via LLM_PROVIDER_ORDER)
Providers: OpenAI, Grok, Gemini, DeepSeek — skips any with missing API keys
Auto-retries on failure, falls through to next provider
ElevenLabs TTS (Post Phase 11)
FallbackTTS chains ElevenLabs → OpenAI TTS
Configurable via TTS_PROVIDER_ORDER
Quick Start
1. Environment Variables
cp .env.example .env
# Fill in at minimum:# POSTGRES_PASSWORD, JWT_SECRET# At least one LLM key (OPENAI_API_KEY recommended)# DEEPGRAM_API_KEY (for STT)
2. Docker (Recommended)
docker-compose up -d
# Backend: http://localhost:8000# Frontend: http://localhost:5173# API docs: http://localhost:8000/docs
3. Manual
# Start Postgres + Redis first# Backendcd backend
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload --port 8000
# Frontend (new terminal)cd frontend
npm install
npm run dev
4. Production
docker-compose -f docker-compose.prod.yml up -d
# App served via nginx on port 80
Conversation Modes
Mode
Description
AI Role
AI 1-on-1
User talks with AI partner
Active conversationalist
Peer Monitored
Two users talk, AI watches silently
Silent observer, scores both
Public Room
Up to 5 speakers + unlimited listeners
Moderator (topic, turns)
AI Roleplay
User plays a scenario with AI character
Role-play partner + evaluator
Evaluation Dimensions
Each session scores users on 8 dimensions (0–100):
Dimension
What It Measures
Fluency
Speech flow, hesitation, filler words
Grammar
Sentence structure, tense, agreement
Vocabulary
Word range, precision, sophistication
Pronunciation
Phoneme accuracy, stress patterns
Coherence
Logical flow, topic maintenance
Confidence
Assertiveness, pace, delivery
Engagement
Active participation, questions asked
Listening
Response relevance, follow-up quality
Key Files Reference
What
File
All env vars
.env.example
Backend entry
backend/app/main.py
All config
backend/app/core/config.py
LLM providers
backend/app/services/ai_service.py
TTS/STT
backend/app/services/speech_service.py
Roleplay engine
backend/app/services/roleplay_service.py
Frontend entry
frontend/src/main.tsx
All routes
frontend/src/App.tsx
API client
frontend/src/lib/api.ts
Auth state
frontend/src/stores/authStore.ts
All TS types
frontend/src/types/index.ts
Docker dev
docker-compose.yml
Docker prod
docker-compose.prod.yml
nginx
nginx/nginx.conf
About
An AI-powered communication training platform where users practice conversations with AI or peers and receive automated feedback on fluency, grammar, vocabulary, and overall speaking performance.