3bdelmoemn/DeepMeet-Gaurd

make your meetings secure

0

stars

30

commits

Jupyter Notebook

primary language

Jul 1, 2026

updated

README

DeepMeet Guard Banner

DeepMeet Guard Logo


Python TypeScript Next.js React FastAPI LangChain PyTorch License


DeepMeet Guard is a dual-purpose AI security research platform targeting one of the most critical emerging threats in remote hiring:
AI-powered audio fraud during live online interviews.
It simultaneously demonstrates how AI-driven audio spoofing attacks operate in real-time,
and deploys a multi-layer detection system to identify and report fraudulent audio to the interviewer.


๐Ÿ“– Setup Guide ยท ๐Ÿš€ Quick Start ยท ๐Ÿ—๏ธ Architecture ยท ๐Ÿ“ก API Reference ยท ๐Ÿค Contributors


๐Ÿ“‹ Table of Contents


๐Ÿ” Overview

DeepMeet Guard is a graduation research platform engineered with two deeply integrated AI subsystems:

SubsystemSideDescription
๐ŸŽญ Simulation EngineAttackerDemonstrates how an AI assistant autonomously responds to interview questions using a candidate-supplied knowledge base, generating synthetic voice output indistinguishable from a real human
๐Ÿ›ก๏ธ Detection EngineDefenderAnalyzes incoming audio streams in real-time using a 4-layer ensemble model to determine whether the speaker's voice is AI-generated, flagging anomalies and reporting verdicts to the interviewer

This dual-sided architecture makes DeepMeet Guard both a security research tool and a corporate fraud prevention platform.


๐Ÿ’ก Motivation

The rapid commoditization of voice synthesis and large language models has made it trivially easy for bad actors to impersonate candidates in remote interviews. A technically sophisticated actor can now:

  • Clone any target voice from a short audio sample
  • Deploy an LLM that answers domain-specific questions in real-time
  • Route synthesized audio through virtual audio drivers โ€” completely undetected

Existing interview platforms offer no protection against this attack vector.

DeepMeet Guard was built to:

  1. Demonstrate the full attack surface through a working, end-to-end simulation
  2. Defend against it through a real-time, multi-model audio integrity analysis pipeline
  3. Inform organizations about the maturity and accessibility of this threat

โœจ Key Features

๐ŸŽญ Simulation Engine (Attacker Side)

  • ๐ŸŽ™๏ธ Real-time Speech-to-Text (STT) โ€” Transcribes the interviewer's spoken question using a Vosk-based offline model
  • ๐Ÿง  Multi-Provider LLM Response Generation โ€” Supports OpenAI, Gemini, Claude, Cohere, and Ollama, grounded in the candidate's knowledge base via LangChain
  • ๐Ÿ”Š Neural Text-to-Speech (TTS) โ€” Synthesizes natural speech using NeuCodec-based NeuTTS with eSpeak-NG phonemization
  • ๐Ÿงฌ Zero-Shot Voice Cloning โ€” Applies the candidate's enrolled voice profile to TTS output for seamless impersonation
  • ๐Ÿ“š Knowledge Base Integration โ€” Candidate-defined knowledge documents serve as the ground truth for all LLM answers
  • โšก Low-latency Pipeline โ€” Optimized for near-real-time performance in live interview conditions

๐Ÿ›ก๏ธ Detection Engine (Defender Side)

  • ๐Ÿ”ฌ 4-Layer Ensemble Detection โ€” Combines Spectra0, ViT, RawNet2, and liveness detection models with configurable weighted voting
  • ๐Ÿ“Š Confidence Scoring โ€” Returns a weighted probability verdict: REAL / AI-GENERATED
  • ๐Ÿšจ Interviewer Reporting โ€” Delivers period-by-period detection results directly to the interviewer's interface
  • ๐Ÿ”„ Continuous Session Monitoring โ€” Captures and analyzes audio in configurable time periods across the full interview

๐ŸŒ Platform

  • ๐Ÿ–ฅ๏ธ Full-Stack Web Application: โ€” Unified Next.js interface for both simulation and detection workflows
  • ๐Ÿ”Œ RESTful API โ€” Clean, documented FastAPI endpoints with automatic Swagger UI
  • ๐Ÿค Multi-Agent LangGraph Workflow โ€” Coordinated pipeline of specialized AI agents handling each stage of simulation

๐Ÿ”„ System Workflow

Simulation Pipeline

Interviewer speaks
       โ”‚
       โ–ผ
  [STT Module โ€” Vosk]
  Transcribes speech to text offline
       โ”‚
       โ–ผ
  [LangChain + LangGraph Agent]
  Retrieves relevant context from candidate's knowledge base
  Generates a tailored answer via configured LLM provider
       โ”‚
       โ–ผ
  [NeuTTS + eSpeak-NG Phonemizer]
  Converts text to natural speech with phoneme-level control
       โ”‚
       โ–ผ
  [Voice Cloning Module]
  Applies candidate's reference voice to synthesized audio
       โ”‚
       โ–ผ
  Fake audio streamed back to the interviewer

Detection Pipeline

Audio stream captured from interviewee
       โ”‚
       โ–ผ
  [Audio Capture โ€” sounddevice / soundcard]
  Segments audio into configurable time periods
       โ”‚
       โ–ผ
  [Parallel 4-Layer Detection]
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  Spectra0   โ”‚    ViT       โ”‚   RawNet2     โ”‚ Behaviour/Live.  โ”‚
  โ”‚ (w=0.42)    โ”‚ (w=0.26)    โ”‚  (w=0.172)    โ”‚  (w=0.148)       โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚
       โ–ผ
  [Weighted Ensemble Scorer]
  Aggregates layer verdicts into final confidence score
       โ”‚
       โ–ผ
  [Reporting Module]
  Result + confidence delivered to interviewer dashboard per period

๐Ÿ—๏ธ System Architecture

graph TD
    subgraph CLIENT ["๐ŸŒ Web Application (Next.js 16 / React 19)"]
        UI[Candidate Interface\nSimulation Controls]
        Dashboard[Interviewer Dashboard\nLive Detection Feed]
    end

    subgraph SERVER ["โš™๏ธ FastAPI Backend (Python 3.11)"]
        API[FastAPI Gateway\nUvicorn ASGI]

        subgraph SIM ["๐ŸŽญ Simulation Engine"]
            STT[Vosk STT\nOffline Speech-to-Text]
            LLM[LangChain / LangGraph\nMulti-Provider LLM Agent]
            KB[Knowledge Base\nDocument Store]
            TTS[NeuTTS + eSpeak-NG\nNeural TTS Engine]
            VC[Voice Cloning\nNeuCodec / Perth]
        end

        subgraph DET ["๐Ÿ›ก๏ธ Detection Engine (4-Layer Ensemble)"]
            CAP[sounddevice / soundcard\nAudio Capture]
            L1[Layer 1 โ€” Spectra0\nweight 0.42]
            L2[Layer 2 โ€” ViT\nweight 0.26]
            L3[Layer 3 โ€” RawNet2\nweight 0.172]
            L4[Layer 4 โ€” Liveness\nweight 0.148]
            SCORE[Weighted Ensemble\nVerdictScorer]
        end

        REPORT[Reporting Module\nPeriod-based JSON Reports]
    end

    UI -->|REST /deepmeet/simulator/*| API
    Dashboard -->|REST /deepmeet/detector/*| API

    API --> STT
    STT --> LLM
    LLM --> KB
    LLM --> TTS
    TTS --> VC
    VC -->|Synthesized Audio Response| API

    API --> CAP
    CAP --> L1 & L2 & L3 & L4
    L1 & L2 & L3 & L4 --> SCORE
    SCORE --> REPORT
    REPORT -->|Verdict + Confidence| Dashboard

๐Ÿ“ Project Structure

DeepMeet-Gaurd/
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ main.py                        # FastAPI application entry point
    โ”œโ”€โ”€ requirements.txt               # Python dependencies
    โ”œโ”€โ”€ .env.example                   # Environment variable template
    โ”‚
    โ”œโ”€โ”€ assets/
    โ”‚   โ”œโ”€โ”€ simulator_assets/          # Candidate voice samples & knowledge base storage
    โ”‚   โ””โ”€โ”€ detector_assets/           # Meeting session audio & detection reports
    โ”‚
    โ”œโ”€โ”€ client/                        # Next.js 16 Frontend
    โ”‚   โ”œโ”€โ”€ app/                       # App Router pages & layouts
    โ”‚   โ”œโ”€โ”€ components/                # Reusable React components (shadcn/ui + Radix UI)
    โ”‚   โ”œโ”€โ”€ hooks/                     # Custom React hooks
    โ”‚   โ”œโ”€โ”€ lib/                       # Utility functions & API client
    โ”‚   โ”œโ”€โ”€ styles/                    # Global CSS styles
    โ”‚   โ”œโ”€โ”€ public/                    # Static assets
    โ”‚   โ”œโ”€โ”€ package.json
    โ”‚   โ”œโ”€โ”€ tsconfig.json
    โ”‚   โ””โ”€โ”€ next.config.mjs
    โ”‚
    โ””โ”€โ”€ server/                        # Python FastAPI Backend
        โ”œโ”€โ”€ app_defaults/              # Default reference audio & text for TTS
        โ”œโ”€โ”€ controllers/               # Request handling logic
        โ”œโ”€โ”€ helpers/                   # Configuration loaders & shared utilities
        โ”œโ”€โ”€ infrastructure/            # Model files: STT (Vosk), liveness detection
        โ”œโ”€โ”€ models/
        โ”‚   โ”œโ”€โ”€ enums/                 # Shared enumerations
        โ”‚   โ”œโ”€โ”€ interfaces/            # Abstract base classes
        โ”‚   โ””โ”€โ”€ schemas/               # Pydantic request/response schemas
        โ”œโ”€โ”€ routers/                   # FastAPI route definitions
        โ”‚   โ”œโ”€โ”€ health.py              # GET /health
        โ”‚   โ”œโ”€โ”€ data.py                # POST /deepmeet/simulator/data/*
        โ”‚   โ”œโ”€โ”€ setup.py               # POST /deepmeet/simulator/setup/*
        โ”‚   โ”œโ”€โ”€ communication.py       # POST /deepmeet/simulator/communication/*
        โ”‚   โ””โ”€โ”€ detection.py           # POST|GET /deepmeet/detector/*
        โ”œโ”€โ”€ services/
        โ”‚   โ”œโ”€โ”€ simulator.py           # Simulator service singleton
        โ”‚   โ””โ”€โ”€ detector.py            # Detector service singleton
        โ”œโ”€โ”€ usecases/                  # Business logic layer
        โ”œโ”€โ”€ utilities/                 # Audio processing, session management helpers
        โ””โ”€โ”€ views/                     # Streamlit debug/monitoring views

๐Ÿ Backend โ€” Server

The server is a Python 3.11 application built on FastAPI, orchestrating two specialized AI subsystems.

Simulation Engine Components

ComponentTechnologyRole
STTVosk 0.3.45 + pyspellcheckerOffline speech-to-text transcription
LLM OrchestrationLangChain 1.0 + LangGraph 1.0Multi-agent pipeline with RAG over knowledge base
LLM ProvidersOpenAI, Gemini, Claude, Cohere, OllamaConfigurable via LLM_PROVIDER env var
TTSNeuCodec โ‰ฅ0.0.4 + eSpeak-NG + phonemizer 3.3Neural text-to-speech synthesis
Voice Cloningresemble-perth 1.0.1Zero-shot voice profile application

Detection Engine โ€” 4-Layer Ensemble

LayerModelWeightTechnology
Layer 1Spectra00.42Custom spectrogram-based detector
Layer 2ViT0.26Vision Transformer on ConstantQ features
Layer 3RawNet20.172End-to-end raw waveform anti-spoofing
Layer 4Behaviour Liveness0.148XGBoost / sklearn behavioural liveness

Additional libraries: Jabberjay 0.0.11, librosa 0.11, torchaudio โ‰ฅ2.11, ONNX Runtime 1.23, transformers, scikit-learn 1.8, xgboost

Server Configuration (FastAPI)

# main.py
app = FastAPI(title="DeepMeet Guard API", version="1.0.0")

# CORS origins
allow_origins = ["http://localhost:3000", "http://localhost:3001", "http://127.0.0.1:3000"]

๐ŸŒ Frontend โ€” Client

The client is a Next.js 16 application written in TypeScript 5.7 with React 19, providing:

  • Candidate View โ€” Simulation interface: info upload, voice enrollment, knowledge base upload, and simulation control
  • Interviewer Dashboard โ€” Real-time audio monitoring with live detection verdict and confidence score display
  • Session Management โ€” Interview session creation, cloning, and full lifecycle control

Frontend Technology Stack

TechnologyVersionPurpose
Next.js16.2.0Full-stack React framework with App Router
React19.2.4UI component library
TypeScript5.7.3Type-safe frontend development
Tailwind CSS4.xUtility-first styling
Radix UIVariousAccessible headless component primitives
shadcn/uiLatestPre-built accessible UI component system
React Three Fiber^9.53D rendering for visual effects
Three.js^0.1833D graphics library
Recharts2.15Data visualization / detection charts
React Hook Form^7.54Form state management
Zod^3.24Schema validation
Lucide React^0.564Icon library
next-themes^0.4.6Dark/light mode support

๐Ÿ“ก API Reference

All endpoints are served by the FastAPI backend. Interactive Swagger docs are available at http://localhost:8000/docs when the server is running.

๐Ÿ”ง Health

MethodEndpointDescription
GET/healthServer health check

๐ŸŽญ Simulator โ€” Data Upload

Prefix: /deepmeet/simulator/data

MethodEndpointBodyDescription
POST/upload/infoJSON InterviewSetupRequestUpload candidate user info and organization details. Returns user_id
POST/upload/referencesForm: user_id, audio (file), reference_text (file)Upload reference voice audio and knowledge base text file for voice cloning

โš™๏ธ Simulator โ€” Setup

Prefix: /deepmeet/simulator/setup

MethodEndpointParamsDescription
POST/impersonateuser_id (query)Load user session and configure LLM agent with candidate's profile and knowledge base
POST/cloneuser_id (query)Load reference audio and text, apply voice cloning profile to TTS engine

๐Ÿ—ฃ๏ธ Simulator โ€” Communication

Prefix: /deepmeet/simulator/communication

MethodEndpointParamsDescription
POST/startuser_id (query)Start simulation loop in background thread: STT โ†’ LLM โ†’ TTS โ†’ voice output
POST/enduser_id (query)Gracefully stop the active simulation thread
POST/reportuser_id (query)Retrieve session transcript and interaction report

๐Ÿ›ก๏ธ Detector

Prefix: /deepmeet/detector

MethodEndpointParamsDescription
POST/startmeeting_name (query)Start continuous detection loop: captures audio in periods, runs 4-layer ensemble analysis
POST/endโ€”Stop the active detection thread gracefully
GET/reportmeeting_name (query)Retrieve the full period-by-period detection report for a completed meeting

โš™๏ธ Setup Instructions

Prerequisites

RequirementVersionNotes
Python3.11.xExact version required โ€” other versions may cause dependency conflicts
Node.js18+LTS recommended
npm9+Bundled with Node.js
GitLatestโ€”
eSpeak-NGLatestRequired for TTS phonemization (Windows: via winget)
Google Accountโ€”Required if using Ollama via Google Colab tunnel

๐Ÿ Server Setup

Step 1 โ€” Clone & Navigate

git clone https://github.com/3bdelmoemn/DeepMeet-Gaurd.git
cd DeepMeet-Gaurd/src

Step 2 โ€” Create Python Virtual Environment

Requirements :


  • python 3.11

Install Python Using "Miniconda" :

  1. Download and install Miniconda From >>> Her

  1. Create A New Conda-Enviroment Using The Followed Command :
conda create -n dmg python=3.11

  1. Activate Custom Conda-Enviroment Using The Followed Command:
conda activate dmg

Step 3 โ€” Install eSpeak-NG (TTS Dependency)

โš ๏ธ Windows only. Linux users: sudo apt install espeak-ng

winget install -e --id eSpeak-NG.eSpeak-NG

Set required environment variables (run as Administrator):

setx PHONEMIZER_ESPEAK_LIBRARY "C:\Program Files\eSpeak NG\libespeak-ng.dll"
setx PHONEMIZER_ESPEAK_PATH "C:\Program Files\eSpeak NG"

Verify installation:

espeak-ng --version

Verify Python integration:

python -c "from phonemizer import phonemize; print(phonemize('hello world', language='en-us'))"
# Expected: h ษ™ l oสŠ  w ษœห l d

๐Ÿ’ก Note: The repository already includes all required NeuTTS / NeuCodec-related files. Do not clone or download any additional TTS repositories.


Step 4 โ€” Download the STT Model

Download the Vosk STT model from Google Drive:

๐Ÿ“ฅ Download STT Model โ€” vosk-model-en-us-0.22

After downloading:

  1. Extract the archive
  2. Place the extracted folder at:
src/server/infrastructure/stt/vosk-model-en-us-0.22/

The path must match STT_MODEL_PATH in your .env file.


Step 5 โ€” Configure Environment Variables

cp .env.example .env

Open .env and fill in all required values. See Environment Variables for a complete reference.


Step 6 โ€” (Optional) Ollama LLM via Google Colab

If using LLM_MODE=local with Ollama tunneled via Colab:

  1. Upload the notebook src/server/notebooks/ollama_setup.ipynb to Google Colab
  2. Run all cells and insert your ngrok API key when prompted
  3. Copy the generated public tunnel URL
  4. Paste it into .env as OLLAMA_BASE_URL

Step 7 โ€” Install Python Dependencies

pip install -r requirements.txt

โœ… All required packages are listed in requirements.txt. Do not install additional packages manually.


Step 8 โ€” Configure Hugging Face Authentication

Some models require a Hugging Face access token before they can be downloaded.

  1. Visit: hugging-face ๐Ÿค—
  2. Create a new token with Read permissions.
  3. Copy your token and run:
hf auth login
  1. Paste your token when prompted and press Enter.

That's it โ€” the token will be stored locally and used automatically when downloading Hugging Face models.


๐ŸŒ Client Setup

Step 1 โ€” Navigate to Client Directory

cd src/client

Step 2 โ€” Install Node.js Dependencies

npm install

Step 3 โ€” Configure Client Environment

cp .env.example .env.local

Set the backend API URL:

NEXT_PUBLIC_API_URL=http://localhost:8000

๐Ÿš€ Running the Project

Start the Backend Server

# From the src/ directory with venv activated
uvicorn main:app --reload --port 8000
EndpointURL
API Basehttp://localhost:8000
Swagger UIhttp://localhost:8000/docs
ReDochttp://localhost:8000/redoc

Start the Frontend

# From src/client/
npm run dev
URLDescription
http://localhost:3000Main web application

Build for Production

cd src/client
npm run build
npm start

๐Ÿ” Environment Variables

Copy src/.env.example to src/.env and fill in all values.

App & Storage

VariableDefault / ExampleRequiredDescription
APP_NAME"DeepMeet Guard"โš™๏ธApplication display name
APP_VERSION"1.0.0"โš™๏ธApplication version
SIMULATOR_STORAGE_PATH"assets/simulator_assets"โœ…Storage path for candidate voice & text files
DETECTOR_STORAGE_PATH"assets/detector_assets"โœ…Storage path for meeting audio & reports
DETECTOR_MAX_DURATION15โœ…Max seconds of audio captured per detection period
DETECTOR_PERIOD_INTERVAL20โœ…Seconds to wait between detection periods

LLM Configuration

VariableExampleRequiredDescription
LLM_MODE"local" / "cloud"โœ…LLM execution mode
LLM_PROVIDER"gemini"โœ…Active LLM provider: openai, gemini, claude, cohere, ollama
OPENAI_API_KEY"sk-..."โš™๏ธOpenAI / OpenRouter API key
CLAUDE_API_KEY"..."โš™๏ธAnthropic Claude API key
GEMINI_API_KEY"..."โš™๏ธGoogle Gemini API key
COHERE_API_KEY"..."โš™๏ธCohere API key
OLLAMA_API_KEY"dummy"โš™๏ธOllama API key (can be any string for local)
OLLAMA_BASE_URL"https://your-ngrok-url/"โš™๏ธOllama server URL (local or Colab tunnel)
OPEN_AI_BASE_URL"https://openrouter.ai/api/v1"โš™๏ธOpenAI-compatible base URL
OPENAI_MODEL_ID"openai/gpt-4.1"โš™๏ธOpenAI model identifier
CLAUDE_MODEL_ID"claude-3-5-haiku-20241022"โš™๏ธClaude model identifier
GEMINI_MODEL_ID"gemini-2.5-flash"โš™๏ธGemini model identifier
COHERE_MODEL_ID"command-r-plus-08-2024"โš™๏ธCohere model identifier
OLLAMA_MODEL_ID"interview-assistant:latest"โš™๏ธOllama model identifier
MAX_TOKENS1024โš™๏ธLLM max output tokens
TEMPERATURE0.1โš™๏ธLLM sampling temperature
CONTEXT_WINDOW8192โš™๏ธLLM context window size
MAX_INPUT_TOKENS6000โš™๏ธMax tokens sent to LLM
HISTORY_MESSAGES5โš™๏ธNumber of history messages to retain per session

TTS Configuration

VariableDefaultRequiredDescription
TTS_BACKBONE"NANO_Q8"โœ…NeuTTS backbone model variant
TTS_CODEC"DISTILL_NEU_CODEC"โœ…NeuCodec codec variant
TTS_DEVICE"cpu"โœ…TTS inference device (cpu / cuda)
TTS_CODEC_DEVICE"cpu"โœ…Codec inference device
DEFAULT_REF_AUDIO_PATH"server/app_defaults/..."โœ…Default reference audio for voice cloning
DEFAULT_REF_TEXT_PATH"server/app_defaults/..."โœ…Default reference text for TTS
COOLDOWN_SECONDS1.2โš™๏ธCooldown between TTS synthesis cycles
TTS_FRAMES_PER_BUFFER32768โš™๏ธAudio buffer size

STT Configuration

VariableDefaultRequiredDescription
STT_MODEL_PATH"server/infrastructure/stt/vosk-model-en-us-0.22"โœ…Path to downloaded Vosk STT model
MIN_WORDS3โš™๏ธMinimum word count to trigger LLM pipeline
DEDUP_TTL30.0โš™๏ธSeconds before a duplicate transcription is accepted

Detection Configuration

VariableDefaultRequiredDescription
LAYER_ONE_WEIGHT0.42โœ…Weight for Spectra0 layer in ensemble
LAYER_TWO_WEIGHT0.26โœ…Weight for ViT layer
LAYER_THREE_WEIGHT0.172โœ…Weight for RawNet2 layer
LAYER_FOUR_WEIGHT0.148โœ…Weight for Liveness layer
LAYER_ONE_NAME"Spectra0"โœ…Spectra0 model identifier
LAYER_TWO_NAME"VIT"โœ…ViT model identifier
LAYER_THREE_NAME"RawNet2"โœ…RawNet2 model identifier
LAYER_FOUR_NAME"liveness"โœ…Liveness model identifier
VIT_DATASET_NAME"VoxCelebSpoof"โœ…Dataset used to train the ViT model
VIT_VISIUALIZATION"ConstantQ"โœ…Feature type fed to ViT
LAYER_FOUR__MODELPATH"server/infrastructure/behaviour_liveness_detection_model"โœ…Path to liveness model files

Refer to .env.example for a fully annotated reference with inline documentation.


๐Ÿ› ๏ธ Technologies Used

Backend

TechnologyVersionPurpose
Python3.11Core backend language
FastAPI0.118.3High-performance REST API framework
Uvicorn0.38.0ASGI server for FastAPI
Pydantic2.12.4Data validation and settings management
Vosk0.3.45Offline Speech-to-Text (STT) engine
pyspellchecker0.8.4Post-STT spelling correction
LangChain1.0.7LLM orchestration & RAG pipeline
LangGraph1.0.3Multi-agent AI workflow graph
langchain-openai1.0.3OpenAI / OpenRouter integration
langchain-google-genai3.1.0Google Gemini integration
langchain-anthropic1.1.0Anthropic Claude integration
langchain-cohere0.5.0Cohere integration
langchain-ollama1.0.1Ollama local LLM integration
NeuCodecโ‰ฅ0.0.4Neural codec for TTS synthesis
eSpeak-NGLatestText-to-phoneme conversion
phonemizer3.3.0Python wrapper for eSpeak-NG
resemble-perth1.0.1Zero-shot voice cloning
PyTorchโ‰ฅ2.11Deep learning inference engine
torchaudioโ‰ฅ2.11Audio processing with PyTorch
torchvisionโ‰ฅ0.22Vision model support
transformersLatestHuggingFace model hub integration
ONNX Runtime1.23.2Optimized model inference
Jabberjay0.0.11Fake audio detection utility
librosa0.11.0Audio feature extraction
scikit-learn1.8.0ML utilities for liveness detection
XGBoostLatestGradient boosting for liveness model
sounddevice0.5.5Cross-platform audio I/O
soundcardLatestSystem audio capture
pydub0.25.1Audio format conversion
soundfile0.13.1Audio file I/O
pyaudio0.2.14PortAudio Python bindings
aiofiles25.1.0Async file I/O
httpx0.28.1Async HTTP client
aiohttp3.13.2Async HTTP networking
StreamlitLatestDebug/monitoring views
pytest9.0.2Testing framework

Frontend

TechnologyVersionPurpose
Next.js16.2.0Full-stack React framework (App Router)
React19.2.4UI component library
TypeScript5.7.3Type-safe frontend development
Tailwind CSS4.xUtility-first CSS framework
Radix UIVariousAccessible headless component primitives
shadcn/uiLatestPre-built UI component system (built on Radix)
React Three Fiber^9.5Declarative 3D graphics for React
Three.js^0.1833D WebGL rendering
Recharts2.15.0Chart library for detection data visualization
React Hook Form^7.54Performant form state management
Zod^3.24TypeScript-first schema validation
Lucide React^0.564Icon library
next-themes^0.4.6Dark/light mode theming
Embla Carousel8.6.0Touch-friendly carousel component
date-fns4.1.0Date utility library
Sonner^1.7Toast notification system
cmdk1.1.1Command palette component
Vaul^1.1.2Drawer component

Infrastructure & AI Models

TechnologyPurpose
Google ColabCloud GPU hosting for Ollama LLM via ngrok tunnel
Vosk Model en-us-0.22Pre-trained offline English STT model
ViT on VoxCelebSpoofVisual Transformer anti-spoofing on ConstantQ features
RawNet2End-to-end raw waveform audio anti-spoofing
Spectra0Spectrogram-based deepfake audio detector
Behaviour Liveness DetectionXGBoost/sklearn behavioural liveness model

๐Ÿ› ๏ธ Troubleshooting

โŒ phonemizer raises ImportError or library not found

Ensure you have set the environment variables correctly after installing eSpeak-NG:

setx PHONEMIZER_ESPEAK_LIBRARY "C:\Program Files\eSpeak NG\libespeak-ng.dll"
setx PHONEMIZER_ESPEAK_PATH "C:\Program Files\eSpeak NG"

Restart your terminal after running setx so the new environment variables take effect.

โŒ STT model not found / FileNotFoundError

Ensure the Vosk model is placed exactly at:

src/server/infrastructure/stt/vosk-model-en-us-0.22/

The folder must contain all extracted model files directly (not a nested sub-folder). Verify your .env:

STT_MODEL_PATH=server/infrastructure/stt/vosk-model-en-us-0.22
โŒ Ollama LLM not responding
  • Verify the Colab notebook is still running โ€” Colab sessions time out after idle periods
  • Re-run all notebook cells and update OLLAMA_BASE_URL in .env with the new ngrok URL
  • Ensure your ngrok API key was correctly entered before running the notebook
โŒ Frontend cannot connect to backend (CORS / Network Error)
  • Ensure the FastAPI server is running on port 8000
  • Check NEXT_PUBLIC_API_URL in src/client/.env.local is set to http://localhost:8000
  • The server allows CORS from localhost:3000, localhost:3001, and 127.0.0.1:3000 by default
โŒ pip install fails with dependency conflicts

Ensure you are using Python 3.11 specifically. Other Python versions will cause dependency resolution failures.

python --version   # Must output Python 3.11.x

If you have multiple Python versions installed, use:

py -3.11 -m venv venv
โŒ Audio capture fails / No audio devices found
  • Ensure your microphone and system audio devices are properly configured in Windows Sound settings
  • Run the server with administrator privileges if audio access is restricted
  • Check that sounddevice and soundcard can enumerate your audio devices:
    import sounddevice as sd
    print(sd.query_devices())
    
โŒ Detection already running (HTTP 409)

Only one detection session can run at a time. If you see this error, call:

POST http://localhost:8000/deepmeet/detector/end

to stop the active session before starting a new one.


๐Ÿ”ฎ Future Improvements

  • WebRTC Integration โ€” Replace REST audio uploads with real-time streaming via WebRTC for sub-second latency
  • Multi-Language Support โ€” Extend STT, LLM, and TTS components beyond English
  • Browser Extension โ€” Package detection as a Chrome extension for Google Meet, Zoom, and Teams
  • Session Analytics Dashboard โ€” Post-session reports with timeline-annotated detection events and charts
  • Docker + Docker Compose โ€” One-command containerized setup for all services
  • CI/CD Pipeline โ€” Automated testing and deployment via GitHub Actions
  • Mobile Client โ€” React Native companion app for on-device monitoring
  • Enterprise Webhook API โ€” Integration for ATS and HR platforms
  • GPU Acceleration โ€” CUDA-optimized inference paths for all 4 detection layers
  • Real-time WebSocket Feed โ€” Push-based detection results instead of polling

๐Ÿ‘ฅ Contributors

GitHub

Built as a graduation research project. Contributions and feedback are welcome.


๐Ÿ“„ License

This project is licensed under the Apache License 2.0.
See the LICENSE file for full details.


footer

DeepMeet Guard ยท Built to expose the threat. Engineered to stop it.

License GitHub

For research and educational purposes. Use responsibly.

Contributors

3bdelmoemn

30 commits

3bdelmoemn/DeepMeet-Gaurd

make your meetings secure

0

stars

30

commits

Jupyter Notebook

primary language

Jul 1, 2026

updated

README

DeepMeet Guard Banner

DeepMeet Guard Logo


Python TypeScript Next.js React FastAPI LangChain PyTorch License


DeepMeet Guard is a dual-purpose AI security research platform targeting one of the most critical emerging threats in remote hiring:
AI-powered audio fraud during live online interviews.
It simultaneously demonstrates how AI-driven audio spoofing attacks operate in real-time,
and deploys a multi-layer detection system to identify and report fraudulent audio to the interviewer.


๐Ÿ“– Setup Guide ยท ๐Ÿš€ Quick Start ยท ๐Ÿ—๏ธ Architecture ยท ๐Ÿ“ก API Reference ยท ๐Ÿค Contributors


๐Ÿ“‹ Table of Contents


๐Ÿ” Overview

DeepMeet Guard is a graduation research platform engineered with two deeply integrated AI subsystems:

SubsystemSideDescription
๐ŸŽญ Simulation EngineAttackerDemonstrates how an AI assistant autonomously responds to interview questions using a candidate-supplied knowledge base, generating synthetic voice output indistinguishable from a real human
๐Ÿ›ก๏ธ Detection EngineDefenderAnalyzes incoming audio streams in real-time using a 4-layer ensemble model to determine whether the speaker's voice is AI-generated, flagging anomalies and reporting verdicts to the interviewer

This dual-sided architecture makes DeepMeet Guard both a security research tool and a corporate fraud prevention platform.


๐Ÿ’ก Motivation

The rapid commoditization of voice synthesis and large language models has made it trivially easy for bad actors to impersonate candidates in remote interviews. A technically sophisticated actor can now:

  • Clone any target voice from a short audio sample
  • Deploy an LLM that answers domain-specific questions in real-time
  • Route synthesized audio through virtual audio drivers โ€” completely undetected

Existing interview platforms offer no protection against this attack vector.

DeepMeet Guard was built to:

  1. Demonstrate the full attack surface through a working, end-to-end simulation
  2. Defend against it through a real-time, multi-model audio integrity analysis pipeline
  3. Inform organizations about the maturity and accessibility of this threat

โœจ Key Features

๐ŸŽญ Simulation Engine (Attacker Side)

  • ๐ŸŽ™๏ธ Real-time Speech-to-Text (STT) โ€” Transcribes the interviewer's spoken question using a Vosk-based offline model
  • ๐Ÿง  Multi-Provider LLM Response Generation โ€” Supports OpenAI, Gemini, Claude, Cohere, and Ollama, grounded in the candidate's knowledge base via LangChain
  • ๐Ÿ”Š Neural Text-to-Speech (TTS) โ€” Synthesizes natural speech using NeuCodec-based NeuTTS with eSpeak-NG phonemization
  • ๐Ÿงฌ Zero-Shot Voice Cloning โ€” Applies the candidate's enrolled voice profile to TTS output for seamless impersonation
  • ๐Ÿ“š Knowledge Base Integration โ€” Candidate-defined knowledge documents serve as the ground truth for all LLM answers
  • โšก Low-latency Pipeline โ€” Optimized for near-real-time performance in live interview conditions

๐Ÿ›ก๏ธ Detection Engine (Defender Side)

  • ๐Ÿ”ฌ 4-Layer Ensemble Detection โ€” Combines Spectra0, ViT, RawNet2, and liveness detection models with configurable weighted voting
  • ๐Ÿ“Š Confidence Scoring โ€” Returns a weighted probability verdict: REAL / AI-GENERATED
  • ๐Ÿšจ Interviewer Reporting โ€” Delivers period-by-period detection results directly to the interviewer's interface
  • ๐Ÿ”„ Continuous Session Monitoring โ€” Captures and analyzes audio in configurable time periods across the full interview

๐ŸŒ Platform

  • ๐Ÿ–ฅ๏ธ Full-Stack Web Application: โ€” Unified Next.js interface for both simulation and detection workflows
  • ๐Ÿ”Œ RESTful API โ€” Clean, documented FastAPI endpoints with automatic Swagger UI
  • ๐Ÿค Multi-Agent LangGraph Workflow โ€” Coordinated pipeline of specialized AI agents handling each stage of simulation

๐Ÿ”„ System Workflow

Simulation Pipeline

Interviewer speaks
       โ”‚
       โ–ผ
  [STT Module โ€” Vosk]
  Transcribes speech to text offline
       โ”‚
       โ–ผ
  [LangChain + LangGraph Agent]
  Retrieves relevant context from candidate's knowledge base
  Generates a tailored answer via configured LLM provider
       โ”‚
       โ–ผ
  [NeuTTS + eSpeak-NG Phonemizer]
  Converts text to natural speech with phoneme-level control
       โ”‚
       โ–ผ
  [Voice Cloning Module]
  Applies candidate's reference voice to synthesized audio
       โ”‚
       โ–ผ
  Fake audio streamed back to the interviewer

Detection Pipeline

Audio stream captured from interviewee
       โ”‚
       โ–ผ
  [Audio Capture โ€” sounddevice / soundcard]
  Segments audio into configurable time periods
       โ”‚
       โ–ผ
  [Parallel 4-Layer Detection]
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  Spectra0   โ”‚    ViT       โ”‚   RawNet2     โ”‚ Behaviour/Live.  โ”‚
  โ”‚ (w=0.42)    โ”‚ (w=0.26)    โ”‚  (w=0.172)    โ”‚  (w=0.148)       โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚
       โ–ผ
  [Weighted Ensemble Scorer]
  Aggregates layer verdicts into final confidence score
       โ”‚
       โ–ผ
  [Reporting Module]
  Result + confidence delivered to interviewer dashboard per period

๐Ÿ—๏ธ System Architecture

graph TD
    subgraph CLIENT ["๐ŸŒ Web Application (Next.js 16 / React 19)"]
        UI[Candidate Interface\nSimulation Controls]
        Dashboard[Interviewer Dashboard\nLive Detection Feed]
    end

    subgraph SERVER ["โš™๏ธ FastAPI Backend (Python 3.11)"]
        API[FastAPI Gateway\nUvicorn ASGI]

        subgraph SIM ["๐ŸŽญ Simulation Engine"]
            STT[Vosk STT\nOffline Speech-to-Text]
            LLM[LangChain / LangGraph\nMulti-Provider LLM Agent]
            KB[Knowledge Base\nDocument Store]
            TTS[NeuTTS + eSpeak-NG\nNeural TTS Engine]
            VC[Voice Cloning\nNeuCodec / Perth]
        end

        subgraph DET ["๐Ÿ›ก๏ธ Detection Engine (4-Layer Ensemble)"]
            CAP[sounddevice / soundcard\nAudio Capture]
            L1[Layer 1 โ€” Spectra0\nweight 0.42]
            L2[Layer 2 โ€” ViT\nweight 0.26]
            L3[Layer 3 โ€” RawNet2\nweight 0.172]
            L4[Layer 4 โ€” Liveness\nweight 0.148]
            SCORE[Weighted Ensemble\nVerdictScorer]
        end

        REPORT[Reporting Module\nPeriod-based JSON Reports]
    end

    UI -->|REST /deepmeet/simulator/*| API
    Dashboard -->|REST /deepmeet/detector/*| API

    API --> STT
    STT --> LLM
    LLM --> KB
    LLM --> TTS
    TTS --> VC
    VC -->|Synthesized Audio Response| API

    API --> CAP
    CAP --> L1 & L2 & L3 & L4
    L1 & L2 & L3 & L4 --> SCORE
    SCORE --> REPORT
    REPORT -->|Verdict + Confidence| Dashboard

๐Ÿ“ Project Structure

DeepMeet-Gaurd/
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ src/
    โ”œโ”€โ”€ main.py                        # FastAPI application entry point
    โ”œโ”€โ”€ requirements.txt               # Python dependencies
    โ”œโ”€โ”€ .env.example                   # Environment variable template
    โ”‚
    โ”œโ”€โ”€ assets/
    โ”‚   โ”œโ”€โ”€ simulator_assets/          # Candidate voice samples & knowledge base storage
    โ”‚   โ””โ”€โ”€ detector_assets/           # Meeting session audio & detection reports
    โ”‚
    โ”œโ”€โ”€ client/                        # Next.js 16 Frontend
    โ”‚   โ”œโ”€โ”€ app/                       # App Router pages & layouts
    โ”‚   โ”œโ”€โ”€ components/                # Reusable React components (shadcn/ui + Radix UI)
    โ”‚   โ”œโ”€โ”€ hooks/                     # Custom React hooks
    โ”‚   โ”œโ”€โ”€ lib/                       # Utility functions & API client
    โ”‚   โ”œโ”€โ”€ styles/                    # Global CSS styles
    โ”‚   โ”œโ”€โ”€ public/                    # Static assets
    โ”‚   โ”œโ”€โ”€ package.json
    โ”‚   โ”œโ”€โ”€ tsconfig.json
    โ”‚   โ””โ”€โ”€ next.config.mjs
    โ”‚
    โ””โ”€โ”€ server/                        # Python FastAPI Backend
        โ”œโ”€โ”€ app_defaults/              # Default reference audio & text for TTS
        โ”œโ”€โ”€ controllers/               # Request handling logic
        โ”œโ”€โ”€ helpers/                   # Configuration loaders & shared utilities
        โ”œโ”€โ”€ infrastructure/            # Model files: STT (Vosk), liveness detection
        โ”œโ”€โ”€ models/
        โ”‚   โ”œโ”€โ”€ enums/                 # Shared enumerations
        โ”‚   โ”œโ”€โ”€ interfaces/            # Abstract base classes
        โ”‚   โ””โ”€โ”€ schemas/               # Pydantic request/response schemas
        โ”œโ”€โ”€ routers/                   # FastAPI route definitions
        โ”‚   โ”œโ”€โ”€ health.py              # GET /health
        โ”‚   โ”œโ”€โ”€ data.py                # POST /deepmeet/simulator/data/*
        โ”‚   โ”œโ”€โ”€ setup.py               # POST /deepmeet/simulator/setup/*
        โ”‚   โ”œโ”€โ”€ communication.py       # POST /deepmeet/simulator/communication/*
        โ”‚   โ””โ”€โ”€ detection.py           # POST|GET /deepmeet/detector/*
        โ”œโ”€โ”€ services/
        โ”‚   โ”œโ”€โ”€ simulator.py           # Simulator service singleton
        โ”‚   โ””โ”€โ”€ detector.py            # Detector service singleton
        โ”œโ”€โ”€ usecases/                  # Business logic layer
        โ”œโ”€โ”€ utilities/                 # Audio processing, session management helpers
        โ””โ”€โ”€ views/                     # Streamlit debug/monitoring views

๐Ÿ Backend โ€” Server

The server is a Python 3.11 application built on FastAPI, orchestrating two specialized AI subsystems.

Simulation Engine Components

ComponentTechnologyRole
STTVosk 0.3.45 + pyspellcheckerOffline speech-to-text transcription
LLM OrchestrationLangChain 1.0 + LangGraph 1.0Multi-agent pipeline with RAG over knowledge base
LLM ProvidersOpenAI, Gemini, Claude, Cohere, OllamaConfigurable via LLM_PROVIDER env var
TTSNeuCodec โ‰ฅ0.0.4 + eSpeak-NG + phonemizer 3.3Neural text-to-speech synthesis
Voice Cloningresemble-perth 1.0.1Zero-shot voice profile application

Detection Engine โ€” 4-Layer Ensemble

LayerModelWeightTechnology
Layer 1Spectra00.42Custom spectrogram-based detector
Layer 2ViT0.26Vision Transformer on ConstantQ features
Layer 3RawNet20.172End-to-end raw waveform anti-spoofing
Layer 4Behaviour Liveness0.148XGBoost / sklearn behavioural liveness

Additional libraries: Jabberjay 0.0.11, librosa 0.11, torchaudio โ‰ฅ2.11, ONNX Runtime 1.23, transformers, scikit-learn 1.8, xgboost

Server Configuration (FastAPI)

# main.py
app = FastAPI(title="DeepMeet Guard API", version="1.0.0")

# CORS origins
allow_origins = ["http://localhost:3000", "http://localhost:3001", "http://127.0.0.1:3000"]

๐ŸŒ Frontend โ€” Client

The client is a Next.js 16 application written in TypeScript 5.7 with React 19, providing:

  • Candidate View โ€” Simulation interface: info upload, voice enrollment, knowledge base upload, and simulation control
  • Interviewer Dashboard โ€” Real-time audio monitoring with live detection verdict and confidence score display
  • Session Management โ€” Interview session creation, cloning, and full lifecycle control

Frontend Technology Stack

TechnologyVersionPurpose
Next.js16.2.0Full-stack React framework with App Router
React19.2.4UI component library
TypeScript5.7.3Type-safe frontend development
Tailwind CSS4.xUtility-first styling
Radix UIVariousAccessible headless component primitives
shadcn/uiLatestPre-built accessible UI component system
React Three Fiber^9.53D rendering for visual effects
Three.js^0.1833D graphics library
Recharts2.15Data visualization / detection charts
React Hook Form^7.54Form state management
Zod^3.24Schema validation
Lucide React^0.564Icon library
next-themes^0.4.6Dark/light mode support

๐Ÿ“ก API Reference

All endpoints are served by the FastAPI backend. Interactive Swagger docs are available at http://localhost:8000/docs when the server is running.

๐Ÿ”ง Health

MethodEndpointDescription
GET/healthServer health check

๐ŸŽญ Simulator โ€” Data Upload

Prefix: /deepmeet/simulator/data

MethodEndpointBodyDescription
POST/upload/infoJSON InterviewSetupRequestUpload candidate user info and organization details. Returns user_id
POST/upload/referencesForm: user_id, audio (file), reference_text (file)Upload reference voice audio and knowledge base text file for voice cloning

โš™๏ธ Simulator โ€” Setup

Prefix: /deepmeet/simulator/setup

MethodEndpointParamsDescription
POST/impersonateuser_id (query)Load user session and configure LLM agent with candidate's profile and knowledge base
POST/cloneuser_id (query)Load reference audio and text, apply voice cloning profile to TTS engine

๐Ÿ—ฃ๏ธ Simulator โ€” Communication

Prefix: /deepmeet/simulator/communication

MethodEndpointParamsDescription
POST/startuser_id (query)Start simulation loop in background thread: STT โ†’ LLM โ†’ TTS โ†’ voice output
POST/enduser_id (query)Gracefully stop the active simulation thread
POST/reportuser_id (query)Retrieve session transcript and interaction report

๐Ÿ›ก๏ธ Detector

Prefix: /deepmeet/detector

MethodEndpointParamsDescription
POST/startmeeting_name (query)Start continuous detection loop: captures audio in periods, runs 4-layer ensemble analysis
POST/endโ€”Stop the active detection thread gracefully
GET/reportmeeting_name (query)Retrieve the full period-by-period detection report for a completed meeting

โš™๏ธ Setup Instructions

Prerequisites

RequirementVersionNotes
Python3.11.xExact version required โ€” other versions may cause dependency conflicts
Node.js18+LTS recommended
npm9+Bundled with Node.js
GitLatestโ€”
eSpeak-NGLatestRequired for TTS phonemization (Windows: via winget)
Google Accountโ€”Required if using Ollama via Google Colab tunnel

๐Ÿ Server Setup

Step 1 โ€” Clone & Navigate

git clone https://github.com/3bdelmoemn/DeepMeet-Gaurd.git
cd DeepMeet-Gaurd/src

Step 2 โ€” Create Python Virtual Environment

Requirements :


  • python 3.11

Install Python Using "Miniconda" :

  1. Download and install Miniconda From >>> Her

  1. Create A New Conda-Enviroment Using The Followed Command :
conda create -n dmg python=3.11

  1. Activate Custom Conda-Enviroment Using The Followed Command:
conda activate dmg

Step 3 โ€” Install eSpeak-NG (TTS Dependency)

โš ๏ธ Windows only. Linux users: sudo apt install espeak-ng

winget install -e --id eSpeak-NG.eSpeak-NG

Set required environment variables (run as Administrator):

setx PHONEMIZER_ESPEAK_LIBRARY "C:\Program Files\eSpeak NG\libespeak-ng.dll"
setx PHONEMIZER_ESPEAK_PATH "C:\Program Files\eSpeak NG"

Verify installation:

espeak-ng --version

Verify Python integration:

python -c "from phonemizer import phonemize; print(phonemize('hello world', language='en-us'))"
# Expected: h ษ™ l oสŠ  w ษœห l d

๐Ÿ’ก Note: The repository already includes all required NeuTTS / NeuCodec-related files. Do not clone or download any additional TTS repositories.


Step 4 โ€” Download the STT Model

Download the Vosk STT model from Google Drive:

๐Ÿ“ฅ Download STT Model โ€” vosk-model-en-us-0.22

After downloading:

  1. Extract the archive
  2. Place the extracted folder at:
src/server/infrastructure/stt/vosk-model-en-us-0.22/

The path must match STT_MODEL_PATH in your .env file.


Step 5 โ€” Configure Environment Variables

cp .env.example .env

Open .env and fill in all required values. See Environment Variables for a complete reference.


Step 6 โ€” (Optional) Ollama LLM via Google Colab

If using LLM_MODE=local with Ollama tunneled via Colab:

  1. Upload the notebook src/server/notebooks/ollama_setup.ipynb to Google Colab
  2. Run all cells and insert your ngrok API key when prompted
  3. Copy the generated public tunnel URL
  4. Paste it into .env as OLLAMA_BASE_URL

Step 7 โ€” Install Python Dependencies

pip install -r requirements.txt

โœ… All required packages are listed in requirements.txt. Do not install additional packages manually.


Step 8 โ€” Configure Hugging Face Authentication

Some models require a Hugging Face access token before they can be downloaded.

  1. Visit: hugging-face ๐Ÿค—
  2. Create a new token with Read permissions.
  3. Copy your token and run:
hf auth login
  1. Paste your token when prompted and press Enter.

That's it โ€” the token will be stored locally and used automatically when downloading Hugging Face models.


๐ŸŒ Client Setup

Step 1 โ€” Navigate to Client Directory

cd src/client

Step 2 โ€” Install Node.js Dependencies

npm install

Step 3 โ€” Configure Client Environment

cp .env.example .env.local

Set the backend API URL:

NEXT_PUBLIC_API_URL=http://localhost:8000

๐Ÿš€ Running the Project

Start the Backend Server

# From the src/ directory with venv activated
uvicorn main:app --reload --port 8000
EndpointURL
API Basehttp://localhost:8000
Swagger UIhttp://localhost:8000/docs
ReDochttp://localhost:8000/redoc

Start the Frontend

# From src/client/
npm run dev
URLDescription
http://localhost:3000Main web application

Build for Production

cd src/client
npm run build
npm start

๐Ÿ” Environment Variables

Copy src/.env.example to src/.env and fill in all values.

App & Storage

VariableDefault / ExampleRequiredDescription
APP_NAME"DeepMeet Guard"โš™๏ธApplication display name
APP_VERSION"1.0.0"โš™๏ธApplication version
SIMULATOR_STORAGE_PATH"assets/simulator_assets"โœ…Storage path for candidate voice & text files
DETECTOR_STORAGE_PATH"assets/detector_assets"โœ…Storage path for meeting audio & reports
DETECTOR_MAX_DURATION15โœ…Max seconds of audio captured per detection period
DETECTOR_PERIOD_INTERVAL20โœ…Seconds to wait between detection periods

LLM Configuration

VariableExampleRequiredDescription
LLM_MODE"local" / "cloud"โœ…LLM execution mode
LLM_PROVIDER"gemini"โœ…Active LLM provider: openai, gemini, claude, cohere, ollama
OPENAI_API_KEY"sk-..."โš™๏ธOpenAI / OpenRouter API key
CLAUDE_API_KEY"..."โš™๏ธAnthropic Claude API key
GEMINI_API_KEY"..."โš™๏ธGoogle Gemini API key
COHERE_API_KEY"..."โš™๏ธCohere API key
OLLAMA_API_KEY"dummy"โš™๏ธOllama API key (can be any string for local)
OLLAMA_BASE_URL"https://your-ngrok-url/"โš™๏ธOllama server URL (local or Colab tunnel)
OPEN_AI_BASE_URL"https://openrouter.ai/api/v1"โš™๏ธOpenAI-compatible base URL
OPENAI_MODEL_ID"openai/gpt-4.1"โš™๏ธOpenAI model identifier
CLAUDE_MODEL_ID"claude-3-5-haiku-20241022"โš™๏ธClaude model identifier
GEMINI_MODEL_ID"gemini-2.5-flash"โš™๏ธGemini model identifier
COHERE_MODEL_ID"command-r-plus-08-2024"โš™๏ธCohere model identifier
OLLAMA_MODEL_ID"interview-assistant:latest"โš™๏ธOllama model identifier
MAX_TOKENS1024โš™๏ธLLM max output tokens
TEMPERATURE0.1โš™๏ธLLM sampling temperature
CONTEXT_WINDOW8192โš™๏ธLLM context window size
MAX_INPUT_TOKENS6000โš™๏ธMax tokens sent to LLM
HISTORY_MESSAGES5โš™๏ธNumber of history messages to retain per session

TTS Configuration

VariableDefaultRequiredDescription
TTS_BACKBONE"NANO_Q8"โœ…NeuTTS backbone model variant
TTS_CODEC"DISTILL_NEU_CODEC"โœ…NeuCodec codec variant
TTS_DEVICE"cpu"โœ…TTS inference device (cpu / cuda)
TTS_CODEC_DEVICE"cpu"โœ…Codec inference device
DEFAULT_REF_AUDIO_PATH"server/app_defaults/..."โœ…Default reference audio for voice cloning
DEFAULT_REF_TEXT_PATH"server/app_defaults/..."โœ…Default reference text for TTS
COOLDOWN_SECONDS1.2โš™๏ธCooldown between TTS synthesis cycles
TTS_FRAMES_PER_BUFFER32768โš™๏ธAudio buffer size

STT Configuration

VariableDefaultRequiredDescription
STT_MODEL_PATH"server/infrastructure/stt/vosk-model-en-us-0.22"โœ…Path to downloaded Vosk STT model
MIN_WORDS3โš™๏ธMinimum word count to trigger LLM pipeline
DEDUP_TTL30.0โš™๏ธSeconds before a duplicate transcription is accepted

Detection Configuration

VariableDefaultRequiredDescription
LAYER_ONE_WEIGHT0.42โœ…Weight for Spectra0 layer in ensemble
LAYER_TWO_WEIGHT0.26โœ…Weight for ViT layer
LAYER_THREE_WEIGHT0.172โœ…Weight for RawNet2 layer
LAYER_FOUR_WEIGHT0.148โœ…Weight for Liveness layer
LAYER_ONE_NAME"Spectra0"โœ…Spectra0 model identifier
LAYER_TWO_NAME"VIT"โœ…ViT model identifier
LAYER_THREE_NAME"RawNet2"โœ…RawNet2 model identifier
LAYER_FOUR_NAME"liveness"โœ…Liveness model identifier
VIT_DATASET_NAME"VoxCelebSpoof"โœ…Dataset used to train the ViT model
VIT_VISIUALIZATION"ConstantQ"โœ…Feature type fed to ViT
LAYER_FOUR__MODELPATH"server/infrastructure/behaviour_liveness_detection_model"โœ…Path to liveness model files

Refer to .env.example for a fully annotated reference with inline documentation.


๐Ÿ› ๏ธ Technologies Used

Backend

TechnologyVersionPurpose
Python3.11Core backend language
FastAPI0.118.3High-performance REST API framework
Uvicorn0.38.0ASGI server for FastAPI
Pydantic2.12.4Data validation and settings management
Vosk0.3.45Offline Speech-to-Text (STT) engine
pyspellchecker0.8.4Post-STT spelling correction
LangChain1.0.7LLM orchestration & RAG pipeline
LangGraph1.0.3Multi-agent AI workflow graph
langchain-openai1.0.3OpenAI / OpenRouter integration
langchain-google-genai3.1.0Google Gemini integration
langchain-anthropic1.1.0Anthropic Claude integration
langchain-cohere0.5.0Cohere integration
langchain-ollama1.0.1Ollama local LLM integration
NeuCodecโ‰ฅ0.0.4Neural codec for TTS synthesis
eSpeak-NGLatestText-to-phoneme conversion
phonemizer3.3.0Python wrapper for eSpeak-NG
resemble-perth1.0.1Zero-shot voice cloning
PyTorchโ‰ฅ2.11Deep learning inference engine
torchaudioโ‰ฅ2.11Audio processing with PyTorch
torchvisionโ‰ฅ0.22Vision model support
transformersLatestHuggingFace model hub integration
ONNX Runtime1.23.2Optimized model inference
Jabberjay0.0.11Fake audio detection utility
librosa0.11.0Audio feature extraction
scikit-learn1.8.0ML utilities for liveness detection
XGBoostLatestGradient boosting for liveness model
sounddevice0.5.5Cross-platform audio I/O
soundcardLatestSystem audio capture
pydub0.25.1Audio format conversion
soundfile0.13.1Audio file I/O
pyaudio0.2.14PortAudio Python bindings
aiofiles25.1.0Async file I/O
httpx0.28.1Async HTTP client
aiohttp3.13.2Async HTTP networking
StreamlitLatestDebug/monitoring views
pytest9.0.2Testing framework

Frontend

TechnologyVersionPurpose
Next.js16.2.0Full-stack React framework (App Router)
React19.2.4UI component library
TypeScript5.7.3Type-safe frontend development
Tailwind CSS4.xUtility-first CSS framework
Radix UIVariousAccessible headless component primitives
shadcn/uiLatestPre-built UI component system (built on Radix)
React Three Fiber^9.5Declarative 3D graphics for React
Three.js^0.1833D WebGL rendering
Recharts2.15.0Chart library for detection data visualization
React Hook Form^7.54Performant form state management
Zod^3.24TypeScript-first schema validation
Lucide React^0.564Icon library
next-themes^0.4.6Dark/light mode theming
Embla Carousel8.6.0Touch-friendly carousel component
date-fns4.1.0Date utility library
Sonner^1.7Toast notification system
cmdk1.1.1Command palette component
Vaul^1.1.2Drawer component

Infrastructure & AI Models

TechnologyPurpose
Google ColabCloud GPU hosting for Ollama LLM via ngrok tunnel
Vosk Model en-us-0.22Pre-trained offline English STT model
ViT on VoxCelebSpoofVisual Transformer anti-spoofing on ConstantQ features
RawNet2End-to-end raw waveform audio anti-spoofing
Spectra0Spectrogram-based deepfake audio detector
Behaviour Liveness DetectionXGBoost/sklearn behavioural liveness model

๐Ÿ› ๏ธ Troubleshooting

โŒ phonemizer raises ImportError or library not found

Ensure you have set the environment variables correctly after installing eSpeak-NG:

setx PHONEMIZER_ESPEAK_LIBRARY "C:\Program Files\eSpeak NG\libespeak-ng.dll"
setx PHONEMIZER_ESPEAK_PATH "C:\Program Files\eSpeak NG"

Restart your terminal after running setx so the new environment variables take effect.

โŒ STT model not found / FileNotFoundError

Ensure the Vosk model is placed exactly at:

src/server/infrastructure/stt/vosk-model-en-us-0.22/

The folder must contain all extracted model files directly (not a nested sub-folder). Verify your .env:

STT_MODEL_PATH=server/infrastructure/stt/vosk-model-en-us-0.22
โŒ Ollama LLM not responding
  • Verify the Colab notebook is still running โ€” Colab sessions time out after idle periods
  • Re-run all notebook cells and update OLLAMA_BASE_URL in .env with the new ngrok URL
  • Ensure your ngrok API key was correctly entered before running the notebook
โŒ Frontend cannot connect to backend (CORS / Network Error)
  • Ensure the FastAPI server is running on port 8000
  • Check NEXT_PUBLIC_API_URL in src/client/.env.local is set to http://localhost:8000
  • The server allows CORS from localhost:3000, localhost:3001, and 127.0.0.1:3000 by default
โŒ pip install fails with dependency conflicts

Ensure you are using Python 3.11 specifically. Other Python versions will cause dependency resolution failures.

python --version   # Must output Python 3.11.x

If you have multiple Python versions installed, use:

py -3.11 -m venv venv
โŒ Audio capture fails / No audio devices found
  • Ensure your microphone and system audio devices are properly configured in Windows Sound settings
  • Run the server with administrator privileges if audio access is restricted
  • Check that sounddevice and soundcard can enumerate your audio devices:
    import sounddevice as sd
    print(sd.query_devices())
    
โŒ Detection already running (HTTP 409)

Only one detection session can run at a time. If you see this error, call:

POST http://localhost:8000/deepmeet/detector/end

to stop the active session before starting a new one.


๐Ÿ”ฎ Future Improvements

  • WebRTC Integration โ€” Replace REST audio uploads with real-time streaming via WebRTC for sub-second latency
  • Multi-Language Support โ€” Extend STT, LLM, and TTS components beyond English
  • Browser Extension โ€” Package detection as a Chrome extension for Google Meet, Zoom, and Teams
  • Session Analytics Dashboard โ€” Post-session reports with timeline-annotated detection events and charts
  • Docker + Docker Compose โ€” One-command containerized setup for all services
  • CI/CD Pipeline โ€” Automated testing and deployment via GitHub Actions
  • Mobile Client โ€” React Native companion app for on-device monitoring
  • Enterprise Webhook API โ€” Integration for ATS and HR platforms
  • GPU Acceleration โ€” CUDA-optimized inference paths for all 4 detection layers
  • Real-time WebSocket Feed โ€” Push-based detection results instead of polling

๐Ÿ‘ฅ Contributors

GitHub

Built as a graduation research project. Contributions and feedback are welcome.


๐Ÿ“„ License

This project is licensed under the Apache License 2.0.
See the LICENSE file for full details.


footer

DeepMeet Guard ยท Built to expose the threat. Engineered to stop it.

License GitHub

For research and educational purposes. Use responsibly.

Contributors

3bdelmoemn

30 commits

Languages

Jupyter Notebook

47.3%

TypeScript

31.9%

Python

20.0%