https://github.com/codecat1111/gemini-interview-assistant
A web-based tool that helps users prepare and practice for technical interviews using AI-powered feedback.
https://github.com/codecat1111/gemini-interview-assistant
assistant gemini interview whisper
Last synced: 28 days ago
JSON representation
A web-based tool that helps users prepare and practice for technical interviews using AI-powered feedback.
- Host: GitHub
- URL: https://github.com/codecat1111/gemini-interview-assistant
- Owner: codecat1111
- License: mit
- Created: 2025-03-15T13:33:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-15T13:49:37.000Z (over 1 year ago)
- Last Synced: 2025-03-15T14:32:00.984Z (over 1 year ago)
- Topics: assistant, gemini, interview, whisper
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Gemini Powered Mock Interview Assistant
A web-based tool that helps users prepare and practice for technical interviews using AI-powered feedback. π―π‘

---
## π Features
β
**Real-time audio recording & transcription** π€π
β
**AI-powered analysis of interview responses** π€π
β
**Two modes of operation:**
- π― **AI Analysis Only**: Get immediate feedback π₯
- π **Compare Mode**: Practice your answer first, then compare with AI analysis
- β
**Session management with history tracking**
- β
**Support for role-specific & job description context** π¨βπ»π
---
## π§ Prerequisites
π **System Requirements:**
- Python **3.8+**
- **PyTorch & TorchAudio**
- **Transformers library**
- **Google Cloud API key for Gemini AI**
- **Virtual audio cable (VB-CABLE)**
- **Internet connection for AI services**
- **Windows OS (for VB-CABLE setup)**
---
## ποΈ Setup
### 1οΈβ£ Clone the Repository
```bash
git clone https://github.com/codecat1111/Gemini-Interview-Assistant.git
cd Interview-Assistance
```
### 2οΈβ£ Install Dependencies
```bash
pip install -r requirements.txt
```
### 3οΈβ£ Configure Virtual Audio Cable π§
- Install a **virtual audio cable** software
- Set **audio output** to "CABLE Input"
### 4οΈβ£ Set Up API Key π
```bash
# Create .env file and add your Gemini API key
echo "GOOGLE_API_KEY=your_gemini_api_key_here" > .env
```
---
## π Usage
1οΈβ£ **Start the Gemini Analyzer Server** (in a new terminal):
```bash
python gemini_analyzer.py
```
2οΈβ£ **Start the Flask Server** π:
```bash
python main.py
```
3οΈβ£ **Open in Browser**: `http://localhost:5000` π
4οΈβ£ **Enter job role & description** βοΈ
5οΈβ£ **Choose Your Mode** ποΈ:
- **AI Analysis Only**: Click "Start Recording" π’
- **Compare Mode**: Record your answer, then click "Show AI Analysis" π§
---
## π Features in Detail
### ποΈ **Recording Controls**
- **Start/Stop Recording** button βΊοΈ
- **New Recording** button for multiple attempts π
- **Reset Session** button to clear history ποΈ
### π **Analysis Options**
- **Real-time transcription**
- **AI-powered feedback**
- **Compare Mode for self-assessment**
- **Session history tracking**
### π **History Feature**
- π "Start Recording (No History)" - Begins a new recording without considering previous responses
- π "New Recording (With History)" - Saves the current analysis to history before starting a new recording
- π **History is automatically included in AI analysis for context**
- ποΈ **Reset Session button clears all history**
### π¨ **Theme Support**
- π **Light Mode** / π **Dark Mode** toggle
- π¨ **Theme preference is saved automatically**
- **Accessible color schemes for better readability**
## Project Demo
[π½οΈ Watch the Demo on YouTube](https://www.youtube.com/watch?v=gU2my0yqVQY)
This video demonstrates:
- Setting up role and job description
- Recording and analyzing responses
- Using AI Analysis Only mode
- Using Compare mode
- Managing interview history
- Theme switching
---
## π€ Model Setup
### **Loading the Whisper Model**
The application uses the **Whisper-Tiny** model for speech transcription. On first run, the model will be **automatically downloaded** from Hugging Face.
```python
# Initialize Whisper model
processor = AutoProcessor.from_pretrained("openai/whisper-tiny")
model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-tiny")
```
---
## π§ Virtual Audio Cable Setup
### 1οΈβ£ **Setting Up VB-Audio Virtual Cable**
This project uses **VB-Audio Virtual Cable** to capture system audio and process live transcriptions.
#### π½ **Installation**
- Download [VB-Audio Virtual Cable](https://vb-audio.com/Cable/)
- Run `VBCABLE_Setup_x64.exe` (for 64-bit systems)
- Restart your computer π
#### π **Configuration**
1. Open **Sound Settings** (Win + I β "Sound")
2. **Set "CABLE Input (VB-Audio Virtual Cable)" as default output**
3. **Select "CABLE Output (VB-Audio Virtual Cable)" as microphone input**
4. (Optional) Use **VoiceMeeter Banana** for advanced routing ποΈ
---
## π€ System Audio Capture Implementation
### π§ **Virtual Cable Device Detection**
```python
def find_vb_audio_device():
"""Finds VB-Audio Virtual Cable device ID"""
devices = sd.query_devices()
for i, device in enumerate(devices):
if "CABLE Output" in device["name"]:
return i
return None
```
### π **Audio Recording System**
```python
class SystemAudioRecorder:
def __init__(self):
self.sample_rate = 16000
self.recording = False
self.audio_data = []
def start_recording(self):
device_id = find_vb_audio_device()
if device_id is None:
raise RuntimeError("VB-Audio Virtual Cable not found!")
self.recording = True
self.audio_data = []
def audio_callback(indata, frames, time, status):
if self.recording:
self.audio_data.append(indata.copy())
self.stream = sd.InputStream(
device=device_id,
channels=1,
samplerate=self.sample_rate,
callback=audio_callback
)
self.stream.start()
def stop_recording(self):
self.recording = False
self.stream.stop()
self.stream.close()
audio_data = np.concatenate(self.audio_data, axis=0)
filename = "recorded_audio.wav"
sf.write(filename, audio_data, self.sample_rate)
return filename
```
---
## π Troubleshooting Virtual Audio Cable
β **No Audio Detected?**
- β
Verify **"CABLE Input"** is set as **default playback device**
- β
Check **"CABLE Output"** is selected as **recording input**
- β
Ensure **system volume is not muted**
β **Device Not Found?**
- π Restart the **VB-Audio service**
- π Reinstall the **drivers**
- π Check **Device Manager** for warning icons
β **Poor Audio Quality?**
- π Ensure **sample rate settings match (16000 Hz)**
- π Check **CPU usage**
- π Close **unnecessary audio applications**
## Virtual Audio Cable Setup Demo
[π½οΈ Watch the Audio Cable Setup on YouTube](https://www.youtube.com/watch?v=7wr8EVFtABM)
This video covers:
- Installing VB-Cable
- Configuring Windows audio settings
- Testing the virtual audio setup
- Troubleshooting common issues
---
## π‘ Contributing
1οΈβ£ **Fork the Repository** π΄
2οΈβ£ **Create a Feature Branch** (`git checkout -b feature/AmazingFeature`)
3οΈβ£ **Commit Your Changes** (`git commit -m 'Add AmazingFeature'`)
4οΈβ£ **Push to Branch** (`git push origin feature/AmazingFeature`)
5οΈβ£ **Open a Pull Request**
---
## β Found It Helpful? [Star It!](https://github.com/codecat1111/Gemini-Interview-Assistant/stargazers) β
---
## π License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.