Language Labs

~ $ open language-labs

Language Labs

March to October 2026

An experiment in getting AI to build a whole language course. Thai and French so far.

Language Lab dashboard greeting a learner, with a "How Thai Script Works" next-lesson card, level and streak stats, three daily quests and a grid of practice shortcuts.
The Thai dashboard after the first lesson: next lesson, streak, daily quests and practice shortcuts.
  • Conversation scenario "At a Restaurant" showing a chat between a server named Somying and the learner, each Thai line with romanization, English translation and an audio button.
  • Thai Text Decoder with the phrase ขอเมนูหน่อย split into two word cards showing romanization, meaning, colour-coded letters, tone and the rule that produces it.
  • French verb page for "aller" listing its present-tense forms from je vais to ils vont, tense tabs above, an explanation box with example sentences and a "Drill aller" button.
  • Phone screen of Today's practice introducing the Thai word สถานี (station) with Listen and Slow buttons, an example sentence, and a bottom bar with Home, Learn, Practice, Review and Me.
  • Phone screen of the lesson "What is a Tonal Language?" showing five words built on "khaa", each with a tone name, pitch contour, meaning and play button.
Runs on
A phone, installed as a PWA. Works offline.
Model
Runs on your own OpenRouter, Gemini, OpenAI or Anthropic account. Speech can use ElevenLabs, OpenAI or Gemini; live voice uses Gemini.
Stack
React 19, TypeScript, Vite, Tailwind v4, React Router 7, ts-fsrs, Dexie (IndexedDB), vite-plugin-pwa, Express, PostgreSQL

# What it is

Language Labs works like a structured course, not an open-ended chatbot. Right now it teaches Thai and French.

Each lesson introduces something new, lets you practice it with hints, then tests you without them. Spaced repetition brings older material back so it sticks. A daily practice adds extra vocabulary, expressions and short dialogues. It installs on your phone and works offline, lessons and progress included.

# How AI fits

The tutor always knows which lesson you’re on, so the conversation stays on what you’re learning. You can also have a live voice conversation with it. The course’s pronunciation audio is generated once and shared by everyone.

Text chat with the tutor is included. You can also connect your own OpenRouter account, or use your own Gemini, OpenAI or Anthropic key. Chat, pronunciation and speech-to-text can each use a different provider. The included tutor and connected accounts have spending limits, and calls made with your own key are tracked on your phone.

# Schematics

A lesson

  1. TeachExplanations, examples and audio introduce something new.
  2. PracticeExercises with hints, to try it out.
  3. TestExercises without hints, to check you understood it.
  4. ReviewSpaced repetition brings it back over time.

On the phone

  1. OfflineLessons, flashcards and progress are kept on the phone, so they work offline.
  2. SyncSign in and your progress follows you to your other devices.
  3. BackupExport everything to a file.

next harness-workflow work home

~/work/language-labs $