BrainyTech
Back to case studiesAI & Machine Learning

SakhaSaarthi: Voice-AI for Exam Prep

An exam prep platform where a student can speak an answer out loud and get evaluated, coached and corrected — in their own language — by a six-service AI system built to run on self-hosted models.

Client: SakhaSaarthi
Duration: 6 months
Visit website
React NativeNode.jsPythonPostgreSQLVoice AI
SakhaSaarthi logo

Key results achieved

Measurable outcomes that demonstrate the success and impact of this project.

6
services
2
languages
Real-time
voice Loop
01

The challenge

Most exam-prep apps stop at multiple-choice, but exams reward students who can explain an answer — construct it, say it, defend it — and that's the skill self-study apps almost never practice. Building a tool that actually listens to a student's spoken answer and coaches them on it meant solving three problems at once: real-time voice infrastructure, an AI evaluation loop accurate enough to trust, and a cost model that survives real usage without the token bill of a commercial LLM API for every question a student ever asks.

02

Our solution

We built SakhaSaarthi as six independently deployable services and the flagship voice-practice engine, Sakha AI — all orchestrated behind a single Node.js/Fastify gateway. Sakha AI holds a live conversation over one WebSocket connection: the student speaks, the system transcribes, scores the answer on accuracy, completeness and clarity, speaks its feedback back, and moves to the next question, with hints on request. Every model in the pipeline — the LLM, speech-to-text and text-to-speech — runs self-hosted via Ollama rather than a metered commercial API.

03

The impact

The result is production discipline, not just a working demo: each of the six services authenticates and rate-limits independently, a dropped connection resumes a practice session exactly where a student left off, and the entire AI pipeline runs on self-hosted models instead of per-token billing — serving students natively in both English and Hindi, voice and text.

Voice AI Architecture & Personalization Planning

Comprehensive planning and analysis phase that laid the foundation for project success.

1

Voice Infrastructure & Architecture Planning

3 weeks

  • Real-time WebSocket architecture for the speak-transcribe-evaluate-respond loop
  • Evaluation of self-hosted LLM options via Ollama against commercial API costs
  • Six-service domain split: syllabus, question generation, roadmaps, analytics, doubt chat, voice practice
  • Session resilience design so a dropped connection resumes without losing progress
2

Personalization & Content Model Design

2 weeks

  • Adaptive roadmap logic mapped to board, class, stream and subject
  • Mastery analytics model tied to per-concept performance
  • Question bank design to avoid repeat questions and keep LLM calls out of the request path
  • Bilingual (English/Hindi) content and interaction flow planning
3

Interaction & UX Design

2 weeks

  • Speak-and-be-coached loop UX across listen, transcribe, evaluate and respond
  • Manual tap-to-answer control after live testing showed automatic speech-end detection misfired
  • Doubt-solving chat scoped to the student's active syllabus
  • Mobile-first React Native interaction design for voice sessions

Six-Service Platform Build & Voice AI Integration

Systematic implementation approach using Agile development with service-by-service delivery to ensure quality delivery.

1

Core Platform & Gateway

5 weeks

React Native mobile app with authentication and role-based permissions
Node.js/Fastify gateway orchestrating all six backend services
PostgreSQL with isolated schemas per service on a single instance
Syllabus & content service powering the core curriculum data
2

Sakha AI Voice Engine

8 weeks

Real-time WebSocket voice loop: speech-to-text, evaluation, text-to-speech
Answer scoring across accuracy, completeness and clarity
Session state rebuilt from saved progress on reconnect
Self-hosted LLM, STT and TTS models deployed via Ollama
3

Personalization Services

5 weeks

Adaptive roadmap generation per student
Mastery analytics tracking per-concept strengths and weaknesses
Question generation service with pooled, non-repeating delivery
AI doubt-solving chat scoped to the active syllabus
4

Hardening & Production Readiness

3 weeks

Independent authentication and rate limiting per service
Database connections scoped to only what each request needs
Bilingual voice and text support across English and Hindi
Load testing for concurrent practice sessions

Platform Architecture & AI Performance Results

Comprehensive analysis of the project's impact across multiple business dimensions.

Platform Architecture & Reliability

  • Six independently deployable services behind a single gateway
  • Each service authenticates and rate-limits independently
  • Dropped connections resume mid-session from saved state, not from zero
  • Single PostgreSQL instance with isolated schemas per service

AI & Personalization

  • Real-time voice loop evaluating accuracy, completeness and clarity
  • Self-hosted LLM, speech-to-text and text-to-speech via Ollama — no per-token billing
  • Adaptive roadmaps and mastery analytics personalized per student
  • Bilingual support across English and Hindi, voice and text

Long-term benefits

Cost model that scales with infrastructure, not with every question a student asks
Service-per-domain architecture ready for new subjects, boards or languages without a rewrite
Automatic speech-end detection groundwork in place for a more ambient interaction model later
Foundation for expanding Sakha AI's voice coaching beyond board-exam prep

Technologies & tools

Carefully selected technology stack optimized for performance, scalability, and maintainability.

React Native

Cross-platform mobile app for the student-facing experience

Node.js / Fastify

API gateway handling auth, sessions and routing to all six services

Python

AI services for voice evaluation, question generation and adaptive logic

Ollama

Self-hosted LLM, speech-to-text and text-to-speech models

PostgreSQL

Single instance with isolated schemas per service

WebSocket

Real-time speak-transcribe-evaluate-respond voice loop

Six Services, One Gateway

A single Node.js/Fastify gateway orchestrates six independently deployable services, each authenticating and rate-limiting on its own.

React Native App
Node.js/Fastify Gateway
Six AI & Data Services
PostgreSQL (isolated schemas)
Service-per-DomainSelf-Hosted ModelsReal-Time Voice LoopSession Resilience
OllamaWebSocketSpeech-to-TextText-to-Speech

Key engineering highlights

01

Built automatic, shipped manual — on purpose

Automatic speech-end detection cut students off mid-sentence and mis-fired on background noise in live testing. The team shipped a simple tap-to-answer control instead, keeping the automatic-detection groundwork in place for a later, more ambient phase.

02

A dropped connection doesn't cost a session

If the voice service restarts mid-practice, a reconnecting student resumes exactly where they left off — question, score and all — rebuilt from what was already saved.

03

Self-hosted models, not per-token billing

Every evaluation, hint and generated question runs against self-hosted open models via Ollama rather than a metered commercial API, so cost scales with infrastructure, not usage.

04

Question bank, not question mill

Questions are generated once, pooled, and served without repeats per student — instead of an LLM call sitting in the critical path of every session.

Ready to start your project?

Let's discuss how we can help you achieve similar success — get in touch for a free consultation and project assessment.