TrustCall is an open-source AI system designed to detect synthetic and deepfake audio. As generative voice models (like WaveNet, ElevenLabs clones, etc.) become more advanced and easily accessible, the risk of voice-based impersonation and fraud increases. TrustCall addresses this by providing a reproducible and explainable pipeline for verifying the authenticity of audio recordings.
It is a binary classification tool at its core—determining whether a given audio clip is human (bonafide) or AI-generated (spoofed)—but goes a step further to identify the specific neural vocoder used to generate the spoofed speech (via a 7-class multi-label model).
- Raw Waveform Analysis: Analyzes the raw audio waveforms directly, bypassing traditional Mel Spectrogram constraints that lose high-frequency deepfake artifacts.
- Explainable AI (XAI): Provides full transparency using SincConv bandpass filters and saliency maps, showing exactly which parts and frequencies of the audio the model found suspicious.
- Live Detection & UI: Features an intuitive Streamlit dashboard for real-time live microphone recordings or file uploads.
- Audio Augmentation for Robustness: Supports interactive testing against background noise, room reverb, codec compression (MP3/Opus), and pitch shifts.
- Contextual Transcriptions: Uses OpenAI Whisper to provide automated dictation context alongside its deepfake probability metric.
- Ensemble mode: Employs an LFCC-LCNN complementary secondary model to vote alongside the primary RawNet model.
TrustCall avoids traditional models that rely on compressed feature inputs. Instead, it utilizes a custom variation of RawNet2, trained natively on the ASVspoof 2019 LA dataset via Multi-Loss (Binary & Vocoder Types).
The Pipeline:
- Input: The raw audio waveform series
[1 x 64000 samples]accurately representing 4 seconds of audio at a sample rate of 16,000 Hz. - SincConv Layer: Acts as learnable bandpass filters that cut the audio into frequency bands. Unlike standard CNNs, these filters explicitly learn which frequency ranges are suspicious in deepfakes (often bridging the 3-8kHz spectrum).
- ResBlocks: A progressive sequence of residual blocks with batch normalization, LeakyReLU, and Convolutions to learn abstract high-level patterns.
- GRU Layer: A 3-layer Gated Recurrent Unit (GRU) models the temporal sequence dependencies across the 4-second audio window.
- Output Heads:
- Binary Head: Resolves the basic overarching inquiry to evaluate Real vs. Fake probabilities (controls the official system verdict).
- Multi-Label Head: Qualitatively infers the type of neural synthesizer architecture used (e.g. WaveNet, MelGAN, DiffWave).
When a user interacts with the TrustCall system via the visual dashboard, the following chronological end-to-end flow executes:
- Submission: User uploads an audio file (
.wavor.flac) or records live directly from the browser microphone. - Preprocessing: Audio is decoded into a fast
numpyarray, resampled strictly to 16,000 Hz if necessary, and precisely padded/trimmed to a uniform length of 64,000 samples. - Augmentations (Optional): Custom corruptions (i.e. noise overlay or room reverb) are dynamically applied based on user sidebar settings to test operational robustness.
- Transcription: The OpenAI Whisper model dictates the holistic context and speech-to-text semantic transcription.
- Inference: The finalized model independently evaluates the raw timeline sequence extracting probabilities directly linked to deepfake traits.
- Visualization Generation: The Streamlit dashboard natively renders the final analytical assessment matrix including:
- Dark Blue Waveform: Highlighting generalized raw amplitude variance sequences.
- Magma Mel Spectrogram Heatmap: Structurally visualizing voice harmonic integrity and disclosing high-frequency compression artifacts.
- Probability Scores Matrix: Presenting the exponential conversion log-softmax outputs explicitly as numerical
prob_realvsprob_fakeproportions. - Vocoder Signature Chart: Mapping out the probabilistic multi-class forensic fingerprint mapping the likely vocal clone software configuration utilized.
A standardized detection threshold (baseline defaults at: 0.50) safely maps the continuous probability output into categorical outcomes immediately relayed to the final user:
- If [prob_fake > threshold] -> 🚨 DEEPFAKE DETECTED
- If [prob_fake <= threshold] -> ✅ LIKELY GENUINE
Note: While the multi-label head provides valuable forensic inferences exploring the likely synthetic origin mechanics, the Binary Head's assessment logic guarantees the singular, authoritative determination for TrustCall's final fraud verdict.