Skip to content

Redemptionneo/AudioInterviewer

Repository files navigation

AI Interviewer

A native Python desktop application that simulates realistic job interviews using AI.

Features

  • AI-Powered Interviews: Claude LLM drives realistic interview conversations with dynamic follow-up questions
  • Human-like Voice: ElevenLabs TTS with emotion modulation for natural-sounding speech
  • Real-time Voice Analysis: Pitch, intensity, tempo analysis based on Juslin & Laukka (2003) framework
  • Visual Analysis: MediaPipe-based face/pose detection (100% local, free)
    • Eye contact tracking
    • Blink detection
    • Posture analysis
    • Emotion indicators from facial expressions
  • Intelligent Interjections: AI interjects when responses go off-topic, have long pauses, or are unclear
  • Post-Interview Feedback: Comprehensive grading and actionable improvement tips

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        UI Layer (PyQt6)                      │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐  │
│  │   Camera    │  │  Transcript │  │  Modulation Viz     │  │
│  │   Widget    │  │   Widget    │  │     Widget          │  │
│  └─────────────┘  └─────────────┘  └─────────────────────┘  │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│                      Core Engine                             │
│  ┌───────────────┐  ┌───────────────┐  ┌───────────────┐   │
│  │   Session     │  │ Interjection  │  │   Grading     │   │
│  │   Manager     │  │   Engine      │  │   Engine      │   │
│  └───────────────┘  └───────────────┘  └───────────────┘   │
└─────────────────────────────────────────────────────────────┘
                              │
┌───────────────────┬─────────┴─────────┬───────────────────┐
│   Audio Pipeline  │   AI Integration  │   Vision Module   │
│  ┌─────────────┐  │  ┌─────────────┐  │  ┌─────────────┐  │
│  │  Recorder   │  │  │   Claude    │  │  │   Face      │  │
│  │  Analyzer   │  │  │   Client    │  │  │  Analyzer   │  │
│  │ Transcriber │  │  │ ElevenLabs  │  │  │   Gaze      │  │
│  │   Player    │  │  │   TTS       │  │  │  Tracker    │  │
│  └─────────────┘  │  └─────────────┘  │  └─────────────┘  │
└───────────────────┴───────────────────┴───────────────────┘

Installation

Prerequisites

  • Python 3.11+
  • Microphone
  • Camera (optional, for visual analysis)
  • Anthropic API key (Claude)
  • ElevenLabs API key

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/AudioInterviewer.git
cd AudioInterviewer
  1. Create virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set API keys:
export ANTHROPIC_API_KEY=your_claude_api_key
export ELEVENLABS_API_KEY=your_elevenlabs_api_key

Or create a .env file:

cp .env.example .env
# Edit .env with your API keys

Usage

GUI Mode (Default)

Run the application with the graphical interface:

python -m src.main

CLI Mode

For testing without the GUI:

python -m src.main --cli

Command Line Options

--cli          Run in CLI mode (no GUI)
--debug        Enable debug logging
--config PATH  Path to custom config file
--help         Show help message

Configuration

Edit config/settings.yaml to customize:

Interview Settings

interview:
  default_duration_minutes: 30
  question_count: 5

Interjection Thresholds

interjection:
  off_topic_threshold: 0.5
  pause_duration_threshold: 3.0
  clarity_threshold: 0.6
  cooldown_seconds: 10.0

Grading Weights

grading:
  weights:
    confidence: 0.2
    clarity: 0.2
    content: 0.3
    engagement: 0.15
    eye_contact: 0.15

Audio Settings

audio:
  sample_rate: 16000
  channels: 1
  buffer_size: 1024

Voice Analysis

voice_analysis:
  pitch_range_hz: [75.0, 500.0]
  silence_threshold_db: -40.0

Project Structure

AudioInterviewer/
├── config/                 # Configuration files
│   ├── settings.yaml      # Main settings
│   ├── prompts.yaml       # Interview prompts
│   └── emotions.yaml      # Emotion thresholds
├── data/                   # Data storage
│   ├── sessions/          # Session recordings
│   ├── database/          # SQLite database
│   └── exports/           # Exported reports
├── src/
│   ├── ai/                # AI integration
│   │   ├── claude_client.py
│   │   ├── elevenlabs_client.py
│   │   ├── context.py
│   │   └── evaluator.py
│   ├── audio/             # Audio processing
│   │   ├── recorder.py
│   │   ├── analyzer.py
│   │   ├── transcriber.py
│   │   ├── player.py
│   │   └── vad.py
│   ├── core/              # Core engine
│   │   ├── session_manager.py
│   │   ├── interjection.py
│   │   ├── grading.py
│   │   ├── feedback.py
│   │   ├── events.py
│   │   └── models.py
│   ├── data/              # Data layer
│   │   ├── database.py
│   │   └── models.py
│   ├── ui/                # User interface
│   │   ├── main_window.py
│   │   ├── camera_widget.py
│   │   ├── transcript_widget.py
│   │   ├── modulation_widget.py
│   │   ├── feedback_widget.py
│   │   ├── control_panel.py
│   │   ├── settings_dialog.py
│   │   └── styles.py
│   ├── utils/             # Utilities
│   │   ├── config.py
│   │   ├── constants.py
│   │   └── logger.py
│   ├── vision/            # Visual analysis
│   │   ├── camera.py
│   │   ├── emotion_detector.py
│   │   ├── face_analyzer.py
│   │   ├── gaze_tracker.py
│   │   ├── posture_analyzer.py
│   │   └── models.py
│   └── main.py            # Entry point
├── tests/                  # Test suite
│   ├── test_audio/
│   ├── test_core/
│   ├── test_vision/
│   ├── integration/
│   └── conftest.py
├── scripts/               # Helper scripts
│   ├── build.sh          # Build script
│   └── setup_dev.sh      # Dev setup
├── plans/                  # Architecture docs
├── pyproject.toml         # Project metadata
├── requirements.txt       # Dependencies
├── .env.example          # Environment template
└── README.md             # This file

Testing

Run tests with pytest:

# Run all tests
pytest

# Run with coverage
pytest --cov=src

# Run specific test module
pytest tests/test_audio/

# Run integration tests
pytest tests/integration/ -m integration

Building

Build a standalone executable:

./scripts/build.sh

The executable will be in dist/AIInterviewer.

Development

Setup Development Environment

./scripts/setup_dev.sh

This will:

  • Create a virtual environment
  • Install dependencies
  • Install development tools (pytest, black, ruff, mypy)
  • Create .env from template
  • Create necessary data directories

Code Style

  • Format with Black: black src tests
  • Lint with Ruff: ruff check src tests
  • Type check with mypy: mypy src

API Keys

Anthropic (Claude)

Get your API key from Anthropic Console

ElevenLabs

Get your API key from ElevenLabs

Acknowledgments

License

MIT License - See LICENSE for details.

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit changes: git commit -am 'Add my feature'
  4. Push to branch: git push origin feature/my-feature
  5. Submit a Pull Request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors