跳到正文
GitHub·· 9 天前AI 评分38

ai-interview-coach:基于语音的 AI 模拟面试评分工具

ayush-s-tomar/ai-interview-coach

AI 导读

开发者 Ayush Singh Tomar 开源 ai-interview-coach,一款基于语音的模拟面试工具,用 Faster-Whisper 在内存中转写回答,再由 Groq 的 LLaMA 3.3 70B 从相关性、清晰度、技术准确性和自信度四个维度打分,并生成 PDF 反馈报告,音频不落盘。

正文

Python Streamlit Groq Whisper Deployed CI License

Speak your answer. Get scored like a real interviewer would. Walk away with a PDF that says exactly where you lost points.

A voice-based mock interview simulator that scores answers on relevance, clarity, technical accuracy, and confidence — then generates a personalized feedback report, no audio ever touching disk.

🔗 Live Demo

AI Interview Coach recording screen with role selection


📚 Contents

Why I Built This · Features · Architecture · Tech Stack · How It Works · Run Locally · Env Vars · Structure · Known Limitations · Roadmap


💡 Why I Built This

Every fresher faces the same problem — you can grind DSA and system design, but nobody tells you how your actual spoken answers land in a real interview. I built this while prepping for my own interviews. It's the tool I wished existed: record an answer, get scored like a real interviewer would, and see exactly where you lose points.


✨ Features

  • 🎯 Role-based questions — SDE, AI Engineer, Data Analyst
  • 🔊 Spoken questions — gTTS reads each question aloud, like a real interviewer
  • 🎤 Voice recording — answer verbally, right in the browser (or upload audio)
  • 🤖 AI scoring — Groq (LLaMA 3.3 70B) evaluates across 4 dimensions: Relevance · Clarity · Technical Accuracy · Confidence
  • 📄 PDF report — per-question breakdown with concrete improvement tips
  • ⚡ Fast transcription — Faster-Whisper, with automatic fallback to a lighter model under memory pressure
  • 🔒 Privacy-first — no audio stored; transcription happens in-memory

🏗️ Architecture

Single-file Streamlit app — no separate backend, no database. Audio is captured client-side, transcribed in-memory via Faster-Whisper, scored by a single Groq LLM call, and rendered straight into a downloadable PDF. Nothing about a candidate's answers ever touches disk.

Browser mic → Faster-Whisper (in-memory) → Groq LLaMA 3.3 70B → ReportLab PDF

Design trade-off: kept the whole app in one file on purpose — no client/server split — so it deploys free on Streamlit Cloud with zero DevOps and stays easy to fork.


🛠️ Tech Stack

Layer Technology Why
App Streamlit Single-file app, zero frontend/backend split, fast to ship
Transcription Faster-Whisper 4x faster than OpenAI Whisper, runs on CPU
AI Scoring Groq API (llama-3.3-70b-versatile — shut down by Groq 2026-08-16, migration unconfirmed, see TODO at top) Free tier, fast inference
Text-to-Speech gTTS Lightweight, no API key needed
PDF Generation ReportLab Full control over report layout
Deployment Streamlit Community Cloud Free tier, zero DevOps

📊 How It Works

1. Select role    →  SDE / AI Engineer / Data Analyst
2. Hear question  →  gTTS speaks the question aloud
3. Record answer  →  Browser mic captures audio (or upload a file)
4. Transcribe     →  Faster-Whisper converts speech to text
5. Score          →  Groq LLaMA 3.3 scores on 4 dimensions
6. Download       →  ReportLab generates a personalized PDF report

🚀 Run Locally

# Clone the repo
git clone https://github.com/ayush-s-tomar/ai-interview-coach.git
cd ai-interview-coach/streamlit_app

# Install dependencies
pip install -r requirements.txt

# Add your Groq API key
cp .streamlit/secrets.toml.example .streamlit/secrets.toml
# Edit .streamlit/secrets.toml and add GROQ_API_KEY=gsk_...

# Run the app
streamlit run streamlit_app.py

App → http://localhost:8501


🔑 Environment Variables

Variable Description
GROQ_API_KEY Get free at console.groq.com
WHISPER_MODEL tiny (fast) or base (accurate, default)

On Streamlit Cloud, set these under Settings → Secrets instead of a local .env.


📁 Project Structure

ai-interview-coach/
└── streamlit_app/
    ├── streamlit_app.py        # Full app: UI, scoring, transcription, PDF report
    ├── requirements.txt
    └── .streamlit/
        └── secrets.toml.example

⚠️ Known Limitations

  • Scoring may currently be broken. The Groq model this app calls (llama-3.3-70b-versatile) was shut down on 2026-08-16, and the migration is unconfirmed as of this writing — see the TODO at the top of this file before relying on the live demo's scores or PDF reports.
  • Whisper fallback trades accuracy for stability — under memory pressure on the free-tier host, transcription silently drops to a lighter, less accurate Whisper model rather than failing; scoring quality on that request depends on how much the transcript degraded.
  • Scoring has no independent second check — a single Groq LLM call grades all four dimensions in one pass; there's no separate model or rubric-based check the way a real interview panel would cross-validate a score.
  • No session persistence — every practice session starts fresh, so there's no way yet to track improvement across attempts (see Roadmap — an interview history dashboard isn't built yet).

🗺️ Roadmap

  • Migrate scoring to openai/gpt-oss-120b and read the model ID from an environment variable, so the next Groq retirement is a config change, not a code change
  • More roles (Product Manager, Data Engineer)
  • Confidence detection via audio prosody analysis
  • Interview history dashboard
  • Shareable report links

👤 Author

Ayush Singh Tomar — AI/ML Developer GitHub · Dev.to · Portfolio


📄 License

MIT — free to use, modify and distribute.


Built to solve a real problem — I made this while preparing for interviews myself.

来源:GitHub · github.com