Skip to content

About

Voice-first AI language companion (Gemini Live + TypeSafe Jev + Three.js + React + FastAPI) with interactive GitHub Pages UI guide

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Samantha AI — Voice-First Language Companion

Live Interactive UI Guide (GitHub Pages): https://www.sisengai.com/samantha_ai/

A Her-inspired, voice-first language learning companion built with Gemini Live API (native audio-to-audio), TypeSafe AI Jev (System-1 decision layer), Three.js, React 19, and FastAPI + SQLite.

Upload any textbook PDF (up to 100 MB), YouTube video, playlist, transcript, or web article—Samantha AI indexes every chapter, triages and selects the highest-value segments for your CEFR level & weak spots, teaches you naturally with everyday metaphors, shifts smoothly into phrase-by-phrase shadowing on demand, and sits right beside your Anki flashcards whenever you have a usage question.

Highlights

  • Teach-First 4-Stage Split Workspace (33% / 67% Resizable & Collapsible):
    • Teach (Default): Samantha AI teaches chapters thoroughly concept-by-concept with plain-language explanations & vivid metaphors, highlights TEACHING NOW, and occasionally invites you to shadow a key line.
    • Shadow: Phrase-by-phrase breath chunking (Stück für Stück), configurable Pronunciation Strictness (Gentle → Native), isolated Word Retry Spotlight, and strict Coach: DE only or Voice DE → EN.
    • Drills: Interactive oral Grammar Drills plus Grammar Transform, Rapid Q&A, Recall & Retell, and Goethe / telc Exam modes.
    • Flashcards: Inline Anki SM-2 flip deck right beside Samantha AI with Ask usage, Quiz me aloud, IPA audio, and Space / 1–4 shortcuts.
    • Drag the divider to resize (22%–62%, persisted), click Hide Samantha AI for full-width reading, or toggle ▶ Watch video / ↗ YouTube on any YouTube lesson to compare the original video side-by-side at that chapter's exact timestamp.
  • Smart Unified Study Library (Lessons · Books & Series · + Add Material): Drop any file (PDF up to 100 MB, DOCX, TXT, SRT/VTT), YouTube video, whole YouTube playlist, web URL, or pasted text into one place. Samantha AI auto-routes short worksheets/articles/clips straight into a curated Teach lesson and auto-indexes multi-chapter textbooks (with printed-vs-PDF page offset calibration) and YouTube playlists/courses (instant zero-download episode shelf with lazy on-demand transcript fetching, 1-click Split chapters, ↻ re-curate, & bilingual ASR repair) onto Books & Series.
  • Two-Stage AI Ingestion (TypeSafe Jev System-1 → Gemini Flash System-2): Jev (jev-latest, ~190ms) triages source archetypes, drops sponsors/noise, ranks segments by learner fit, and fast-paths clean passages (<1s) before Gemini Flash builds concepts & oral drills.
  • Universal Micro-Learning Tools: Base → Target language pair switcher with laddering (10 languages, e.g., EN → DE, DE → FR), per-line [文A EN] pills on every target sentence, tap-any-word contextual IPA Dictionary, 2-line live subtitles, interactive Frage stellen barge-in chip, and 8 built-in real-life Scenarios.
  • Native Audio + Demo Mode: Continuous-phase anti-aliased 16 kHz AudioWorklet capture, 24 kHz playback with instant barge-in, 3D WebGL presence ring, and full offline Demo Mode with zero API keys.

Documentation

Quickstart

1. Configure .env (optional — Demo Mode works without keys)

cp .env.example .env
# Set GEMINI_API_KEY=... for live native audio & AI curation
# Optional: set TYPESAFE_API_KEY=... (or OPENROUTER_API_KEY=...) to enable Jev System-1

2. Run both backend & frontend

./start.sh

Manual commands

# Backend (:8787)
cd backend && uv run uvicorn samantha_lang.app:app --host 127.0.0.1 --port 8787 --reload

# Frontend (:5173)
cd frontend && npm run dev -- --host 127.0.0.1 --port 5173

Verification

cd backend && uv run ruff check . && uv run pytest -v
cd frontend && npm run typecheck && npm run build

Contributing & Pull Request Workflow

All changes go through Pull Requests against main (never direct pushes to main). Every PR automatically runs open-source GitHub Actions CI (ci.yml: ruff, pytest, tsc, vite build, Gitleaks secret scan, and forbidden-file guard) plus an optional self-owned Gemini PR reviewer (ai-review.yml when GEMINI_API_KEY is added to repo secrets). See AGENTS.md for full rules and the Living Docs Sync Contract.

About

Voice-first AI language companion (Gemini Live + TypeSafe Jev + Three.js + React + FastAPI) with interactive GitHub Pages UI guide

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages