Built to order

Voice Biometric Authentication using Machine Learning

A speaker-verification system that authenticates users from short voice samples. Users enroll a voiceprint by speaking for about ten seconds; login attempts are then matched against it using MFCC features with a GMM or a CNN voiceprint embedding. The VoiceKey app shows a similarity score, a configurable accept/reject threshold and basic replay-spoofing checks. Built with librosa, scikit-learn, TensorFlow and Streamlit. Suitable for B.E./B.Tech final-year projects in Computer Science, Artificial Intelligence and Electronics.

Voice Biometric Authentication using Machine Learning
More project photos (2)

The problem

Passwords are the weakest link in everyday security: people reuse them, write them down and share them, while OTPs add friction and SIM-swap fraud keeps defeating SMS codes. Fingerprint and face biometrics work well, but they need dedicated sensors or a camera with good lighting, and they cannot authenticate someone over a plain voice call. The human voice carries a distinctive acoustic signature from the shape of each speaker's vocal tract That leaves a gap between the classroom and real biometric pipelines: enrollment, feature extraction, model scoring, threshold setting and the false-accept versus false-reject trade-off. This project closes that gap with a working voiceprint system, so those security concepts are demonstrated on real audio instead of defined on slides.

How it works

  1. During enrollment, the user speaks for ~10 seconds into a microphone; the audio is captured at 16 kHz.
  2. Pre-processing applies a noise gate, voice-activity detection (VAD) to drop silence, and amplitude normalization.
  3. MFCC features (40 coefficients plus delta and delta-delta) are extracted in 25 ms frames with a 10 ms hop using librosa.
  4. A GMM (16–64 mixtures) is trained per speaker on the enrollment features; alternatively, the CNN maps each utterance to a fixed-length 128-dim voiceprint embedding.
  5. At login, the spoken sample is converted to the same features and scored against the claimed user's model — log-likelihood ratio for GMM, cosine similarity for the CNN embedding.
  6. The score is compared with the threshold (set at the equal-error-rate point): above it the login is accepted, below it rejected. All attempts are logged with scores in the VoiceKey app.

Project features

  • Voiceprint enrollment from ~10 seconds of spoken audio per user
  • MFCC feature extraction with librosa (40 coefficients + delta/delta-delta, 25 ms frames)
  • GMM-based speaker matching — one Gaussian Mixture Model trained per enrolled user
  • CNN voiceprint classifier option (TensorFlow/Keras embedding + cosine similarity scoring)
  • Text-independent verification — no fixed passphrase required
  • Similarity score with configurable accept/reject threshold set at the EER point
  • Anti-spoofing checks: replay-attack heuristics from spectral and energy cues
  • VoiceKey Streamlit app: enroll, verify, and view the score gauge live
  • Multi-user enrollment database with per-user models and attempt history
  • Full metrics suite: FAR/FRR tables, DET curve and score histograms for the report

What is included

  • Complete, commented Python source code (feature extraction, GMM + CNN training, Streamlit app)
  • Trained speaker models and voiceprint database schema
  • VoiceKey Streamlit web application with live demo mode
  • Sample voice dataset for training and testing
  • Project report PDF (literature survey, methodology, FAR/FRR results, conclusion)
  • PPT presentation for final review
  • Viva Q&A preparation document (MFCC theory, GMM scoring, biometric metrics)
  • Installation and run guide

FAQs

  1. How is this different from speech recognition? Speech recognition asks what was said; speaker verification asks who said it. This project models the speaker's voice characteristics — vocal-tract resonances captured in MFCCs — so the same phrase spoken by two people produces different scores.
  2. Which model is better — GMM or CNN? GMMs are the classic, explainable baseline and train in seconds on CPU; the CNN embedding approach generalizes better across sessions and channels but needs more enrollment data. The report includes the procedure for comparing both on the same trial set.
  3. What are FAR, FRR and EER? False Accept Rate (impostor accepted), False Reject Rate (genuine user rejected), and the Equal Error Rate point where the two balance — the standard biometric metrics. The app plots the DET curve and sets the default threshold at EER.
  4. Can someone fool it by playing a recording? Casual replay is partially caught by the anti-spoofing heuristics (spectral flatness and energy-variation anomalies typical of loudspeaker playback). Full protection against voice cloning is listed as future work in the report.
  5. Can I demo it live in my review? Yes — the VoiceKey app enrolls a voice in ~10 seconds and verifies attempts instantly with a visible score gauge. Enroll yourself and a friend, then show an impostor attempt being rejected.
  6. How can I extend this project? Common extensions include: text-dependent passphrase mode, channel-robustness with data augmentation, on-device inference with TensorFlow Lite, multi-factor login (voice + OTP), and liveness detection.

Limitations & prerequisites

  • Background noise degrades accuracy — quiet-room enrollment and verification is recommended for the demo.
  • Very short enrollment samples (<5 seconds) weaken the speaker model; ~10 seconds is the recommended minimum.
  • Microphone quality matters — the same headset for enrollment and login gives the most consistent scores.
  • Anti-spoofing uses statistical replay heuristics, not full liveness detection against advanced voice-cloning attacks.
  • Voice characteristics shift with illness, fatigue or age — the model reflects the voice as enrolled.
Components & software requirements
  • Python 3.9+ (NumPy, SciPy, pandas)
  • librosa (MFCC extraction, VAD, audio preprocessing)
  • scikit-learn (GMM speaker models, metrics)
  • TensorFlow/Keras (CNN voiceprint classifier, embeddings)
  • Streamlit (VoiceKey web app)
  • SoundDevice (microphone capture)
  • Matplotlib/Seaborn (DET curves, score distributions)

Specifications

Parameter Value
Audio format 16 kHz mono WAV, microphone or file input
Enrollment speech ~10 seconds per user
Verification sample 2–3 seconds per attempt
Features 40 MFCC + delta + delta-delta (120 dims), 25 ms frame / 10 ms hop
Speaker models GMM, 16–64 mixtures per speaker (configurable)
CNN embedding 128-dim voiceprint vector, cosine-similarity scoring
Decision threshold Set at equal-error-rate (EER) point, adjustable
Verification accuracy Target ~90%+; typical EER 4–8% reported for this approach on clean speech — actual results depend on the microphone and environment
Anti-spoofing Replay heuristics (spectral flatness, energy-variation checks)
Users supported Multi-user enrollment database (SQLite)
App Streamlit; enroll, verify, logs, metrics views

Download abstract (PDF)

Related guides

All guides
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Illustration of Whisper speech-to-text showing sound waves flowing into a neural network and emerging as transcribed text with timestamps and speaker labels.B.E./B.Tech Computer Science and AI/ML students adding speech-to-text to projects — voice assistants, meeting transcription, accessibility tools

Whisper for Speech-to-Text in Student Projects

Whisper transcribes speech in dozens of languages with no training required. This guide covers how it works, choosing among model sizes, running it locally with faster-whisper, handling hour-long audio, timestamps and speaker diarization, multilingual quirks, and honest evaluation with word error rate.

Read guide
Get a quotation