Work Case study

Line Echo

AI-powered script rehearsal platform for actors. Upload screenplay PDFs, get AI scene partners with natural-sounding voices, and practice your lines with real-time on-device speech recognition that follows along as you speak.

Line Echo


The Problem

Actors need to rehearse their lines constantly, but finding a scene partner who's available, patient, and willing to run the same scene dozens of times isn't always possible. Traditional methods - recording yourself, asking friends, or reading off a page - don't simulate the back-and-forth rhythm of real dialogue.

The Solution

Line Echo is a web-based rehearsal tool that turns any screenplay into an interactive practice session. Upload a script, pick your character, and the platform handles everything else - voicing the other characters, listening to your lines, and tracking your progress through the scene.

How It Works

The rehearsal flow has three phases:

Script Upload and Parsing - Users upload screenplay PDFs or images. The system extracts text using OCR or direct PDF extraction, then uses AI to parse dialogue, identify characters, and analyze the emotional sentiment of each line. This sentiment data drives how the AI voices deliver their lines.

Voice Assignment - Before a session begins, users pick their character and assign voices to the remaining cast. Premium tiers get access to 28+ natural-sounding HD voices with distinct personalities. Free tier users get 10 standard voices.

Live Rehearsal - The session alternates between AI lines and user lines. When it's an AI character's turn, the platform plays text-to-speech audio with sentiment-aware delivery. When it's the user's turn, on-device speech recognition captures what they say and matches it against the script in real time, highlighting words as they're spoken and auto-advancing when the line is complete.

Technical Highlights

On-Device Speech Recognition - Speech-to-text runs entirely in the browser via WebAssembly. No audio ever leaves the user's device. The model is cached locally after first load for instant startup on return visits.

Intelligent Script Matching - The matching engine handles homophones (e.g., "their/there/they're"), contractions, filler words, and fuzzy matching with graduated thresholds - short words need near-exact matches while longer words are more lenient.

Sentiment-Aware Voice Delivery - Each line's emotional context (16 possible sentiments from angry to tender) shapes how the AI delivers it, producing natural and contextually appropriate performances.

Real-Time Upload Progress - Script uploads stream progress back to the client in real time as each page is processed.

Audio Preloading - Voice audio for upcoming AI lines is pre-generated and cached in the background during the session, so there's no waiting between lines.

Tech Stack

- Frontend: Next.js (App Router), React, Tailwind CSS
- Backend: NestJS, PostgreSQL, Drizzle ORM
- Auth: Session-based authentication (email + Google OAuth)
- Speech: Cloud text-to-speech, on-device speech-to-text (WebAssembly)
- Storage: Cloud object storage (S3-compatible)
- Infrastructure: AWS (API), Vercel (Web)

Architecture

Line Echo is a TypeScript monorepo with two apps (web and API) and shared packages for the database schema, auth config, UI components, and types.

The web app uses Next.js server actions to proxy API calls, forwarding session cookies without exposing tokens to the client. Speech recognition runs in a dedicated Web Worker to keep the main thread responsive, with an AudioWorklet pipeline for low-latency audio capture.

The API handles script parsing, voice generation with cloud caching (generate once, serve via presigned URLs), subscription management via webhooks, and quota enforcement across three billing tiers.

Gallery

01 / 06