Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Interview Practice

A AI-powered mock interview app that listens to your voice, transcribes in real time, and responds as an interviewer using Claude. Supports multiple modes including deep interview, English tutoring, and casual conversation practice.


Features

  • Voice input — speak your answer, the app transcribes via Whisper
  • AI interviewer — Claude responds as a senior engineer interviewer
  • Multiple modes — Job Interview, Deep Interview, English Tutor, Friend
  • Hardcore mode — relentless follow-up drilling on every answer
  • Suggested answer — generates a strong answer on your behalf
  • Answer review — get detailed feedback on your last answer
  • Assessment — pass/fail evaluation with score and breakdown
  • Local TTS — interviewer speaks back using Piper (no cloud TTS)
  • LLM flexibility — switch between Claude API or local Ollama

Requirements

  • Python 3.11
  • macOS (uses sounddevice for mic input)
  • Ollama (optional — for local LLM mode)

Setup

1. Clone the repo

git clone https://github.com/Rsor99/ai-interview
cd ai-interview

2. Create virtual environment

python3.11 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Configure environment

cp .env.example .env

Edit .env and fill in your values:

ANTHROPIC_API_KEY=your_anthropic_api_key_here
HF_TOKEN=your_huggingface_token_here
CANDIDATE_NAME=Your Name

5. Run the app

source venv/bin/activate
python app.py

Open http://localhost:5001 in your browser.

The first run will automatically download the Piper TTS voice model (~65 MB) from HuggingFace.


Interview Modes

Mode Description
Job Interview Senior engineer mock interview. One question at a time, grammar + technical feedback after each answer.
Deep Interview Structured interview using an ordered question set from prompts/deep_interview_questions.json.
English Tutor Conversational English practice with gentle grammar corrections.
Friend Casual chat practice with an American friend persona.

Hardcore Mode

Available in Job Interview — the AI drills deep into every answer with follow-ups. No "no worries", just relentless but professional pressure.


Customization

Switch LLM backend

Edit utils/llm.py:

PROVIDER = "claude"   # or "ollama" for local inference

For Ollama, make sure Ollama is running and the model is pulled:

ollama pull phi3:medium

Change interview questions (Deep Interview)

Edit prompts/deep_interview_questions.json — add, remove, or reorder questions.

Change TTS voice

Edit utils/tts.py:

_MODEL_PATH = "voices/en_US-ryan-high.onnx"

Browse available Piper voices at rhasspy/piper-voices on HuggingFace. Update _HF_FILES in tts.py to match your chosen voice.

Change Whisper model size

Edit utils/stt.py:

WhisperModel("small", ...)   # options: tiny, base, small, medium

Larger models are more accurate but slower.


Project Structure

ai-interview/
├── app.py                          # Flask server — all routes and WebSocket handlers
├── utils/
│   ├── llm.py                      # Claude / Ollama LLM backend
│   ├── stt.py                      # Whisper speech-to-text
│   ├── tts.py                      # Piper text-to-speech (auto-downloads model)
│   └── audio.py                    # Mic recording via sounddevice
├── prompts/
│   ├── interview.md                # Job Interview system prompt
│   ├── deep_interview.md           # Deep Interview system prompt
│   ├── english_tutor.md            # English Tutor system prompt
│   ├── friend.md                   # Friend system prompt
│   └── deep_interview_questions.json  # Ordered question set for Deep Interview
├── templates/
│   ├── index.html                  # Main interview UI
│   └── debug_stt.html              # STT debug tool
├── voices/                         # Piper voice models (auto-downloaded, gitignored)
├── .env.example                    # Environment variable template
├── requirements.txt                # Python dependencies
└── LICENSE                         # MIT License

License

MIT — free to use, modify, and distribute. See LICENSE.

About

A AI-powered mock interview app that listens to your voice, transcribes in real time, and responds as an interviewer using Claude.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages