Tamarillo/voice-deepfake-guard-base

Family Tiers: voice-deepfake-guard-tiny-en · voice-deepfake-guard-small-en · voice-deepfake-guard-base (this model)
Interactive Browser Demo (100% Client-Side WASM): Tamarillo/voice-deepfake-guard-demo

Flagship Server & SOC Voice Deepfake Forensics Tier (315.7M, XLS-R) — an Apache-2.0, real-codec-hardened, multi-layer acoustic forensics audio deepfake detector (25 fused states (CNN + 24 transformer layers), native use_weighted_layer_sum=True, zero trust_remote_code) designed as a 1-line drop-in replacement (id2label = {0: "fake", 1: "real"}) for mo-thecreator/Deepfake-audio-detection and MelodyMachine/Deepfake-audio-detection-V2 in Hugging Face audio-classification pipelines, SOC forensic review pipelines, and GPU / quantized CPU voice-security gateways.

Key Highlights

  • #1 across all 7 evaluated models on BOTH 5-Suite Public Mean (9.43% EER / 0.9503 AUC) and 4-Suite Strict Zero-Touch OOD Mean (8.85% EER / 0.9530 AUC) — 1:1 parameter match to Gustking (315.7M) trained from clean canonical facebook/wav2vec2-xls-r-300m.
  • #1 on DFADD 2024 Diffusion TTS (0.96% EER / 0.9996 AUC; at τ=0.50: 91.8% fake recall, 0.0% real FPR), #1 on In-The-Wild (4.30% EER / 0.987 AUC; at τ=0.50: 78.0% fake recall, 0.0% real FPR), and #1 on Commercial TTS (12.43% EER / 0.943 AUC; 14.79% even on 1.0s clips).
  • Quantized CPU Efficiency: Ships a 355.4 MB INT8 ONNX (0.00092 max diff, 100% argmax parity across n=16 clips) running in 74.6 ms per 1.0s audio — 1.88× faster and 3.55× smaller than Gustking FP32 (1.26 GB).

5-Suite Public Benchmark Pareto Frontier


Model Family & Recommended Tier

Interactive 100% client-side in-browser microphone & audio-drop WASM demo (running tiny-en 50.6 MB INT8 ONNX locally): Hugging Face Space Tamarillo/voice-deepfake-guard-demo (published alongside this model family).

Model Backbone Params Training Langs 4-Suite Zero-Touch OOD (EER ↓ / AUC ↑) 5-Suite Public Mean (EER ↓ / AUC ↑) CPU ONNX @ 1.0s Best ONNX Size
Tamarillo/voice-deepfake-guard-tiny-en ntu-spml/distilhubert 23.7M English 16.80% / 0.8996 16.70% / 0.9033 22.9 ms (INT8) 50.6 MB
Tamarillo/voice-deepfake-guard-small-en facebook/wav2vec2-base 94.6M English 12.40% / 0.9386 12.05% / 0.9407 50.9 ms (FP32) 378.5 MB
Tamarillo/voice-deepfake-guard-base (this repo) facebook/wav2vec2-xls-r-300m 315.7M 5 Fine-Tuned Langs (en/de/fr/it/zh; XLS-R) 8.85% / 0.9530 9.43% / 0.9503 74.6 ms (INT8) 355.4 MB

30-Second Quickstart (Exact 1-Line transformers Drop-In)

Works across standard transformers>=4.30 (zero breaking version constraints and zero trust_remote_code).

Important Threshold Note: Default 0.50 argmax favors ultra-low false alarms on authentic human voices (0.3% real-speaker FPR on Commercial TTS), but yields conservative 15.4% fake recall on clean studio commercial TTS (ElevenLabs/Kokoro/Hume). For high-recall commercial TTS screening, threshold P(fake) >= 0.20 as shown below; keep 0.50 for ultra-low false-alarm call verification.

pip install transformers torch numpy librosa soundfile
import numpy as np
from transformers import pipeline

# Exact 1-line drop-in replacement for mo-thecreator/Deepfake-audio-detection
# and MelodyMachine/Deepfake-audio-detection-V2 (id2label = {0: "fake", 1: "real"})
detector = pipeline("audio-classification", model="Tamarillo/voice-deepfake-guard-base")

# Self-contained 2.0s 16 kHz test buffer (replace with: wav, _ = librosa.load("call.wav", sr=16000, mono=True))
wav = np.zeros(2 * 16000, dtype=np.float32)

# Pass raw 16 kHz mono audio up to 4.0s (matches benchmark evaluation; no silence trimming required)
scores = detector({"array": wav[: 4 * 16000], "sampling_rate": 16000})
p_fake = next(s["score"] for s in scores if s["label"] == "fake")
verdict = "FAKE" if p_fake >= 0.20 else "REAL"  # tau=0.20 for high-recall screening; 0.50 for <1% real FPR
print(f"{verdict} | P(fake)={p_fake:.4f} | raw={scores}")

Direct PyTorch with Optional Temperature Calibration (calibration.json)

import numpy as np
import torch
from transformers import AutoFeatureExtractor, AutoModelForAudioClassification

repo_id = "Tamarillo/voice-deepfake-guard-base"
fe = AutoFeatureExtractor.from_pretrained(repo_id)
model = AutoModelForAudioClassification.from_pretrained(repo_id).eval()

# Replace with: wav, _ = librosa.load("call.wav", sr=16000, mono=True)
wav = np.zeros(2 * 16000, dtype=np.float32)
inputs = fe(wav[: 4 * 16000], sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits[0]
    raw_probs = torch.softmax(logits, dim=-1)
    # Optional temperature scaling from calibration.json (T=0.9838)
    cal_probs = torch.softmax(logits / 0.9838, dim=-1)

p_fake_raw = float(raw_probs[0])
verdict = "FAKE" if p_fake_raw >= 0.20 else "REAL"
print(f"{verdict} | raw P(fake)={p_fake_raw:.4f} | cal P(fake)={float(cal_probs[0]):.4f}")

ONNX Runtime (Server / Quantized CPU)

pip install onnxruntime huggingface_hub numpy
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download

repo_id = "Tamarillo/voice-deepfake-guard-base"
onnx_path = hf_hub_download(repo_id=repo_id, filename="onnx/model_quantized.onnx")  # 355.4 MB INT8 (74.6 ms / 1s audio, 0.00092 max diff); or "onnx/model.onnx" (1263.3 MB FP32)
sess = ort.InferenceSession(onnx_path, providers=["CPUExecutionProvider"])

# Replace with: wav, _ = librosa.load("call.wav", sr=16000, mono=True)
wav = np.zeros(2 * 16000, dtype=np.float32)
clip = wav[: 4 * 16000].astype(np.float32)
clip = (clip - clip.mean()) / (clip.std() + 1e-6)  # matches Wav2Vec2FeatureExtractor do_normalize=True
logits = sess.run(None, {"input_values": clip[None, :]})[0][0]
ex = np.exp(logits - logits.max())
probs = ex / ex.sum()
print(f"P(fake)={probs[0]:.4f} | P(real)={probs[1]:.4f}")

Server / SOC flagship: For lightweight browser WASM (50.6 MB INT8, 22.9 ms / 1s), use Tamarillo/voice-deepfake-guard-tiny-en. For 1:1 wav2vec2-base size (94.6M, 50.9 ms / 1s), use Tamarillo/voice-deepfake-guard-small-en.


Label Schema, Preprocessing & Operating Thresholds (calibration.json)

Class ID Label Meaning
0 fake Synthetic / TTS / zero-shot voice-cloned / voice-converted (spoof) speech.
1 real Authentic human (bonafide) speech.
  • Silence Trimming (Train vs. Inference): Training trims leading/trailing silence (librosa.effects.trim(wav, top_db=30)) so models cannot learn dataset-specific padding shortcuts. All benchmarks in Tables 1–2 run on raw, untrimmed 16 kHz audio (first 4.0s), and inference snippets do not require silence trimming. For real telephony streams with long initial dead air (>0.5s silence before speech starts), run a lightweight VAD/trim before taking the 1s–4s window.
  • Calibration (calibration.json) vs. OOD Raw Thresholds: Validation temperature T = 0.9838 (applied as softmax(logits / T)), validation EER = 0.28%, calibrated ECE = 0.0260. On our in-domain cross-attack validation split, class separation is near-complete, placing temperature-scaled thr_val_5pct_fpr = 0.0100 and thr_val_1pct_fpr = 0.0102 near 0.01. For out-of-domain commercial TTS screening, we recommend thresholding raw uncalibrated P(fake) at τ = 0.15–0.20 (high recall) or τ = 0.50 (ultra-low 0.3% real-speaker FPR), or calibrating τ on a small sample of your target voice channel.

Benchmarks (4 Zero-Touch OOD Suites + Unseen-Attack ASVspoof5 Eval + Streaming & Chinese OOD)

All 7 models were evaluated head-to-head on identical frozen 16 kHz mono audio clips with zero evaluation clips present in training. Full reproducible data, training, and evaluation scripts are bundled in this repository: scripts/build_audio_data_v2.py, scripts/train_audio_model.py, and scripts/eval_audio_suite.py. Bold marks the best value (or ties) in each column.

Evaluation Protocol & Subsampling Details

  • Windowing & Preprocessing: Table 1 scores the first 4.0s (64,000 samples at 16 kHz mono) of every raw, untrimmed audio clip (trim_sil=False). Table 2 additionally scores 1.0s and 2.0s cropped windows on Commercial TTS and ASVspoof2021_LA.
  • Strict Zero-Touch vs. Unseen-Attack Test Split: Four suites (Commercial TTS, DFADD, In-The-Wild, ASVspoof2021_LA) are 100% zero-touch OOD corpora never seen during training. The fifth suite (ASVspoof5 Eval) is the official held-out Track 1 test split (unseen speakers and unseen attacks A17–A32, strictly disjoint from ASVspoof5 train/dev A01–A16 used in training). We report both the 4-Suite Strict Zero-Touch OOD Mean and the 5-Suite Public Mean.
  • Dataset Sizes & Balanced Sampling:
    • ood_commercial_tts (garystafford/deepfake-audio-detection, CC-BY-4.0): full dataset (n=1,866) — real YouTube human speech vs. ElevenLabs, Hume AI, Amazon Polly, Luvvoice, Speechify, and Kokoro.
    • ood_dfadd_diffusion (SpeechAntiSpoofingBenchmarks/DFADD, MIT): full available streamed test set capped at 1,000/class (n=1,755, seed=103) — 2024 Diffusion & Flow-Matching TTS (GradTTS, Matcha-TTS, NaturalSpeech2, PFlow, ProDiff).
    • ood_in_the_wild (SpeechAntiSpoofingBenchmarks/InTheWild, eval-only): deterministic 50/50 balanced subset (n=2,000: 1,000 real / 1,000 fake, seed=104) — Müller et al. (Interspeech 2022) public-figure deepfakes vs. interviews/podcasts (evaluation-only, never trained on).
    • ood_asvspoof2021_la (SpeechAntiSpoofingBenchmarks/ASVspoof2021_LA, ODC-BY): deterministic 50/50 balanced subset (n=2,000: 1,000/1,000, seed=102) — real VoIP / PSTN telephony codecs (Opus, G.722, μ-law, a-law, GSM). (Note: mo-thecreator and Gustking trained on ASVspoof2019_LA, which shares VCTK speakers and attacks with ASVspoof2021_LA; Tamarillo never saw ASVspoof2019_LA.)
    • ood_asvspoof5 (SpeechAntiSpoofingBenchmarks/ASVspoof5, ODC-BY): deterministic 50/50 balanced subset (n=2,000: 1,000/1,000, seed=101) — official unseen-attack (A17–A32) and real-codec (C01–C11) evaluation partition.
    • ood_decro_zh (SpeechAntiSpoofingBenchmarks/DECRO, CC-BY-4.0, Table 2): deterministic 50/50 balanced Chinese subset (n=1,600: 800/800, seed=105).

1. Core 5-Suite Public Benchmark (4.0s Clips — EER % ↓ and ROC-AUC ↑)

Model Params Official ONNX Comm. TTS [Z] DFADD [Z] In-The-Wild [Z] ASV2021 LA [Z] ASVspoof5 Eval 4-Suite Zero-Touch [Z] (EER ↓ / AUC ↑) 5-Suite Public Mean (EER ↓ / AUC ↑)
Tamarillo tiny-en 23.7M Yes (FP32+INT8) 16.72% (0.899) 8.32% (0.976) 15.80% (0.915) 26.35% (0.808) 16.30% (0.918) 16.80% / 0.8996 16.70% / 0.9033
Tamarillo small-en 94.6M Yes (FP32) 16.88% (0.914) 3.47% (0.997) 8.90% (0.970) 20.35% (0.874) 10.65% (0.949) 12.40% / 0.9386 12.05% / 0.9407
Tamarillo base 315.7M Yes (FP32+INT8) 12.43% (0.943) 0.96% (1.000) 4.30% (0.987) 17.70% (0.883) 11.75% (0.940) 8.85% / 0.9530 9.43% / 0.9503
Gustking/wav2vec2-large-xlsr-deepfake-audio-classification 315.7M No 18.92% (0.888) 11.81% (0.947) 15.05% (0.926) 2.25% (0.998) 21.75% (0.841) 12.01% / 0.9396 13.96% / 0.9199
mo-thecreator/Deepfake-audio-detection 94.6M No 23.85% (0.834) 47.21% (0.509) 10.60% (0.953) 0.50% (0.998) 29.40% (0.756) 20.54% / 0.8236 22.31% / 0.8101
MelodyMachine/Deepfake-audio-detection-V2 94.6M No 50.48% (0.487) 48.42% (0.516) 55.50% (0.411) 16.25% (0.855) 35.60% (0.666) 42.66% / 0.5673 41.25% / 0.5869
Spectral High-Frequency Heuristic 0.0M — 64.95% (0.299) 52.13% (0.478) 49.60% (0.516) 49.15% (0.547) 43.70% (0.570) 53.96% / 0.4601 51.91% / 0.4820

[Z] marks the 4 strictly zero-touch OOD corpora; ASVspoof5 Eval is the official unseen-speaker/unseen-attack (A17–A32) test partition.

2. Short-Window Streaming EER (1.0s / 2.0s), Zero-Touch Chinese OOD (DECRO, n=1,600), & Commercial TTS @0.50 Trade-off

Model Params 1.0s Comm. TTS EER ↓ 2.0s Comm. TTS EER ↓ 1.0s ASV2021 LA EER ↓ Zero-Touch Chinese DECRO (EER ↓ / AUC ↑) Comm. TTS @0.50 (Fake Recall / Real FPR)
Tamarillo tiny-en 23.7M 21.87% 17.79% 37.55% 5.19% / 0.988 33.3% / 0.8%
Tamarillo small-en 94.6M 20.52% 18.01% 35.45% 2.38% / 0.997 27.8% / 0.3%
Tamarillo base 315.7M 14.79% 12.75% 39.90% 12.44% / 0.962 15.4% / 0.3%
Gustking/wav2vec2-large-xlsr-deepfake-audio-classification 315.7M 26.42% 22.19% 16.95% 2.44% / 0.994 75.6% / 16.4%
mo-thecreator/Deepfake-audio-detection 94.6M 25.30% 23.42% 12.65% 29.50% / 0.698 78.9% / 26.2%
MelodyMachine/Deepfake-audio-detection-V2 94.6M 50.91% 51.77% 36.75% 47.62% / 0.506 4.9% / 8.8%
Spectral High-Frequency Heuristic 0.0M — — — 62.62% / 0.331 98.7% / 99.9%

ONNX Parity & Same-Machine 4-Thread x86 CPU Latency (1.0s / 2.0s / 4.0s Audio)

Hardware: GCP a2-highgpu-1g (Intel Xeon Cascade Lake @ 2.20 GHz, AVX-512, 4 ORT threads, bs=1, median p50 ms over 15 timed runs after 3 warmups, RTF = latency / clip_duration). For apples-to-apples CPU timing, incumbents (which ship no official ONNX) were exported locally to FP32 ONNX on the exact same machine:

  • mo-thecreator/Deepfake-audio-detection (94.6M, 378.5 MB FP32): 50.34 ms @ 1.0s (RTF 0.0503) | 90.25 ms @ 2.0s | 169.01 ms @ 4.0s.
  • Gustking/wav2vec2-large-xlsr-deepfake-audio-classification (315.7M, 1,263.3 MB FP32): 140.42 ms @ 1.0s (RTF 0.1404) | 238.64 ms @ 2.0s | 468.66 ms @ 4.0s.
Artifact File Size Parity (n=16 clips: Argmax / Max Δp) CPU @ 1.0s (RTF) CPU @ 2.0s (RTF) CPU @ 4.0s (RTF)
onnx/model.onnx (FP32) 1263.3 MB 100.0% / 0.00000 142.73 ms (0.1427) 240.85 ms (0.1204) 465.50 ms (0.1164)
onnx/model_quantized.onnx (INT8) 355.4 MB 100.0% / 0.00092 74.63 ms (0.0746) 117.27 ms (0.0586) 224.48 ms (0.0561)
  • Parity Protocol & Quantization Caveats: Parity was verified against PyTorch FP32 across n=16 held-out validation clips spanning 1.0s, 2.0s, and 4.0s windows (0.00000 max diff FP32; 0.00092 max diff INT8); full 5-suite EER benchmarks in Table 1 were run on PyTorch FP32 weights. FP16 ONNX is omitted across tiers because ORT CPU normalization checks did not pass our numeric parity gate.

Training Recipe & Upstream-Audited Data Provenance

Trained end-to-end (unfrozen 7-layer raw-waveform CNN frontend with 0.5× differential LR + native use_weighted_layer_sum=True across all transformer layers + focal cross-entropy gamma=1.2, label smoothing 0.03, EMA 0.996, validation-only EER selection) on 41,550 strictly domain-matched real/fake clips (val=3,521 cross-attack validation set) with leading/trailing silence trimming (top_db=30) and real ffmpeg production codecs (libopus 12–16 kbps, g722, pcm_mulaw 8 kHz, pcm_alaw 8 kHz, libmp3lame 48 kbps, aac 32 kbps) applied symmetrically 50/50 across real and fake speech. Every training source carries verified commercially permissive upstream provenance:

  1. ASVspoof 5 Official train (A01–A08) & dev (A09–A16) (jungjee/asvspoof5, ODC-BY, upstream MLS CC-BY-4.0) — 100% disjoint speakers and attacks from ASVspoof5 eval (A17–A32).
  2. CD-ADD (SpeechAntiSpoofingBenchmarks/CD-ADD, CC-BY-4.0) — matched LibriTTS & TED Talks genuine speech vs. OpenVoice, VALL-E, WhisperSpeech, YourTTS, and Seamless.
  3. CVoiceFake (small) & CFAD (SpeechAntiSpoofingBenchmarks/CVoiceFake_small, CC-BY-4.0, upstream Mozilla CommonVoice CC0-1.0, en/de/fr/it/zh + SpeechAntiSpoofingBenchmarks/CFAD, CC-BY-4.0, Mandarin).
  4. Fresh 2025–2026 Zero-Shot Voice Clones & Speech-to-Speech VC (Matched 1:1 with Real Domains): Synthesized on A100 using Qwen/Qwen3-TTS-12Hz-0.6B-Base (Jan 2026, Apache-2.0), ResembleAI/chatterbox Turbo (2025, MIT), and ChatterboxVC speech-to-speech voice conversion (2025, MIT) conditioned 1:1 on real spontaneous meeting (edinburghcstr/ami, CC-BY-4.0), 8 kHz banking call-center (PolyAI/minds14, CC-BY-4.0), and read (openslr/librispeech_asr, CC-BY-4.0) voices.

Honest Limitations & Where Baselines Win

  1. ASVspoof2021_LA Telephony Benchmark (mo-thecreator & Gustking win): mo-thecreator (0.50% EER) and Gustking (2.25% EER) significantly outperform Tamarillo (17.70%–26.35% EER) on ood_asvspoof2021_la. Both incumbents trained on ASVspoof2019_LA, which shares VCTK source speakers and legacy A07–A19 attack systems with ASVspoof2021_LA, whereas Tamarillo never saw ASVspoof2019_LA (and beats both incumbents by large margins on ASVspoof5, Commercial TTS, DFADD, and In-The-Wild).
  2. Conservative Default @0.50 Recall on Studio Commercial TTS: While Tamarillo/voice-deepfake-guard-base achieves 12.43% EER (0.943 AUC) on Commercial TTS, its raw softmax cutoff at 0.50 yields 15.4% fake recall at 0.3% real-speaker FPR (compared to Gustking 75.6% recall at 16.4% real FPR, and mo-thecreator 78.9% recall at 26.2% real FPR). Lower the decision threshold to τ = 0.15–0.20 for high-recall commercial TTS screening, or calibrate on a small in-domain validation sample.
  3. Language Coverage & Zero-Touch Chinese Ordering (small-en > base on DECRO): Although base uses the 128-language XLS-R backbone and fine-tunes on 5 languages (en/de/fr/it/zh), evaluation covers only English (5 suites) and zero-touch Chinese (DECRO); German, French, and Italian performance is currently unevaluated. On Chinese DECRO, English-only small-en (2.38% EER) and tiny-en (5.19%) outperformed base (12.44% EER) despite base training on CFAD Mandarin (likely due to recording/vocoder calibration shift between CFAD and DECRO).
  4. Duration Sensitivity & Defense-in-Depth: Trained on 1.0s–4.0s 16 kHz mono segments; very short 1.0s narrowband telephony clips (ASVspoof2021_LA) degrade substantially (35.45%–39.90% EER vs. 17.70%–26.35% at 4.0s). Prefer 2s–4s windows for production calls, aggregate sliding windows on longer recordings, and pair acoustic forensics with speaker verification / liveness checks in high-stakes authentication.
  5. Quantization Availability: FP16 ONNX is omitted across tiers due to ORT normalization parity failures, and INT8 is omitted on small-en after failing our <= 0.08 probability parity gate.

License, Attribution & Citation

Model weights and code are released under the Apache-2.0 License by Tamarillo. Training data attributions: ASVspoof 5 (ODC-BY), CD-ADD (CC-BY-4.0), CVoiceFake (CC-BY-4.0), AMI (CC-BY-4.0), MINDS14 (CC-BY-4.0), LibriSpeech (CC-BY-4.0), CFAD (CC-BY-4.0), Qwen3-TTS (Apache-2.0), and Chatterbox (MIT).

@misc{tamarillo_voice_deepfake_guard_2026,
  title        = {Tamarillo Voice Deepfake Guard: Codec-Robust Multi-Layer Acoustic Forensics Detectors},
  author       = {Tamarillo Open-Model Lab},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/Tamarillo/voice-deepfake-guard-base}},
  license      = {Apache-2.0}
}
Downloads last month
-
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Tamarillo/voice-deepfake-guard-base

Quantized
(18)
this model

Datasets used to train Tamarillo/voice-deepfake-guard-base

Space using Tamarillo/voice-deepfake-guard-base 1

Collection including Tamarillo/voice-deepfake-guard-base