Implementation Plan — Version 2.0

PTE Core Canada
Technical Blueprint

Standalone HTML architecture with Groq STT, Google TTS audio generation, and DeepSeek V3 AI scoring — optimised for speed, zero framework overhead.

Prev: Next.js + Whisper + Modal New: HTML + Groq + Google TTS + DeepSeek V3
What Changed — v1 → v2
Auto-generate 500+ audio prompts at near-zero cost, easy to expand
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)
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
All AI scoring prompts remain 100% identical. The DeepSeek prompt templates designed for Write Email, Respond to a Situation, Describe Image etc. work the same — only the API call wrapper changes from a Next.js API route to a PHP endpoint.
Complete Tech Stack — v2
🖼️ Frontend
HTML5 Semantic markup, SEO-indexable
CSS3 CSS variables, Grid, custom properties
Vanilla JS ES6+ classes, fetch API, Web Audio API
Google Fonts Playfair Display + DM Sans
⚙️ Backend (PHP)
transcribe.php Groq → Deepgram fallback
score.php DeepSeek V3 scoring proxy
tts-generate.php Google TTS audio generation
.env API keys (never in HTML)
🎤 Speech-to-Text
Primary: Groq whisper-large-v3-turbo — Free
Fallback: Deepgram nova-2 — Free tier
Browser: MediaRecorder API → WebM audio
Language detection: verbose_json response
🔊 Text-to-Speech
Service: Google Cloud TTS
Voice: en-CA-Neural2-C (Canadian accent)
Format: MP3 files generated at build time
Cost: ~$0 (4M chars/month free tier)
🤖 AI Scoring
Model: deepseek-chat (V3 latest)
Endpoint: api.deepseek.com/v1/chat/completions
Tasks: Write Email, Respond to Situation, Describe Image, Summarize Written/Spoken Text
Cost per test: ~$0.04
🚀 Hosting
Any PHP host — shared hosting works
No build step — upload files, done
CDN: Cloudflare free tier (cache static files)
Audio files: /audio/ folder, served statically
ℹ️
No build pipeline required. Edit HTML files directly. PHP handles the 3 API endpoints. Audio MP3s are pre-generated and committed to the repo. Students hit the server, get static HTML, speaking tasks POST to transcribe.php, writing/AI tasks POST to score.php.
Speech-to-Text — Groq + Deepgram Fallback

Based directly on your transcribe.php file. The same PHP logic powers PTE Core speaking tasks.

1
Groq — whisper-large-v3-turbo Primary
Free tier • Sub-second transcription • verbose_json for language detection
✓ Detects if student spoke English (is_english flag) • ✓ Returns language confidence
2
Deepgram — nova-2 Fallback
Free tier (12,000 mins/month) • Zero cold start • Smart formatting + punctuation
✓ Instant fallback when Groq rate-limits • ✓ smart_format=true cleans output
📱 Browser Recording Flow
Speaking Task — Client to Score
01
Record
MediaRecorder API
Browser
02
Blob → FormData
audio/webm
Client JS
03
POST transcribe.php
Groq primary
Free
04
Get transcript
+ detected_language
JSON
05
POST score.php
DeepSeek V3
~$0.003
06
Show Scores
Animated reveal
Client
⚠️
Language Detection Bonus: Groq's verbose_json returns 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.
// JS client-side speaking task handler async function submitSpeakingResponse(audioBlob, taskData) { // Step 1: Transcribe via PHP (Groq → Deepgram fallback) const formData = new FormData(); formData.append('file', audioBlob, 'response.webm'); const sttRes = await fetch('/api/transcribe.php', { method: 'POST', body: formData }); const sttData = await sttRes.json(); // Language warning (Groq only) if (sttData.provider === 'groq' && !sttData.is_english) { showWarning(`Detected: ${sttData.detected_language} — please respond in English`); } // Step 2: Score transcript via DeepSeek const scoreRes = await fetch('/api/score.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ task_type: taskData.type, prompt: taskData.prompt, transcript: sttData.text, // For Read Aloud only: original_text: taskData.original_text ?? null }) }); return await scoreRes.json(); // { appropriacy, pronunciation, fluency, feedback } }
Google TTS — Audio Generation Strategy

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.

🎙️ Recommended Voices
en-CA-Neural2-CCanadian Female Main narrator
en-CA-Neural2-ACanadian Male Alternate speaker
en-GB-Neural2-BBritish Male Diversity for listening tasks
en-AU-Neural2-DAustralian Male International variation
💰 Cost Breakdown
Free tier: 4 million characters/month
• 500 listening prompts × 200 chars avg = 100,000 chars
• 200 Read Aloud texts × 150 chars avg = 30,000 chars
• Total: ~130,000 chars to generate everything
Well within free tier forever
📁 Audio Generation Workflow
One-time batch generation (not per student request)
01
questions.json
All prompts with text
Source
02
generate-audio.php
Run once locally
CLI script
03
Google TTS API
Neural2 voices
Free tier
04
/audio/*.mp3
Static files
Committed to repo
05
HTML <audio>
Direct src=
Zero latency
Audio files are named q-{task_type}-{id}.mp3 e.g. q-repeat-sentence-042.mp3 and referenced directly in questions.json.
Tasks Using Google TTS Audio
🎧 Repeat Sentence — play once, student repeats
🎧 Answer Short Question — audio question
🎧 Summarize Spoken Text — 60-90s lecture audio
🎧 Listening Fill in Blanks — cloze with audio
🎧 Listening MC (Single & Multiple) — audio clip + question
🎧 Select Missing Word — audio with [BEEP] at end
🎧 Highlight Incorrect Words — audio + on-screen text
🎧 Write from Dictation — slow clear dictation audio
🎙️ Read Aloud — reference audio shown after student records
SSML Tips for Natural Audio
Add natural pauses: <break time="500ms"/>
Emphasise keywords: <emphasis>
Slow dictation: <prosody rate="slow">
Select Missing Word gap: Generate audio up to [BEEP] point then play <audio> beep.mp3 in JS
Multiple speakers: alternate en-CA-Neural2-A and en-CA-Neural2-C for dialogue prompts
AI Scoring — DeepSeek V3 via score.php
ℹ️
All scoring prompts from v1 plan remain unchanged. The only structural change is that calls go through score.php (PHP proxy to DeepSeek API) instead of a Next.js API route. The model is deepseek-chat (DeepSeek V3 latest).
✍️ AI-Scored Writing Tasks
Write Email ★ Content, Form, Conventions, Org, Vocab, Grammar, Spelling
Summarize Written Text Content, Form, Grammar, Vocab
Summarize Spoken Text Content, Form, Grammar, Vocab (from Whisper transcript)
🎤 AI-Scored Speaking Tasks
Respond to a Situation ★ Appropriacy, Pronunciation, Fluency
Describe Image Content, Pronunciation, Fluency
Read Aloud Content accuracy, Pronunciation, Fluency
score.php — DeepSeek Proxy
Receives JSON from browser → selects correct prompt template by task_type → calls DeepSeek API → returns JSON scores + feedback string. Never exposes API key to browser.
POST /api/score.php
{ task_type, prompt, transcript?, response_text? }
Model
deepseek-chat (V3 latest)
Response format
JSON only — scores + feedback string
Cost per call
~$0.003–$0.008 per task
~$0.04
Full 2hr mock test
all AI-scored tasks
$0
Auto-scored tasks
Reading + short answers
$0
STT (Groq)
free tier ~35hrs/day
$0
Audio playback
pre-generated MP3
Respond to a Situation — Scoring (Most Complex Task)
Appropriacy
Addresses situation correctly, right register (formal/informal), socially aware Canadian context. DeepSeek checks if apology = actually apologises, complaint = polite assertive, enquiry = asks correct question.
0–3
Pronunciation
Evaluated from Groq transcript patterns. 5=native-like, 3=intelligible minor errors, 1=strong accent affects understanding.
0–5
Fluency
Rhythm, pacing, natural delivery. DeepSeek infers from transcript structure (repetitions, incomplete phrases, truncated words).
0–5
File Structure — Standalone HTML Site
ptecore/ ├── api/ │ ├── transcribe.php ← Your existing file (Groq → Deepgram) │ ├── score.php ← DeepSeek V3 proxy for writing + speaking feedback │ └── generate-audio.php ← Run once: Google TTS batch generation script │ ├── audio/ │ ├── q-repeat-sentence-001.mp3 │ ├── q-repeat-sentence-002.mp3 │ ├── q-write-from-dictation-001.mp3 │ ├── q-summarize-spoken-001.mp3 │ └── ... (~300 audio files total) │ ├── data/ │ ├── questions-speaking.json ← Read Aloud, Repeat Sentence, Describe Image, RtaS, ASQ │ ├── questions-writing.json ← Write Email, Summarize Written Text │ ├── questions-reading.json ← All 5 reading task types │ ├── questions-listening.json ← All 6 listening task types (includes audio filenames) │ └── mock-tests.json ← 10 full test configs (question IDs in order) │ ├── js/ │ ├── recorder.js ← MediaRecorder wrapper, WebM blob handling │ ├── timer.js ← Countdown timer component for all tasks │ ├── scorer.js ← Client: calls transcribe.php then score.php │ ├── clb.js ← CLB converter logic (Jan 2026 official table) │ └── mock-test.js ← Full test session manager (sessionStorage state) │ ├── css/ │ └── ptecore.css ← Northern Authority theme (from this doc) │ ├── index.html ← Landing page + CLB tool + "Start Free Practice" CTA ├── mock-test.html ← Full test player (loads from mock-tests.json) ├── practice-read-aloud.html ├── practice-repeat-sentence.html ├── practice-respond-situation.html ← ★ High-traffic: unique to PTE Core ├── practice-write-email.html ← ★ High-traffic: unique to PTE Core ├── practice-describe-image.html ├── practice-answer-short-question.html ├── practice-reading.html ← All 5 reading tasks in one page, tabbed ├── practice-listening.html ← All 6 listening tasks in one page, tabbed ├── clb-calculator.html ← Standalone CLB tool (shareable URL) ├── canada-pr-guide.html ← Express Entry + PTE Core guide (SEO) └── .env ← GROQ_API_KEY, DEEPGRAM_API_KEY, DEEPSEEK_API_KEY, GOOGLE_TTS_KEY
.env keys needed: GROQ_API_KEY, DEEPGRAM_API_KEY, DEEPSEEK_API_KEY, GOOGLE_TTS_KEY. All in one .env file — same structure as PTE Academic backend.
All 19 Task Types — Implementation Notes
AI Scored Auto Scored (JS) Whisper + AI Whisper + Fuzzy Match
Part 1 — Speaking & Writing
Read Aloud 6–7 per test
Timer: 30–40s prep + 40s record • Google TTS reference audio shown after submit
Whisper + AI
Repeat Sentence 10–12 per test
Google TTS audio plays once • record immediately • fuzzy match transcript vs original • Pronunciation + Fluency from DeepSeek
Whisper + Fuzzy
Describe Image 3–4 per test
25s prep + 40s record • Images: charts, maps, process diagrams, bar graphs • Canada-themed where possible
Whisper + AI
Respond to a Situation ★ Unique to PTE Core
20s think + 40s record • Canada scenarios (landlord, HR, Service Canada) • Appropriacy scored by DeepSeek • Highest traffic potential
Whisper + AI
Answer Short Question 5–6 per test
Google TTS question plays • record short answer (1–3 words) • fuzzy match transcript vs expected answers array
Whisper + Fuzzy
Summarize Written Text 1–2 per test
10 min timer • Word count badge (real-time, 25–50 word target) • Auto-zero if outside range
AI Scored
Write Email ★ Unique to PTE Core
9 min timer • Word count badge (50–120 target) • DeepSeek checks: Content, Email Conventions, Form, Organisation, Vocab, Grammar, Spelling
AI Scored
Part 2 — Reading
R&W Fill in Blanks 5–6 per test
Dropdown selects in paragraph • JS comparison on submit • Partial credit (1 pt per correct blank)
Auto Scored
MC Multiple Answers (Reading) 1–2 per test
Checkbox UI • JS comparison • Negative marking: wrong answers subtract points
Auto Scored
Reorder Paragraph 2–3 per test
Drag-and-drop tiles using HTML5 drag API or touch events • Partial credit per adjacent correct pair
Auto Scored
Fill in Blanks (Reading) 4–5 per test
Drag words from word bank into gaps OR click-to-place • JS exact match
Auto Scored
MC Single Answer (Reading) 1–2 per test
Radio buttons • JS comparison • No negative marking
Auto Scored
Part 3 — Listening
Summarize Spoken Text 1–2 per test
Google TTS 60–90s lecture plays once • 10 min write summary • AI scored same as Summarize Written Text
AI Scored
Fill in Blanks (Listening) 2–3 per test
Google TTS audio plays • type words in blanks while listening • JS exact match after audio ends
Auto Scored
MC (Single & Multiple) Listening 1–2 each
Google TTS audio • questions appear after audio • radio/checkbox UI • JS comparison
Auto Scored
Select Missing Word 1–2 per test
Audio stops with [beep] • student clicks which option completes the sentence • JS comparison
Auto Scored
Highlight Incorrect Words 1–2 per test
Audio plays while on-screen text shown • student clicks words that differ from audio • JS word-level comparison
Auto Scored
Write from Dictation 3–4 per test
Google TTS slow/clear audio • type exact sentence • JS word-level partial credit • replay button (1 replay allowed)
Auto Scored
4-Month Launch Roadmap — Revised
March 2026 — Foundation
Core Architecture + Priority Tasks
  • Set up HTML file structure + ptecore.css Northern Authority theme
  • Build transcribe.php (reuse existing) + score.php (DeepSeek V3 proxy)
  • Run generate-audio.php once → produce all 300 MP3s via Google TTS
  • Build Respond to a Situation practice page (★ highest ROI)
  • Build Write Email practice page (★ second highest ROI)
  • Build Read Aloud practice page (highest volume task)
  • Build CLB Calculator page with shareable URL
  • Go live by March 21 — 3 practice pages + CLB tool
April 2026 — Full Task Coverage
All 19 Task Types + 5 Mock Tests
  • Build all remaining speaking tasks (Repeat Sentence, Describe Image, Answer Short Question)
  • Build all Reading tasks in practice-reading.html (tabbed UI)
  • Build all Listening tasks in practice-listening.html (tabbed UI)
  • Build mock-test.html — full 2hr session manager with sessionStorage state
  • Create 5 full mock tests in mock-tests.json (Canada-themed questions)
  • SEO: title tags, meta descriptions, JSON-LD structured data
  • Internal links from PTE Academic site → PTE Core pages
May 2026 — Traffic & Content Push
10 Mock Tests + SEO + Viral Features
  • 10 full mock tests live + unlimited sectional practice
  • 20+ Respond to a Situation Canada scenarios
  • 15+ Write Email Canada scenarios
  • Share-your-CLB social card generator (Canvas API → PNG download)
  • Progress tracking via localStorage (no sign-up required)
  • Canada PR bonus guide: "CLB 7 Checklist for Express Entry"
  • Push SEO: "free pte core mock test canada 2026"
  • Target: 10,000+ monthly pageviews
June–July 2026 — Raptive
Polish, Verify 25K pageviews, Apply
  • Core Web Vitals audit (HTML loads fast — advantage over React sites)
  • A/B test CLB tool CTAs and hero copy
  • Verify 25,000+ monthly pageviews (Raptive minimum)
  • Verify 50%+ Tier-1 traffic (Canada + India + US)
  • Domain age hits 6 months → Apply Raptive July 1, 2026
  • All CLB numbers audited against Jan 2026 official guide
Why HTML Standalone Wins for Raptive
HTML Advantages
✓ No JavaScript hydration delay
✓ Perfect Lighthouse scores (100/100 potential)
✓ Raptive ads load cleanly, no React conflicts
✓ Zero build pipeline — instant deploys
✓ PHP shared hosting ($5/mo) is sufficient
✓ Google indexes every page immediately
Mock Tests Drive Session Time
• Full 2hr mock test = 7,200s session time
• Raptive wants 3:00+ avg — easily beaten
• CLB tool → practice page → mock test
  = natural 3-page flow per visit
• Write Email + Respond to Situation
  = unique content no other site has
Built for Canada 🍁
PTE Core + Express Entry is an underserved market. This is the fastest path to 25K monthly pageviews in the test prep space — lean HTML stack, zero overhead, maximum signal to Google.