How whatdadogdoing/voiceproject works
VoiceProject is a voice-based authentication product with enrollment, challenge-based voice verification, anti-spoofing and email OTP, plus a companion Fake Voice Lab for testing defenses. The main path is password login, consent and voiceprint enrollment, then a fresh phrase (and optionally a code), server-side audio checks, risk evaluation, and OTP. The graph preserves recovery, fraud lockout, and re-enrollment capabilities documented in the README. Some links are documented at the product-flow level because the corresponding source was not excerpted.
Main entry points: voice_auth.py Voice verification · main.py FastAPI app · db.py PostgreSQL data · enroll.py Voice enrollment
Components 21
Client and testing
- Web client
frontend/app.js - Voice recorder
frontend/voice-recorder.js - Fake Voice Lab
fake-voice-lab/main.py
API workflows
- FastAPI app
backend/main.py - Login and logout
backend/routers/auth.py - Voice enrollment
backend/routers/enroll.py - Voice verification
backend/routers/voice_auth.py - Risk and fraud lockout
backend/services/risk_engine.py - Voice consent
backend/services/consent.py - Email OTP
backend/services/otp.py - Session and token auth
backend/services/auth.py - Token handling
backend/services/token.py
Voice analysis
- Challenge phrases
backend/services/phrases.py - Phrase and code check
backend/services/phrase_check.py - Audio processing
backend/services/audio.py - Speaker matching
backend/services/speaker_verification.py - Anti-spoof detection
backend/services/anti_spoofing.py - AASIST-L model
backend/services/aasist_model.py
Identity and state
- PostgreSQL data
backend/models/db.py - Redis state
backend/services/redis_client.py
Other components
- User
Connections 37
- User → Web client: uses
README.md - Web client → FastAPI app: calls API
README.md - Web client → Voice recorder: records audio
README.md - FastAPI app → Login and logout: registers
backend/main.py - FastAPI app → Voice verification: registers
backend/main.py - FastAPI app → Voice enrollment: registers
backend/main.py - FastAPI app → Anti-spoof detection: loads model
backend/main.py - FastAPI app → Speaker matching: loads encoder
backend/main.py - FastAPI app → PostgreSQL data: opens pool
backend/main.py - Login and logout → Session and token auth: delegates
backend/routers/auth.py - Session and token auth → Redis state: stores sessions
backend/services/auth.py - Session and token auth → Token handling: decodes tokens
backend/services/auth.py - Session and token auth → PostgreSQL data: checks voiceprint
backend/services/auth.py - Voice enrollment → Challenge phrases: gets phrases
backend/routers/enroll.py - Voice enrollment → Phrase and code check: checks speech
backend/routers/enroll.py - Voice enrollment → Speaker matching: embeds samples
backend/routers/enroll.py - Voice enrollment → PostgreSQL data: saves voiceprint
backend/routers/enroll.py - Voice verification → Voice consent: checks consent
backend/routers/voice_auth.py - Voice verification → Challenge phrases: issues challenge
backend/routers/voice_auth.py - Voice verification → Phrase and code check: checks challenge
backend/routers/voice_auth.py - Voice verification → Audio processing: converts audio
backend/routers/voice_auth.py - Voice verification → Speaker matching: scores speaker
backend/routers/voice_auth.py - Voice verification → Anti-spoof detection: scores spoofing
backend/routers/voice_auth.py - Voice verification → Risk and fraud lockout: evaluates scores
backend/routers/voice_auth.py - Voice verification → Email OTP: sends and verifies
backend/routers/voice_auth.py - Voice verification → PostgreSQL data: reads and logs
backend/routers/voice_auth.py - Voice verification → Redis state: uses challenge state
backend/routers/voice_auth.py - Phrase and code check → Challenge phrases: uses phrase rules
backend/services/phrase_check.py - Phrase and code check → Audio processing: transcribes audio
- Speaker matching → Audio processing: reads waveform
backend/services/speaker_verification.py - Anti-spoof detection → Audio processing: reads waveform
backend/services/anti_spoofing.py - Anti-spoof detection → AASIST-L model: uses model
- Risk and fraud lockout → PostgreSQL data: counts failures
backend/services/risk_engine.py - Risk and fraud lockout → Redis state: checks lockout
backend/services/risk_engine.py - Voice consent → PostgreSQL data: records consent
backend/services/consent.py - Email OTP → Redis state: stores OTP state
backend/services/otp.py - Fake Voice Lab → FastAPI app: attacks verify
README.md