Real-time HUD that listens to a counselling session via the browser mic, transcribes locally with the Web Speech API, sends the text-only transcript to GPT-4o, and renders a 4-tier colour HUD (Teal → Amber → Indigo → Red) plus a just-in-time therapeutic prompt.
This is the vertical slice, not the full Ametis 3 spec. Still to build: weighted signal scoring (audio/biometric/camera), 9-stage session lifecycle, flashcard engine over the JSON theory library, auto-documentation (SOAP/DAP/BIRP/Narrative), cool-down + next-session memory loop, governance checklist.
Audio never leaves the browser — only the recognised text is sent to the serverless function, which forwards it to OpenAI. To make the brief's "zero-retention audio" claim contractually true for text as well:
- Get your OpenAI org onto Zero Data Retention (enterprise agreement).
- Set
OPENAI_ZDR=truein your Vercel env vars (or.env.locallocally). - Confirm in
GET /api/health.
Without ZDR, OpenAI may retain inputs up to 30 days for abuse monitoring. The
/api/health endpoint surfaces this status honestly.
cp .env.example .env.local # add OPENAI_API_KEY
npm install
npx vercel dev # serves Vite + /api/* on http://localhost:3000Open in Chrome or Edge (Web Speech API isn't supported in Firefox/Safari desktop). Click Start session, grant mic access, speak.
npm run devworks for the UI alone but won't serve the /api functions — usevercel devfor the full stack.
See DEPLOY.md. One Vercel deploy hosts both the SPA and the
serverless functions.
src/ Vite + React + TS + Tailwind (UI)
App.tsx
components/HUD.tsx
components/TranscriptPanel.tsx
hooks/useSpeechRecognition.ts
lib/signals.ts
types.ts
api/ Vercel serverless functions (Node.js)
analyze.ts POST /api/analyze
health.ts GET /api/health
_lib/analyze.ts shared OpenAI + schema logic