ColdMock:用 Google Gemma 2 打造零成本离线语音面试官
ColdMock: Building an Autonomous, Zero-Cost Voice Interviewer for My College Peer
ColdMock 是一款完全在浏览器中运行的自主语音面试练习工具,基于 Google Gemma 2(2B)通过 Ollama 离线部署,后端用 FastAPI 管理面试状态与评分提示词,前端用原生 HTML/JS 加 Tailwind CSS 并调用浏览器内置 Web Speech API 实现听说,无需付费语音 API。
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend (https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)
What I Built
My college friend has been prepping hard for campus placements. He can solve LeetCode problems easily, but in real interviews he freezes up when he has to explain systems concepts out loud. Existing AI tools charge subscriptions or make you wait seconds for every cloud reply, which ruins the flow.
I built ColdMock so he can do rapid-fire oral technical drills on his laptop without paying anything.
How it works:
The AI reads out a realistic backend/system scenario.
He talks into his laptop mic to explain his approach.
If he stops talking for 5 seconds, it automatically submits his answer.
The AI throws an unscripted follow-up question right back at him based on what he just said.
At the end, it shows a scorecard with his strengths, blind spots, and a realistic hiring verdict.
Demo
It runs completely in the browser:
- Pick your topic (like PostgreSQL Concurrency) and set either a question limit or timer.
- The AI speaks, you answer hands-free, and it probes your trade-offs.
- You get a final debrief card at the end.
Code
https://github.com/Subhadip956425/ColdMock
How I Built It
Model: Google Gemma 2 (2B) running completely offline via Ollama.
Backend: A simple FastAPI service handling the interview state and strict grading prompts. It automatically fails blank or 1-word answers so you can't fake a pass.
Frontend: Vanilla HTML/JS with Tailwind CSS using the browser's built-in Web Speech API for both speaking and listening. No paid voice APIs needed.
Why Open Innovation Matters
Free: Students shouldn't have to pay API fees or subscription costs just to practice talking through code.
Privacy: All audio and interview notes stay right on the laptop instead of hitting third-party servers.
Offline: It runs with zero internet, so spotty campus Wi-Fi won't cut him off mid-answer.
The Hand-Off
I had my friend try a 3-question drill on database locks. When he suggested using read replicas, ColdMock pushed back on how he'd handle replication lag.
His reaction:
"That exact question tripped me up in an interview last month. Most AI bots just say 'great job', but this actually pushed back on my design without me having to touch the keyboard."
Prize Categories
Best Use of Gemma
General / Overall Winner
来源:Google AI:DEV 作者专属(RSS) · dev.to