ESP32-S3 Bench Guide
ESP32-S3 N16R8 bench guide: live pinout, lessons, simulators and the bench log.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Spoken misconception detector for maths: Saaras STT + Sarvam-105B diagnosis + Bulbul TTS, with adaptive re-teaching and mastery graphs
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Live demo: aawaz-se-diagnosis.vercel.app
आवाज़ से डायग्नोसिस. A maths tutor that listens to a child explain their reasoning out loud, in their own language, works out which misconception is behind the answer, re-teaches that idea another way, and then runs spoken practice drills that update a per-skill mastery graph.
It is built on three Sarvam AI models:
| Model | API | What it does here |
|---|---|---|
| Saaras v4 | POST /speech-to-text | Transcribes the child's spoken reasoning and drill answers. Handles code-mixed Hinglish and is biased with each skill's key terms (भिन्न, denominator, …). |
| Sarvam-105B | POST /v1/chat/completions | Classifies the misconception (with a verbatim evidence quote and a confidence score), writes the re-teaching lesson, generates targeted drills, grades spoken answers, and translates questions. |
| Bulbul v3 | POST /text-to-speech | Reads questions, feedback, lessons and drills aloud in 11 Indian languages, with a choice of voices. |
new_* label.The Sarvam pipeline panel under the main card shows every API call, the model that handled it, and its latency.
There are 9 skills, from place value to adding fractions, each with 3 catalogued misconceptions and 2–3 questions designed to make the child explain their reasoning. Questions are authored in English and Hindi, and Sarvam-105B translates them on demand (cached) for Bengali, Marathi, Tamil, Telugu, Kannada, Malayalam, Gujarati, Punjabi and Odia. Everything lives in app/curriculum.py and is easy to extend.
Requires Python 3.10+.
pip install -r requirements.txt
cp .env.example .env # then put your Sarvam key in .env
python -m uvicorn app.main:app --port 8765 --reload
Open http://localhost:8765. Microphone access needs localhost or HTTPS. If a mic isn't available, you can type an answer or upload a recording instead.
| Variable | Default | |
|---|---|---|
SARVAM_API_KEY | — | Required. Read from the environment or .env. Never commit it. |
SARVAM_STT_MODEL | saaras:v4 | saaras:v3 also works (uses codemix mode). |
SARVAM_TTS_MODEL | bulbul:v3 | |
SARVAM_LLM_MODEL | sarvam-105b | |
SARVAM_REASONING | off | low/medium/high turns on Sarvam-105B reasoning: more careful, but about 10× slower. |
AAWAZ_DATA_DIR | ./data (/tmp/aawaz on Vercel) | Where learner profiles and the audio cache are stored. |
index.py exposes the FastAPI app and vercel.json routes every path to it. The GitHub Actions workflow in .github/workflows/deploy.yml deploys on every push to main, using these GitHub repository secrets (no keys are stored in the repo):
| Secret | Purpose |
|---|---|
SARVAM_API_KEY | Passed to the Vercel deployment as a runtime environment variable. |
VERCEL_TOKEN | A Vercel access token (Vercel → Account Settings → Tokens). |
VERCEL_ORG_ID, VERCEL_PROJECT_ID | From .vercel/project.json after vercel link. |
On Vercel the disk is ephemeral. Learner profiles live in /tmp, and the browser keeps a backup copy that it restores automatically if a fresh instance doesn't know the learner. Audio is returned inline as data URIs.
Note: a public deployment spends your Sarvam credits for anyone who opens it.
json_schema mode looped on whitespace for nested schemas. The app uses JSON mode with the schema in the prompt, then coerces the reply to the schema in code (conform() in app/sarvam.py).app/
main.py FastAPI routes: question → diagnose → reteach → drills
sarvam.py Saaras / Bulbul / Sarvam-105B client (retries, hedging, JSON coercion)
prompts.py Prompts + JSON schemas for every Sarvam-105B call
learner.py BKT mastery, misconception lifecycle, adaptive modality choice
curriculum.py Skills, prerequisites, misconception catalog, question bank
store.py JSON-file store
static/ Vanilla JS front end (recorder → 16 kHz WAV, SVG skill map / charts / number line)
index.py Vercel entrypoint