๐ก๏ธ VoiceGuard
Real-Time AI Detection & Prevention of Voice Cloning Impersonation Attacks
SIH 2026 ยท Problem Statement SIH26104
A sub-200ms edge detection engine that analyzes raw audio waveforms to detect and terminate synthesized deepfake calls โ purpose-built for India's multilingual telecom ecosystem.
๐ Table of Contents
- ๐จ The Problem
- ๐ก Our Solution
- ๐ง Model Architecture
- โก Performance Benchmarks
- ๐ Quick Start
- ๐ API Reference
- ๐ฅ๏ธ Live Demo
- ๐๏ธ System Design
- ๐ก๏ธ Mitigation Workflow
- ๐ ๏ธ Tech Stack
- ๐จโ๐ฉโ๐งโ๐ฆ Team
- ๐ Disclaimer
๐จ The Problem
Voice cloning technology has made it trivial to impersonate anyone. A 10-second sample of a person's voice is enough to train a model that can speak anything in their voice.
In India, this has fueled a rising wave of financial fraud, misinformation, and identity theft carried out over ordinary phone calls:
- ๐ "Mom, I've been kidnapped" scams using a cloned child's voice
- ๐ฆ OTP / bank executive frauds with cloned official voices
- ๐ณ๏ธ Political misinformation spread via fabricated audio of public figures
- ๐ฎ๐ณ Multilingual attacks exploiting gaps in accent- and language-agnostic detection
Existing defenses are slow, GPU-hungry, and fail on Indian languages and accents.
๐ก Our Solution
VoiceGuard is a real-time, streaming deepfake detection system that:
| Capability | Detail |
|---|---|
| โก Real-time | Sliding 250ms windows, verdicts in <185ms |
| ๐ฃ๏ธ Raw waveform analysis | 1D Sinc-Conv learns acoustic features directly โ no mel-spectrogram bottleneck |
| ๐ง Edge-optimized | INT8 dynamic quantization + Conv-BN fusion = runs on 2 vCPU cores, 2.2MB effective footprint |
| ๐ฎ๐ณ India-first | Trained on samples across 12 Indic languages, zero accent bias |
| ๐จ Autonomous kill-switch | Auto-terminates calls at 75% synthetic confidence over 2 consecutive windows |
| ๐ Privacy-preserving | No raw audio stored; SHA-256 chunk hashing; on-premise inference |
Detection Classes
| Class | Meaning |
|---|---|
gt |
Ground truth โ bona-fide human speech โ |
synthetic_indic |
TTS-synthesized Indian-language speech ๐จ |
diffwave |
DiffWave neural vocoder ๐จ |
melgan |
MelGAN neural vocoder ๐จ |
wavenet |
WaveNet neural vocoder ๐จ |
๐ง Model Architecture
VoiceGuardRawNet โ a compact quantized 1D RawNet designed for CPU-only, low-latency edge deployment:
Input: Raw 16 kHz waveform (1.5s window = 24,000 samples)
โ
โโโ SincConv (64 learnable sinc band-pass filters, k=129)
โโโ ResidualBlock (64 โ 64)
โโโ ResidualBlock (64 โ 128, stride 2)
โโโ ResidualBlock (128 โ 128)
โโโ MaxPool1d (k=10, stride 10)
โโโ BiGRU (2 layers, hidden 256) โโโบ INT8 quantized
โโโ Linear (512 โ 5 classes)
Key optimizations applied:
- ๐น Learnable sinc band-pass filters replace hand-crafted features
- ๐น Conv-BN fusion for reduced inference latency
- ๐น INT8 dynamic quantization on GRU + Linear layers
- ๐น Sinc kernel pre-caching eliminates runtime
torch.sinc()calls - ๐น ~206K parameters โ extremely lightweight
โก Performance Benchmarks
Model footprint and latency measured on 2 vCPU threads (no GPU):
| Metric | Baseline | Fused | Fused + INT8 | Budget |
|---|---|---|---|---|
| P95 Latency | 126 ms | 160 ms | 138 ms | โ <185 ms |
| Model Size | 1.0 MB | โ | 1.02 MB | โ <2.2 MB |
| Mean Latency | ~104 ms | ~128 ms | ~110 ms | โ |
๐ Both latency and footprint stay comfortably within SIH deployment budgets โ no GPU required.
๐ Quick Start
1. Clone the repository
git clone https://huggingface.co/indrajit4533/voiceguard
cd voiceguard
2. Install dependencies
pip install -r requirements.txt
3. Run the server
python app.py
4. Open the dashboard
http://localhost:8000
๐ฏ The live dashboard includes an audio-upload interface where you can test real files and see class probabilities, threat scores, and inference latency instantly.
๐ API Reference
GET / โ Landing dashboard
Serves the interactive VoiceGuard web UI โ upload audio, see live detection results.
GET /api/health
{
"status": "healthy",
"model_loaded": true,
"model_type": "VoiceGuardRawNet INT8",
"classes": ["synthetic_indic", "diffwave", "melgan", "gt", "wavenet"]
}
POST /api/analyze
Upload audio (multipart/form-data, field: file):
curl -X POST http://localhost:8000/api/analyze \
-F "file=@sample.wav"
Response:
{
"threat_score": 96.4,
"authenticity_score": 3.6,
"top_class": "melgan",
"action": "TERMINATE CALL",
"is_synthetic": true,
"probabilities": {
"synthetic_indic": 1.2,
"diffwave": 0.8,
"melgan": 96.4,
"gt": 3.6,
"wavenet": 0.0
},
"inference_ms": 132.5
}
๐ฅ๏ธ Live Demo
Try it with:
- ๐๏ธ Your own voice recording โ expect ALLOW CALL
- ๐ Any TTS / AI voice clip โ expect TERMINATE CALL
- ๐ Real-world deepfake audio datasets (ASVspoof, MLAAD, etc.)
๐๏ธ System Design
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ Inbound โ โโโบ โ Streaming โ โโโบ โ VoiceGuard RawNet โ โโโบ โ Verdict โ
โ VoIP Call โ โ Ring Buffer โ โ INT8 Inference โ โ Pass/Drop โ
โ โ โ (250ms win) โ โ 2 vCPU, <185ms โ โ โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ
โ โ โ โ
โ โ โ โผ
โ โ โ โโโโโโโโโโโโโโโโ
โ โ โ โ Kill-Switch โ
โ โ โ โ โฅ75% ร 2w โ
โ โโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ SHA-256 โ โ Threat โ โ Audit Log โ โ Call โ
โ Chunk Hash โ โ Scorer โ โ (Forensic) โ โ Termination โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Streaming pipeline
- Ingest โ raw VoIP stream partitioned into 250ms chunks (~4,000 samples @16kHz)
- Buffer โ sliding window accumulates 1.5s (24,000 samples) for context
- Detect โ INT8 model scores each window; threat =
1 โ P(bona_fide) - Mitigate โ sustained โฅ75% confidence across 2 consecutive windows triggers automatic call termination
๐ก๏ธ Mitigation Workflow
High Threat Detected (โฅ75%)
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Kill-Switch Arm โ โโ 1st consecutive window above threshold
โโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Second Window? โ
โโโโโโโโโโโโโโโโโโโโ
โ No โ Yes
โผ โผ
Re-analyze โโโโโโโโโโโโโโโโโโโโ
โ TERMINATE CALL โ
โ + Forensic Audit โ
โ + Alert Dispatch โ
โโโโโโโโโโโโโโโโโโโโ
๐ ๏ธ Tech Stack
| Layer | Technology |
|---|---|
| Backend | FastAPI + Uvicorn |
| Model | PyTorch (1D RawNet, INT8 dynamic quantization) |
| Audio | TorchAudio |
| Web UI | HTML / Tailwind CSS / vanilla JS |
| Serialization | Safetensors (pickle-free, secure) |
| Deployment | Hugging Face / Docker / local edge servers |
๐จโ๐ฉโ๐งโ๐ฆ Team
VoiceGuard is built by Team's for Smart India Hackathon 2026 (SIH26104):
| ๐ฉโ๐ป Member | Role |
|---|---|
| Indrajit Yadav | Founder & Lead Developer ยท Model Design, Backend, Quantization & Deployment |
| Swetha S | Team Member ยท Model support & Evaluation |
| Harinandan P S | Team Member ยท Pipeline & Integration Support |
| Dharshini M | Team Member ยท UI/UX & Design |
| Sudarsan | Team Member ยท Testing & Deployment Support |
| Divya | Team Member ยท Research & Documentation |
๐ Disclaimer
This project is provided for research and ethical security applications under Smart India Hackathon 2026. VoiceGuard is designed to detect and protect against voice-cloning fraud โ it does not generate synthetic speech. Use responsibly.
Built with โค๏ธ for India's telecom ecosystem
Smart India Hackathon 2026 ยท Problem Statement SIH26104