AI-powered voice biometric authentication and 1-to-N speaker identification platform powered by ECAPA-TDNN deep neural embeddings
Traditional authentication factors such as passwords and PINs are increasingly vulnerable to phishing, brute-force attacks, and credential theft, while physical tokens introduce user friction. This platform solves the challenge of frictionless identity verification by analyzing the unique physical geometry of human vocal tracts through deep acoustic speaker recognition models. Built with SpeechBrain's state-of-the-art ECAPA-TDNN architecture, the application extracts 192-dimensional acoustic voice embeddings from speech signals, applies spectral denoising and voice activity detection, and performs real-time 1-to-N speaker identification and zero-trust authentication through an installable Progressive Web App.
- ECAPA-TDNN Neural Embeddings: Computes 192-dimensional acoustic speaker embeddings via SpeechBrain's VoxCeleb-pretrained deep neural network.
- Real-Time 1-to-N Identification: Evaluates speech against all registered voiceprints using cosine similarity comparison and calibrated confidence thresholds.
- Signal Denoising & Voice Activity Detection: Preprocessing pipeline integrating Voice Activity Detection (
vad.py) and spectral noise reduction (denoise.pyvianoisereduce) to strip silence and ambient room noise. - Multi-Tenant User Isolation: Strict per-account data segregation ensuring registered voice profiles, audio samples, and verification logs remain fully isolated.
- Installable Progressive Web App (PWA): Modern glassmorphic interface with Service Worker caching, audio visualizer waveform canvas, and mobile-friendly
MediaRecordersupport. - Biometric Analytics Dashboard: Dedicated statistics console (
/stats) tracking total enrolled speakers, verification attempts, daily accuracy curves, and confusion metrics powered by Chart.js.
| Layer | Technology |
|---|---|
| Deep Learning & Acoustic Modeling | PyTorch, SpeechBrain (spkrec-ecapa-voxceleb ECAPA-TDNN) |
| Audio Signal Processing | SciPy, NumPy, SoundFile, PyAV, NoiseReduce |
| Web Backend Framework | Python 3.10+, Flask, Gunicorn |
| Speech Synthesis & VAD | PyTTSx3 (Offline Text-to-Speech), Web Audio VAD |
| Frontend Client & PWA | HTML5, CSS3 (Glassmorphism, Neon Pulse Visualizers), JavaScript (ES6+), Chart.js 4.4, Service Workers |
| Data Persistence & Security | Werkzeug Security (Password Hashing), SQLite / Isolated Embedding Stores |
flowchart TD
subgraph Ingestion ["Audio Input Channels"]
A1["Browser Microphone (MediaRecorder)"] --> B["app.py (Upload / Buffer)"]
A2["Hardware Microphone (PyAudio)"] --> B
A3["Audio File Upload (.wav, .mp3, .m4a)"] --> B
end
subgraph Preprocessing ["Signal Conditioning"]
B --> C1["denoise.py (Spectral Noise Reduction)"]
C1 --> C2["vad.py (Voice Activity Detection & Silence Trim)"]
end
subgraph DeepLearning ["ECAPA-TDNN Neural Network"]
C2 --> D["model.py (SpeechBrain Pretrained Network)"]
D --> E["Extract 192-D L2-Normalized Embedding"]
end
subgraph Matching ["Verification & Authentication"]
E --> F["verify.py (Cosine Similarity vs. Stored Voiceprints)"]
F --> G{"Similarity >= Threshold?"}
G -- Match --> H1["Authenticated Identity (Speaker Name & Confidence Score)"]
G -- No Match --> H2["Unknown / Impostor Rejected"]
end
subgraph Presentation ["Dashboard & Reporting"]
H1 --> I["Interactive Flask PWA Client"]
H2 --> I
I --> J["/stats (Chart.js Accuracy Curves & Audit Logs)"]
end
- Python 3.10 or higher
- Git
- Microphone access (for live recording)
- FFmpeg installed on system path (recommended for multi-format audio decoding)
git clone https://github.com/tejas-coder28/Speech-Detection.git
cd Speech-Detection# Create and activate virtual environment
python -m venv venv
# Windows (Command Prompt / PowerShell)
.\venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
# Install required packages
pip install -r requirements.txtCopy the template configuration file:
cp .env.example .envDefault parameters in .env:
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your_secret_key_here
PORT=5000
REMOTE_DEPLOYMENT=0
TORCH_HOME=./pretrained_models# Direct development execution
python app.py
# Or via Gunicorn (WSGI)
gunicorn app:app -b 127.0.0.1:5000Open http://127.0.0.1:5000 in your web browser to launch the voiceprint identity console.
Speech-Detection/
โโโ docs/
โ โโโ assets/ # Architecture charts & UI screenshots
โโโ static/
โ โโโ css/style.css # Glassmorphism styling & visualizer themes
โ โโโ icon-192.png # PWA mobile app icon
โ โโโ icon-512.png # PWA high-res app icon
โ โโโ manifest.json # Web App Manifest for mobile installation
โ โโโ sw.js # Service Worker for offline PWA caching
โโโ templates/
โ โโโ index.html # Main voice biometric dashboard UI
โ โโโ login.html # Multi-tenant account authentication
โ โโโ register.html # User registration interface
โ โโโ stats.html # Accuracy metrics & historical verification graphs
โโโ tests/
โ โโโ test_deletion.py # Profile lifecycle tests
โ โโโ test_model.py # Model inference & embedding tests
โโโ app.py # Flask server, route controllers & API endpoints
โโโ audio.py # Hardware microphone capture & audio verification
โโโ database.py # Multi-tenant user data store & embedding persistence
โโโ denoise.py # Spectral gating & noise reduction utilities
โโโ model.py # SpeechBrain ECAPA-TDNN model loader
โโโ register.py # Multi-segment enrollment pipeline
โโโ verify.py # Cosine similarity identification & thresholding
โโโ vad.py # Voice Activity Detection module
โโโ tts.py # Text-to-speech audio feedback generator
โโโ requirements.txt # Python runtime dependencies
โโโ .env.example # Environment configuration template
โโโ LICENSE # MIT License
โโโ README.md # Project documentation
Real-time speaker identification console featuring live waveform visualizer and confidence gauge.
TODO: Capture screenshot of the main verification console at
http://127.0.0.1:5000and save to/docs/assets/01_voiceprint_verification_ui.png.
Speaker enrollment workflow capturing three high-fidelity audio samples to synthesize the 192-D voiceprint.
TODO: Capture screenshot of the enrollment modal and save to
/docs/assets/02_voice_enrollment_screen.png.
Interactive analytics dashboard tracking identification accuracy curves and per-speaker test attempts.
TODO: Capture screenshot of
http://127.0.0.1:5000/statsand save to/docs/assets/03_biometric_analytics_stats.png.
- Liveness & Anti-Spoofing Detection: Integrate a deepfake acoustic classifier to block synthetic voice spoofing and replay attacks.
- HNSW Vector Indexing (Qdrant / Milvus): Migrate from in-memory cosine matching to approximate nearest-neighbor vector search for scaling to 100,000+ enrolled identities.
- WebAssembly (WASM) Edge Preprocessing: Compile VAD and feature extraction routines to WebAssembly for edge filtering directly in client browsers.
Tejas Muralidhar
- GitHub: @tejas-coder28
- LinkedIn: Tejas Muralidhar


