Skip to content

uliss92/ai-interview-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Interview Bot

An interactive AI Interviewer powered by Google GenAI Live API — conducts real-time, voice-based interviews for any role using your uploaded job description and resume.


🧩 Project Overview

This project combines a Python backend (WebSocket + GenAI Live API) with a browser frontend (HTML + JS) to simulate a spoken job interview.

  • 🎙️ Live audio input/output
  • 📄 Resume parsing from PDF
  • 🌍 Multilingual support (EN, TR, RU, AZ)
  • 💬 Customizable prompts for different roles
  • 🔌 Simple setup — no frameworks required

📁 Directory Structure

.
├─ config/                 # Job title & description text files
├─ prompts/                # System prompt template (optional)
├─ ai_interviewer_bot.py   # Python backend server
├─ index.html              # Frontend (runs in browser)
├─ resume.pdf              # Candidate resume
├─ .env                    # API key + project config
├─ .gitignore
└─ README.md

⚙️ Prerequisites

  • Python 3.10+
  • A Google GenAI API key (with Live API access)
  • Modern browser with mic + audio support (Chrome, Edge, Firefox)

🚀 Setup & Run

1. Clone the repo

git clone <your-repo-url>
cd ai-interview-bot

2. Install dependencies

pip install -U pip
pip install google-genai websockets python-dotenv pypdf

3. Configure your .env

GEMINI_API_KEY=YOUR_API_KEY_HERE
PROJECT_ID=ai_interviewer-bot

4. Add job info & resume

  • config/job_title.txt → e.g. AI Engineer
  • config/job_description.txt → Paste role details
  • resume.pdf → Candidate’s resume

5. Start the backend

python ai_interviewer_bot.py

You’ll see:

Server: ws://localhost:8765
Backend ready! Open index.html in your browser.

6. Open the frontend

Just open index.html in your browser.


🌍 Supported Languages

Language Code
English en-US
Turkish tr-TR
Russian ru-RU
Azerbaijani az-AZ

🎧 How It Works

  1. Browser connects via WebSocket → ws://localhost:8765
  2. User audio (16 kHz PCM) is streamed to the backend
  3. Backend sends it to Google GenAI Live API
  4. AI responds with speech + text
  5. Browser plays AI’s voice and shows text log

🛠️ Customize

  • Change number of questions: Edit self.max_questions in InterviewSession (default 6)
  • Change voice: Modify voice_name in types.PrebuiltVoiceConfig
  • Custom system prompt: Add prompts/system_prompt.txt (uses placeholders {job_title}, {language}, {job_description}, {resume}, {max_questions})

🧠 Troubleshooting

  • No AI responses: Check your GEMINI_API_KEY
  • Mic issues: Allow microphone access in browser
  • Parsing failed: Use a text-based (not scanned) PDF

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors