A real-time mock-interview system that listens to your spoken answers and gives you placement-grade feedback on how you speak, what you say, and how to improve.
AI Interview Twin generates role-specific interview questions, records your spoken response, and runs it through a multi-stage evaluation pipeline β speech-to-text, communication analysis, technical correctness scoring, and AI placement coaching β to produce a single, realistic interview score with actionable feedback.
- Role-aware question generation β questions tailored to role, experience, company type, and interview round (HR, Technical, DSA, Coding, Communication).
- Voice-first answering β answers are recorded in the browser (
MediaRecorder); no microphone access on the server. - Communication Score (CS) β analyzes pace (WPM), filler words, hedging, ownership language, long pauses, voice monotone, and sentiment.
- Technical Correctness Score (TCS) β an LLM judges the substance of your answer and assigns a score, band, and verdict.
- Placement Coaching β standout strengths, top improvements, current gaps, and focus areas for getting placement-ready.
- Aggregated final score β a weighted, realism-bounded fusion of CS and TCS.
- Fast, API-first inference β Groq-hosted Whisper + Llama models keep the pipeline responsive on plain CPU hardware.
The app follows a linear interview flow. Only two pages talk to the backend:
InterviewSelect βββΊ InterviewSetup βββΊ InterviewQuestion βββΊ InterviewProcessing βββΊ InterviewFeedback
(pick config) (generate Qs) (record answer) (evaluate audio) (show results)
β β
βΌ βΌ
POST /generate-questions POST /evaluate
recorded audio
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. Transcribe (Groq Whisper large-v3-turbo) β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. Communication Score (CS) β
β β’ pitch dynamics (librosa) β
β β’ linguistic signals (spaCy) β
β β’ sentiment (VADER) β
β β’ scoring engine β CS β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. Technical Correctness (TCS) β
β β’ LLM judge (Groq Llama-3.3-70b) β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Placement Coaching (Groq Llama-3.3-70b) β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β 5. Aggregate β final_score (0.6Β·CS + 0.4Β·TCS) β
ββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
JSON feedback
Transcription and pitch analysis run in parallel to shave seconds off each request.
| Layer | Technologies |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui (Radix), React Router, TanStack Query, Framer Motion, Firebase Auth |
| Backend | FastAPI, Uvicorn, Pydantic |
| Speech/NLP | Groq Whisper (whisper-large-v3-turbo), librosa, spaCy (en_core_web_sm), VADER sentiment |
| LLM | Groq β llama-3.3-70b-versatile (scoring & coaching), llama-3.1-8b-instant (question generation) |
AI_Interview_Twin/
βββ backend/ # FastAPI evaluation service
β βββ app/
β βββ main.py # App entrypoint + CORS
β βββ config.py # Models, API keys, scoring config
β βββ api/ # interview.py β HTTP routes
β βββ services/ # pipeline: analysis, tcs, placement, aggregation
β βββ audio/ # transcriber, pitch analysis, audio utils
β βββ nlp/ # linguistic signal detection
β βββ scoring/ # communication-score engine
β βββ prompts/ # LLM prompt builders
β βββ models/ # Groq/LLM runners
β βββ schemas/ # Pydantic models
βββ frontend/ # React + Vite client
β βββ src/
β βββ pages/ # InterviewSelect/Setup/Question/Processing/Feedbackβ¦
β βββ lib/api.ts # backend API client
β βββ hooks/useAuth.tsx # Firebase auth
βββ model/ # Research / prototyping notebook (main_model.ipynb)
- Python 3.10+
- Node.js 18+ (or Bun)
- ffmpeg (audio decoding β bundled via
imageio-ffmpeg) - A free Groq API key β https://console.groq.com/keys
cd backend
# create & activate a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# install dependencies
pip install -r requirements.txt
# download the spaCy English model
python -m spacy download en_core_web_smConfigure environment variables β copy the template and fill in your Groq key:
cp .env.example .envGROQ_API_KEY=your_groq_api_key_here
# HF_TOKEN=... # optional: only for local LLM fallback
# CORS_ALLOW_ORIGINS=http://localhost:5173,http://localhost:8080 # optionalRun the API:
uvicorn app.main:app --reload --port 8000The server starts at http://localhost:8000 (interactive docs at /docs).
cd frontend
npm install # or: bun installConfigure environment variables β copy the template and fill in your values:
cp .env.example .envVITE_API_BASE_URL=http://localhost:8000
# Firebase web config (from your Firebase project settings)
VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=...
VITE_FIREBASE_PROJECT_ID=...
VITE_FIREBASE_STORAGE_BUCKET=...
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
VITE_FIREBASE_MEASUREMENT_ID=...Run the dev server:
npm run dev # http://localhost:5173Base URL: http://localhost:8000
Generate interview questions for the chosen configuration.
Request
{
"role": "Software Development Engineer",
"experience": "Fresher",
"company_type": "Service-Based",
"interview_round": "HR"
}Response
{ "questions": ["Question 1", "Question 2", "..."] }Question count is enforced per round (HR: 6, Technical: 8, DSA: 7, Coding: 5, Communication: 5).
Evaluate a recorded answer. Sent as multipart/form-data.
| Field | Type | Description |
|---|---|---|
audio |
file | Recorded answer (e.g. answer.webm) |
questions |
string | JSON-encoded array of questions |
Response (abridged)
{
"transcript": "...",
"cs_score": 82.0,
"cs_metrics": { "wpm": 138, "fillers_per_min": 1.2, "...": "..." },
"cs_feedback": ["Good ownership language detected.", "..."],
"tcs_score": 74,
"tcs_band": "Partial",
"tcs_verdict": "...",
"tcs_issues": ["..."],
"tcs_improvements": ["..."],
"final_score": 78.5,
"placement_feedback": { "standout_strengths": [], "top_improvements": [], "placement_coaching": {} }
}- Communication Score (CS) starts at 100 and is adjusted by delivery signals β hedging, apologies, passive voice, fillers, long pauses, WPM (ideal ~125β145), monotone, and sentiment.
- Technical Correctness (TCS) is an LLM-assigned score with a band (
Poor/Weak/Partial/ strong) and verdict. - Final Score =
0.6 Β· CS + 0.4 Β· TCS, then capped by the TCS band for realism (e.g. aPoorband caps the final score at 45) and bounded to[0, 95].
Issues and pull requests are welcome. For larger changes, open an issue first to discuss the direction.
Licensed under the MIT License β Β© 2025 Ramkumar M (@RamInTech).