Skip to main content
04 / Case Study _03

Spanish Tutor Agent

Conversational Language Learning

StatusActive — in development
Stack
PythonFastAPIClaude APIWhisperElevenLabsNext.js 15WebRTCSupabase
Overview

A conversational AI agent purpose-built for Spanish language learning. The agent conducts real-time bilingual conversations, provides inline grammar corrections with explanations, adapts vocabulary and complexity to the learner's proficiency level, and maintains long-term progress tracking across sessions. Voice-first design with Whisper for speech recognition and ElevenLabs for natural Spanish speech synthesis. Curriculum-aware — follows structured lesson progressions while allowing freeform conversation practice.

Key Features

What Was Built

01

Voice Conversation Engine

WebRTC audio capture, Whisper transcription, Claude for response generation, ElevenLabs for native-quality Spanish TTS. Sub-2-second round-trip latency.

02

Adaptive Difficulty System

proficiency model tracks grammar accuracy, vocabulary range, and response complexity. Automatically adjusts conversation parameters per session.

03

Grammar Correction Pipeline

inline corrections with explanations in the learner's native language. Tracks recurring errors and generates targeted practice exercises.

04

Progress Tracking

session-over-session metrics: vocabulary acquired, grammar accuracy trends, conversation duration, topics covered. Exportable progress reports.

05

Curriculum Engine

structured lesson plans (A1 through C2) with grammar focus areas, vocabulary sets, and cultural context. Freeform mode available at any level.

06

Memory System

persistent learner profile with conversation history, mistake patterns, vocabulary gaps, and personal interests for contextual conversations.

Architecture

How It's Built

01

FastAPI backend with WebSocket connections for real-time audio streaming

02

Whisper API for speech-to-text with Spanish language optimization

03

Claude API with structured system prompts for pedagogical conversation

04

ElevenLabs API with multilingual v2 model for native Spanish speech

05

Supabase for user profiles, progress data, and session history

06

Redis for session state and real-time conversation context caching

07

Next.js 15 frontend with WebRTC audio capture and waveform visualization

08

Edge deployment on Vercel + Railway for low-latency audio processing

Tech Stack

Technical Stack

Layer
Technology
Backend
Python 3.12, FastAPI, WebSockets
AI / LLM
Claude API (Sonnet for conversation, Haiku for grammar checks)
Speech-to-Text
OpenAI Whisper API
Text-to-Speech
ElevenLabs Multilingual v2
Frontend
Next.js 15, React 19, TypeScript
Audio
WebRTC, Web Audio API, waveform visualization
Database
Supabase (PostgreSQL) — profiles, progress, sessions
Cache
Redis — session state, conversation context
Deployment
Vercel (frontend), Railway (API)
Outcomes

Results & Impact

sub-2-second

Voice-first Spanish learning with sub-2-second conversation latency

02

Learners progress through structured A1 to C2 curriculum at their own pace

03

Grammar accuracy tracking shows measurable improvement across sessions

04

Persistent memory creates personalized, contextual conversations

Tags
PythonFastAPIClaude APIWhisperElevenLabsNext.js 15WebRTCSupabase