cd /news/artificial-intelligence/building-an-hsk-speaking-test-ai-rea… · home topics artificial-intelligence article
[ARTICLE · art-42406] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

"Building an HSK Speaking Test AI: Real-time Tone Grading with Gemini

A developer built ToneTutor, a free Mandarin speaking assessment tool that uses Google's Gemini AI to grade tone and grammar in real time. The tool records a 3-minute spoken HSK test, estimates the speaker's level on a 1-6 scale, and identifies weak points. The backend processes WebM audio from the browser into WAV format for Gemini, handling iOS Safari limitations.

read1 min views1 publishedJun 28, 2026

I built a free Mandarin speaking assessment tool that grades tone + grammar in real time. Here's the engineering behind it.

HSK (Chinese proficiency test) has a speaking component (HSKK), but most learners can't self-assess their level. Online tutors are expensive. Generic AI conversation tools don't grade tones.

So I built ToneTutor: a 3-minute spoken-HSK test that estimates your speaking level and identifies weak points.

Frontend:

Backend:

The Challenge:

Web Audio API records as WebM. Gemini expects LINEAR16 (WAV). iOS Safari doesn't support WebM. So:

python
async def grade_session(transcript: str):
    prompt = """
    Rate this Mandarin response on HSK 1-6 scale.
    Assess: tone accuracy, grammar, vocabulary range.
    Provide: level estimate + weak points.
    """
    response = await gemini.generate_content(prompt, stream=True)
    return parse_hsk_level(response)

Results

- 3-min test
- Real-time feedback
- Shareable HSK score card
- Free (limited sessions)

Open source coming soon. Built because I'm a native speaker + voice actor frustrated with generic tools.

Try it: tonetutor.tefusiang.com (free for 3 sessions)

Curious about the speech-to-text pipeline or tone grading logic? Ask below.
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @tonetutor 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-an-hsk-spea…] indexed:0 read:1min 2026-06-28 ·