Standalone HTML architecture with Groq STT, Google TTS audio generation, and DeepSeek V3 AI scoring — optimised for speed, zero framework overhead.
| Component | v1 Plan | v2 Plan | Reason |
|---|---|---|---|
| Frontend Framework | Next.js 14 (App Router) React + Tailwind Vercel deployment |
Pure HTML + CSS + JS Zero dependencies Any static host |
Faster cold load, no hydration, simpler deployment, better Raptive ad compatibility |
| Speech-to-Text (Primary) | OpenAI Whisper-1 $0.006/min |
Groq Whisper Large V3 Turbo Free tier (generous) |
Free, faster (sub-second), same accuracy as Whisper |
| STT Fallback | Modal (self-hosted GPU) Complex cold starts |
Deepgram Nova-2 Zero cold start |
Simpler ops, still free tier, instant response |
| STT Backend | Next.js API Route (serverless function) |
transcribe.php (same as PTE Academic) |
Reuse existing working code, shared PHP hosting compatible |
| Audio for Listening Tasks | Pre-recorded MP3 files (manual creation) |
Google TTS API (generated at build time) |
Auto-generate 500+ audio prompts at near-zero cost, easy to expand |
| Audio for Read Aloud | No reference audio shown | Google TTS reference playback (optional, after attempt) |
Students can hear correct pronunciation after submitting |
| AI Scoring Engine | DeepSeek-V3 (generic) | DeepSeek V3 latest (deepseek-chat model) |
Use latest model, same prompts, no structural change needed |
| Database | Supabase (Postgres) User accounts |
localStorage + JSON files No auth required for v1 |
No sign-up friction, faster to build, Raptive doesn't require auth |
| State Management | React useState/useReducer Zustand for global state |
Vanilla JS classes sessionStorage for test state |
No build step, instant page loads, simpler debugging |
Based directly on your transcribe.php file. The same PHP logic powers PTE Core speaking tasks.
detected_language and is_english. If is_english === false, show a soft warning: "We detected you may have spoken in [language] — PTE Core requires English." This catches students who accidentally respond in their native language.All listening task audio and Read Aloud reference audio is generated using Google Cloud TTS and saved as static MP3 files. No real-time TTS needed during tests.
q-{task_type}-{id}.mp3 e.g. q-repeat-sentence-042.mp3 and referenced directly in questions.json.
<break time="500ms"/><emphasis><prosody rate="slow">GROQ_API_KEY, DEEPGRAM_API_KEY, DEEPSEEK_API_KEY, GOOGLE_TTS_KEY. All in one .env file — same structure as PTE Academic backend.