AI-assisted interview practice platform with a Flask backend (video, audio, and text analysis) and a Next.js frontend. The system records interview answers, extracts facial and vocal signals, evaluates content quality, and returns a combined scorecard to help users improve.
- Simulates interview sessions with role-based questions.
- Records user video responses and analyzes facial emotion distribution.
- Extracts audio, transcribes speech, and evaluates voice confidence.
- Scores text answers by comparing to expected keyword sets.
- Presents results in a clean UI for iterative practice.
- Facial analysis: Detects faces from recorded video and predicts emotions using a CNN model.
- Speech analysis: Extracts audio from video, transcribes Tamil to English, and estimates voice emotion confidence.
- Answer quality: Evaluates transcribed answers against keyword lists generated for interview questions.
- Question generation: Uses Ollama (Mistral) to generate role-based technical questions.
- Frontend starts an interview session and captures user recordings.
- Backend receives
.webmuploads and stores them inbackend/uploads/. - Face frames are extracted to
backend/faces/and scored for emotion distribution. - Audio is extracted to
backend/audio/, transcribed, and translated to English. - Voice emotion confidence is computed from extracted audio features.
- Text score is computed by comparing user answers with keyword lists.
- Backend returns a combined score summary to the frontend.
backend/Flask API and ML inference utilities.frontend/Next.js UI.
- API: backend/app.py
- Face detection: backend/face_det.py
- Emotion prediction: backend/prediction.py
- Emotion score aggregation: backend/emotion_confidence.py
- Audio extraction: backend/voice.py
- Transcription + translation: backend/speechrec.py
- Voice emotion prediction: backend/speech_prediction.py
- Voice score aggregation: backend/voice_emotion_confidence.py
- Answer scoring: backend/evaluate_answers.py
- Question generation: backend/llama_model.py
- Python 3.10.11 (required)
- ffmpeg (for audio extraction and video processing)
- Ollama (for question generation) with model
mistral
The backend has a PowerShell script that installs dependencies, verifies prerequisites, starts Ollama, pulls the model, and runs the API.
cd "backend"
.\setup_and_run_backend.ps1If you need to specify the Python launcher:
.\setup_and_run_backend.ps1 -PythonCmd pyIf you prefer to run steps manually:
cd "backend"
py -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
.\.venv\Scripts\python.exe -m spacy download en_core_web_sm
.\.venv\Scripts\python.exe app.py- Ollama must be running locally for the
/questionendpoint to work. - Ensure the model files exist in
backend/Models/and voice model pickles are inbackend/.
These files are expected at runtime:
backend/Models/model_filter.h5(facial emotion CNN)backend/logistic_regression_model.pklbackend/scaler.pklbackend/pca.pklbackend/label_encoder.pkl
If these are missing, the API will fail when running predictions.
- Node.js 18+
cd "frontend"
npm install
npm run devThe frontend will start on http://localhost:3000 by default.
Purpose: Upload a single .webm response for facial analysis.
Request: multipart/form-data with file field.
Response:
predictions: emotion distribution by percentagescore: aggregated facial confidence score
Purpose: Process the first three uploaded videos, compute audio + text + face scores.
Response:
Face scoreVoice scoreText score
Purpose: Generate three role-specific interview questions and keywords.
Response:
questions: array of questionskeywords: array of keyword lists aligned with each question
POST /uploadvideo- Upload a.webmrecording and get facial emotion predictions.GET /results- Process saved videos, extract audio, and return face/voice/text scores.GET /question?job_role=...- Generate interview questions and keywords via Ollama.
- Ollama not responding: Ensure Ollama is installed, running, and
mistralis pulled. - ffmpeg missing: Install ffmpeg and ensure it is on PATH.
- TensorFlow install errors: Verify Python version is 3.10.11.
- Missing model files: Confirm required artifacts are present in
backend/Models/andbackend/.
- Use the provided script to avoid missing dependency steps.
- Keep uploads small when testing to reduce processing time.
- Clear
backend/uploads/,backend/faces/, andbackend/audio/between test runs if needed.