SIH 2026 Problem Statement SIH26104 — Voice Cloning Detection
High-performance voice authenticity evaluation engine powered byWavLM-Largefrontend andAASISTbackend, supporting both offline Audio File Analysis and Real-Time Browser-to-Browser WebRTC Voice Call Detection.
AI-Voice-Detection/
├── deepfense-framework/ # Pretrained base model and fine-tuned checkpoints
│ ├── pretrained_models/
│ │ └── WavLM-Large.pt # WavLM-Large SSL feature extractor (1.26 GB)
│ └── models/ASV5_WavLM_AASIST_NoAug_Seed42/
│ ├── best_model.pth # Fine-tuned AASIST detector checkpoint (3.79 GB)
│ └── config.yaml # Model & loss configuration
│
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI application, CORS, lifespan startup
│ │ ├── config.py # Environment & dynamic configuration
│ │ ├── api/
│ │ │ ├── file_detection.py # Mode 1: POST /api/detect/file (chunking & scoring)
│ │ │ ├── signaling.py # Mode 2: WebRTC Signaling WS (/ws/signaling/...)
│ │ │ └── live_detection.py # Mode 2: Transient Audio Detection WS (/ws/detect/...)
│ │ └── detection/
│ │ ├── deepfense_service.py# In-process singleton PyTorch inference service
│ │ ├── audio_processor.py # 16 kHz normalization, 4s repeat-pad chunking
│ │ └── risk_engine.py # Session risk policy & voice integrity tracker
│ ├── requirements.txt
│ └── Dockerfile
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Navbar.jsx # Mode switcher and backend status HUD
│ │ │ ├── FileAnalysis.jsx # Mode 1 UI (drag & drop, score timeline)
│ │ │ ├── LiveCall.jsx # Mode 2 UI (WebRTC call + live detection HUD)
│ │ │ └── AudioVisualizer.jsx # Real-time HTML5 audio spectrum canvas
│ │ ├── services/
│ │ │ ├── webrtc.js # Browser RTCPeerConnection & signaling client
│ │ │ └── audioCapture.js # Transient remote audio downsampling client
│ │ ├── config.js # Dynamic API / WebSocket host configuration
│ │ └── index.css # Cybersecurity dark-mode design system
│ ├── package.json
│ ├── vite.config.js
│ ├── nginx.conf
│ └── Dockerfile
│
├── docker-compose.yml
└── README.md
| Parameter | Specification | Details |
|---|---|---|
| Frontend Model | WavLM-Large | Self-supervised speech representations (pretrained_models/WavLM-Large.pt) |
| Backend Model | AASIST | Heterogeneous spectral-temporal graph attention network |
| Trained Checkpoint | best_model.pth | ASV5_WavLM_AASIST_NoAug_Seed42 fine-tuned detector |
| Audio Format | 16 kHz Mono | Evaluated in sequential 4-second (64,000 samples) windows |
| Score Semantics | Logit score of Class 1 | Higher = Authentic / Bonafide; Lower / Negative = Synthetic / Spoof |
| Authoritative Threshold | 1.0 (Configurable) | Score < 1.0 is flagged as spoof; Score ≥ 1.0 is bonafide |
| Inference Mode | In-Process PyTorch | Preloaded once at startup; no CLI or disk overhead |
| Inference Speed | ~0.93s on CPU | Runs via worker threads to ensure WebRTC signaling never blocks |
| Privacy Policy | Zero Audio Storage | Audio is analyzed transiently in-memory and discarded immediately |
Whether you are running the project on your local machine or deploying it on another developer's system, follow these steps.
# 1. Clone the repository
git clone https://github.com/cocolikestocode/ai-voice-detector.git
cd ai-voice-detector
# 2. Download or verify the model weights
# Note: GitHub enforces a 100 MB file limit, so large model files (1.26 GB and 3.79 GB)
# are not stored directly in git. Run our setup utility to download them:
python download_models.py
The model files must be located at:
deepfense-framework/pretrained_models/WavLM-Large.pt (1.26 GB)deepfense-framework/models/ASV5_WavLM_AASIST_NoAug_Seed42/best_model.pth (3.79 GB)npm)Open Terminal 1 at the project root:
# Install backend Python dependencies
pip install -r backend/requirements.txt
# Install deepfense framework in editable mode
pip install -e deepfense-framework --no-deps
# Start FastAPI backend server with hot-reload
python -m uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reload
Startup Verification: You will see DeepFense preload the models in ~8 seconds:
[INFO] [deepfense.service] Building detector: StandardDetector... [INFO] [deepfense.service] Loading checkpoint weights from: .../best_model.pth [INFO] [deepfense.service] DeepFenseInferenceService ready in ~8s. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)Backend health can be verified at:
http://localhost:8000/api/health
Open Terminal 2 at the project root:
cd frontend
# Install frontend Node dependencies
npm install
# Start Vite dev server over HTTPS (listens on 0.0.0.0 for LAN access)
npm run dev
Vite will start and output your accessible URLs:
➜ Local: https://localhost:5173/
➜ Network: https://10.255.214.64:5173/
https://localhost:5173/ in your browser.https://<YOUR_LAN_IP>:5173/ in Android Chrome.Run the complete frontend, backend, reverse proxy, and PyTorch inference pipeline in isolated Docker containers with a single command.
deepfense-framework/ (Step 0)From the project root:
# Build and start both containers in the background
docker compose up --build
Docker Compose spins up two coordinated services:
deepfense-backend:
WavLM-Large.pt and best_model.pth via read-only volume mount.http://localhost:8000/api/health.deepfense-frontend:
3000, proxying /api REST requests and /ws WebSockets directly to the backend container.http://localhost:3000 (or http://<HOST_IP>:3000 from any device on your local network).http://localhost:8000/api/healthhttp://localhost:8000/docs# Stop and clean up containers
docker compose down
Why Host Volume Mounts?
Notice indocker-compose.ymlthat./deepfense-frameworkis mounted into/app/deepfense-framework:ro. This prevents copying ~5 GB of model weights into Docker image layers, keeping Docker builds fast (<30s) and image sizes lightweight.
Modern mobile browsers (Android Chrome, iOS Safari) strictly require HTTPS to permit microphone access (navigator.mediaDevices.getUserMedia). Accessing over plain HTTP from a LAN IP results in getUserMedia is undefined.
The Vite dev server (npm run dev) runs on HTTPS automatically with generated SSL certificates.
(Or simply start the server; @vitejs/plugin-basic-ssl will automatically provide a valid dev certificate as a fallback).
# In Terminal 2 (from project root):
cd frontend
npm run dev
Vite will start and display your secure URLs:
VITE ready in ~300 ms
➜ Local: https://localhost:5173/
➜ Network: https://10.255.214.64:5173/
https://localhost:5173/https://10.255.214.64:5173/ (replace with your machine's LAN IP)When opening https://<LAN_IP>:5173 on Android Chrome for the first time, Chrome displays a security notice because it is a local development certificate.
https://10.255.214.64:5173 in Android Chrome.To make Android trust the connection without any warnings:
frontend/certs/ca.crt to your Android device (via Google Drive, USB, or email).ca.crt.https://10.255.214.64:5173 in Chrome. The connection is fully trusted with a secure green padlock.In Android Chrome, navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure:
http://10.255.214.64:5173 (or your LAN IP) into the text box.When your Android phone loads https://10.255.214.64:5173:
wss://10.255.214.64:5173/ws/... for signaling and live audio detection./api requests $\rightarrow$ http://127.0.0.1:8000/api/ws WebSocket connections $\rightarrow$ ws://127.0.0.1:8000/wsws:// or http:// calls from an encrypted page) and avoids needing complex SSL setup on the backend.deepfense-framework/tests/dummy_audio/test.wav).1.0).1).AUTHENTIC HUMAN VOICE or SYNTHETIC VOICE / SPOOF DETECTED.https://localhost:5173.sih-demo-room).WAITING FOR PEER. The local audio visualizer will react to your voice.https://10.255.214.64:5173 in Android Chrome.sih-demo-room).wss:// detection WebSocket.#1, #2, ...)00:00 – 00:04, 00:04 – 00:08, ...)BONAFIDE or SPOOF)NORMAL: All recent chunks authentic.SYNTHETIC VOICE SUSPECTED: Isolated chunk dropped below threshold.AI VOICE CLONE DETECTED: Sustained spoof chunks detected (critical warning banner).To deploy this application on a cloud GPU instance (e.g. AWS EC2 G4/G5, GCP A100/T4, or RunPod):
DEVICE=cuda
CORS_ORIGINS=["https://your-domain.com"]
HOST=0.0.0.0
PORT=8000
backend/app/config.py under ICE_SERVERS.SIH 2026 Problem Statement SIH26104 — Voice Cloning Detection
High-performance voice authenticity evaluation engine powered byWavLM-Largefrontend andAASISTbackend, supporting both offline Audio File Analysis and Real-Time Browser-to-Browser WebRTC Voice Call Detection.
AI-Voice-Detection/
├── deepfense-framework/ # Pretrained base model and fine-tuned checkpoints
│ ├── pretrained_models/
│ │ └── WavLM-Large.pt # WavLM-Large SSL feature extractor (1.26 GB)
│ └── models/ASV5_WavLM_AASIST_NoAug_Seed42/
│ ├── best_model.pth # Fine-tuned AASIST detector checkpoint (3.79 GB)
│ └── config.yaml # Model & loss configuration
│
├── backend/
│ ├── app/
│ │ ├── main.py # FastAPI application, CORS, lifespan startup
│ │ ├── config.py # Environment & dynamic configuration
│ │ ├── api/
│ │ │ ├── file_detection.py # Mode 1: POST /api/detect/file (chunking & scoring)
│ │ │ ├── signaling.py # Mode 2: WebRTC Signaling WS (/ws/signaling/...)
│ │ │ └── live_detection.py # Mode 2: Transient Audio Detection WS (/ws/detect/...)
│ │ └── detection/
│ │ ├── deepfense_service.py# In-process singleton PyTorch inference service
│ │ ├── audio_processor.py # 16 kHz normalization, 4s repeat-pad chunking
│ │ └── risk_engine.py # Session risk policy & voice integrity tracker
│ ├── requirements.txt
│ └── Dockerfile
│
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Navbar.jsx # Mode switcher and backend status HUD
│ │ │ ├── FileAnalysis.jsx # Mode 1 UI (drag & drop, score timeline)
│ │ │ ├── LiveCall.jsx # Mode 2 UI (WebRTC call + live detection HUD)
│ │ │ └── AudioVisualizer.jsx # Real-time HTML5 audio spectrum canvas
│ │ ├── services/
│ │ │ ├── webrtc.js # Browser RTCPeerConnection & signaling client
│ │ │ └── audioCapture.js # Transient remote audio downsampling client
│ │ ├── config.js # Dynamic API / WebSocket host configuration
│ │ └── index.css # Cybersecurity dark-mode design system
│ ├── package.json
│ ├── vite.config.js
│ ├── nginx.conf
│ └── Dockerfile
│
├── docker-compose.yml
└── README.md
| Parameter | Specification | Details |
|---|---|---|
| Frontend Model | WavLM-Large | Self-supervised speech representations (pretrained_models/WavLM-Large.pt) |
| Backend Model | AASIST | Heterogeneous spectral-temporal graph attention network |
| Trained Checkpoint | best_model.pth | ASV5_WavLM_AASIST_NoAug_Seed42 fine-tuned detector |
| Audio Format | 16 kHz Mono | Evaluated in sequential 4-second (64,000 samples) windows |
| Score Semantics | Logit score of Class 1 | Higher = Authentic / Bonafide; Lower / Negative = Synthetic / Spoof |
| Authoritative Threshold | 1.0 (Configurable) | Score < 1.0 is flagged as spoof; Score ≥ 1.0 is bonafide |
| Inference Mode | In-Process PyTorch | Preloaded once at startup; no CLI or disk overhead |
| Inference Speed | ~0.93s on CPU | Runs via worker threads to ensure WebRTC signaling never blocks |
| Privacy Policy | Zero Audio Storage | Audio is analyzed transiently in-memory and discarded immediately |
Whether you are running the project on your local machine or deploying it on another developer's system, follow these steps.
# 1. Clone the repository
git clone https://github.com/cocolikestocode/ai-voice-detector.git
cd ai-voice-detector
# 2. Download or verify the model weights
# Note: GitHub enforces a 100 MB file limit, so large model files (1.26 GB and 3.79 GB)
# are not stored directly in git. Run our setup utility to download them:
python download_models.py
The model files must be located at:
deepfense-framework/pretrained_models/WavLM-Large.pt (1.26 GB)deepfense-framework/models/ASV5_WavLM_AASIST_NoAug_Seed42/best_model.pth (3.79 GB)npm)Open Terminal 1 at the project root:
# Install backend Python dependencies
pip install -r backend/requirements.txt
# Install deepfense framework in editable mode
pip install -e deepfense-framework --no-deps
# Start FastAPI backend server with hot-reload
python -m uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reload
Startup Verification: You will see DeepFense preload the models in ~8 seconds:
[INFO] [deepfense.service] Building detector: StandardDetector... [INFO] [deepfense.service] Loading checkpoint weights from: .../best_model.pth [INFO] [deepfense.service] DeepFenseInferenceService ready in ~8s. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)Backend health can be verified at:
http://localhost:8000/api/health
Open Terminal 2 at the project root:
cd frontend
# Install frontend Node dependencies
npm install
# Start Vite dev server over HTTPS (listens on 0.0.0.0 for LAN access)
npm run dev
Vite will start and output your accessible URLs:
➜ Local: https://localhost:5173/
➜ Network: https://10.255.214.64:5173/
https://localhost:5173/ in your browser.https://<YOUR_LAN_IP>:5173/ in Android Chrome.Run the complete frontend, backend, reverse proxy, and PyTorch inference pipeline in isolated Docker containers with a single command.
deepfense-framework/ (Step 0)From the project root:
# Build and start both containers in the background
docker compose up --build
Docker Compose spins up two coordinated services:
deepfense-backend:
WavLM-Large.pt and best_model.pth via read-only volume mount.http://localhost:8000/api/health.deepfense-frontend:
3000, proxying /api REST requests and /ws WebSockets directly to the backend container.http://localhost:3000 (or http://<HOST_IP>:3000 from any device on your local network).http://localhost:8000/api/healthhttp://localhost:8000/docs# Stop and clean up containers
docker compose down
Why Host Volume Mounts?
Notice indocker-compose.ymlthat./deepfense-frameworkis mounted into/app/deepfense-framework:ro. This prevents copying ~5 GB of model weights into Docker image layers, keeping Docker builds fast (<30s) and image sizes lightweight.
Modern mobile browsers (Android Chrome, iOS Safari) strictly require HTTPS to permit microphone access (navigator.mediaDevices.getUserMedia). Accessing over plain HTTP from a LAN IP results in getUserMedia is undefined.
The Vite dev server (npm run dev) runs on HTTPS automatically with generated SSL certificates.
(Or simply start the server; @vitejs/plugin-basic-ssl will automatically provide a valid dev certificate as a fallback).
# In Terminal 2 (from project root):
cd frontend
npm run dev
Vite will start and display your secure URLs:
VITE ready in ~300 ms
➜ Local: https://localhost:5173/
➜ Network: https://10.255.214.64:5173/
https://localhost:5173/https://10.255.214.64:5173/ (replace with your machine's LAN IP)When opening https://<LAN_IP>:5173 on Android Chrome for the first time, Chrome displays a security notice because it is a local development certificate.
https://10.255.214.64:5173 in Android Chrome.To make Android trust the connection without any warnings:
frontend/certs/ca.crt to your Android device (via Google Drive, USB, or email).ca.crt.https://10.255.214.64:5173 in Chrome. The connection is fully trusted with a secure green padlock.In Android Chrome, navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure:
http://10.255.214.64:5173 (or your LAN IP) into the text box.When your Android phone loads https://10.255.214.64:5173:
wss://10.255.214.64:5173/ws/... for signaling and live audio detection./api requests $\rightarrow$ http://127.0.0.1:8000/api/ws WebSocket connections $\rightarrow$ ws://127.0.0.1:8000/wsws:// or http:// calls from an encrypted page) and avoids needing complex SSL setup on the backend.deepfense-framework/tests/dummy_audio/test.wav).1.0).1).AUTHENTIC HUMAN VOICE or SYNTHETIC VOICE / SPOOF DETECTED.https://localhost:5173.sih-demo-room).WAITING FOR PEER. The local audio visualizer will react to your voice.https://10.255.214.64:5173 in Android Chrome.sih-demo-room).wss:// detection WebSocket.#1, #2, ...)00:00 – 00:04, 00:04 – 00:08, ...)BONAFIDE or SPOOF)NORMAL: All recent chunks authentic.SYNTHETIC VOICE SUSPECTED: Isolated chunk dropped below threshold.AI VOICE CLONE DETECTED: Sustained spoof chunks detected (critical warning banner).To deploy this application on a cloud GPU instance (e.g. AWS EC2 G4/G5, GCP A100/T4, or RunPod):
DEVICE=cuda
CORS_ORIGINS=["https://your-domain.com"]
HOST=0.0.0.0
PORT=8000
backend/app/config.py under ICE_SERVERS.