Vocabulary study with FSRS spaced repetition, AI tutoring (Ollama/Claude), essay marking, idioms browser, Anki export, and dashboard. 918 vocabulary entries across 39 categories. 41 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Persian Language Tutor
Overview
Gradio-based Persian (Farsi) language learning app for English speakers, using GCSE Persian vocabulary (Pearson spec) as seed data.
Tech Stack
- Frontend: Gradio (browser handles RTL natively)
- Spaced repetition: py-fsrs (same algorithm as Anki)
- AI: Ollama (fast, local) + Claude CLI (smart, subprocess)
- STT: faster-whisper via sttlib from tool-speechtotext
- Anki export: genanki for .apkg generation
- Database: SQLite (file-based, data/progress.db)
- Environment:
whisper-ollamaconda env
Running
mamba run -n whisper-ollama python app.py
Testing
mamba run -n whisper-ollama python -m pytest tests/
Key Paths
data/vocabulary.json— GCSE vocabulary datadata/progress.db— SQLite database (auto-created)app.py— Gradio entry pointdb.py— Database layer with FSRS integrationai.py— Dual AI backend (Ollama + Claude)stt.py— Persian speech-to-text wrappermodules/— Feature modules (vocab, dashboard, essay, tutor, idioms)
Architecture
- Single-process Gradio app with shared SQLite connection
- FSRS Card objects serialized as JSON in SQLite TEXT columns
- Timestamps stored as ISO-8601 strings
- sttlib imported via sys.path from tool-speechtotext project