How shlok1286/audiodeepfake works
VerifyVoice is a web application for detecting synthetic speech and explaining predictions. A user uploads a recording in the Next.js interface; the client submits it to FastAPI, which decodes and chunks the audio, prepares Mel-spectrogram features, runs the classifier, and generates a Grad-CAM explanation. The interface presents the verdict and playback/visualization, and can save analyses in browser history. The README documents the main backend stages and capabilities; some frontend component links are supported by the SOURCE INDEX rather than complete call-site excerpts.
Main entry points: page.tsx Upload interface · analyzeAudio.ts API client · ResultCard.tsx Verdict card · AudioPlayer.tsx Audio player
Components 17
Web experience
- Upload interface
app/page.tsx - API client
lib/analyzeAudio.ts - Analysis history
lib/historyDb.ts - Navigation
components/ui/navbar.tsx - Analysis loader
components/ui/ai-loader.tsx
Analysis presentation
- Verdict card
components/ResultCard.tsx - Audio player
components/AudioPlayer.tsx - Audio visualizer
components/AudioVisualizer.tsx - Suspicious regions
components/SuspiciousRegionsPanel.tsx - Grad-CAM explanation
components/PredictionExplanation.tsx - History browser
components/HistoryView.tsx
Inference service
- Prediction API
backend/main.py
Audio intelligence
- Audio preparation
backend/pipeline.py - CNN classifier
backend/model.py - Grad-CAM generator
backend/gradcam.py - Model weights
Model/CNN_4Layer_64_128_256_512_BN_Dropout_best.pth
Other components
- Audio user
Connections 19
- Audio user → Upload interface: uploads audio
README.md - Upload interface → API client: requests analysis
app/page.tsx - API client → Prediction API: posts multipart
lib/analyzeAudio.ts - Prediction API → Audio preparation: runs pipeline
README.md - Audio preparation → CNN classifier: provides features
README.md - CNN classifier → Grad-CAM generator: supplies activations
README.md - Model weights → CNN classifier: provides weights
- Prediction API → API client: returns prediction
README.md - API client → Verdict card: normalizes result
components/ResultCard.tsx - Verdict card → Audio player: renders playback
components/ResultCard.tsx - Audio player → Audio visualizer: renders waveform
components/AudioPlayer.tsx - Audio player → Suspicious regions: renders regions
components/AudioPlayer.tsx - Verdict card → Grad-CAM explanation: renders explanation
components/ResultCard.tsx - Upload interface → Analysis history: saves analyses
app/page.tsx - Upload interface → Analysis history: loads history
app/page.tsx - History browser → Analysis history: reads history
components/HistoryView.tsx - Upload interface → History browser: shows history
app/page.tsx - Upload interface → Navigation: renders navigation
app/page.tsx - Upload interface → Analysis loader: shows progress
app/page.tsx