Speech and audio
Replay, Synthetic Speech, and Anti-Spoofing
Explain presentation attacks, replay, TTS, voice conversion, anti-spoofing models, tandem evaluation, domain shift, and incident response.
By the end you can
- Define replay, synthetic speech, and anti-spoofing as an operational problem with explicit inputs, outputs, and boundaries
- Distinguish presentation attack detection, speaker verification, and provenance verification without treating them as interchangeable
- Trace the workflow from define the attack surface through operate defensively
- Evaluate replay, synthetic speech, and anti-spoofing using equal error and cost metrics under stated attack priors and evidence from difficult deployment slices
Nothing here certifies a recording as genuine
Anti-spoofing asks a narrow question: is this audio sample bona fide, under a defined capture and attack model? The word defined is carrying the sentence. Somebody had to name in advance what an attack could be — replay, speech synthesis, voice conversion, codec manipulation, an injected signal. The detector only ever learns to answer inside that list. It never answers alone, either. Its score goes to a speaker verification system that acts on it. So the two have to be evaluated as one thing.
No detector, then, can certify every future recording as genuine. Attackers adapt. Generative models change. Replay paths vary. And an ordinary channel shift can resemble a spoof artifact when nobody is attacking at all. A stronger detector matters less than the work done before it: whether the attack surface was drawn widely enough to cover what the system will meet in service. Without that, the error and cost figures describe the threat model someone chose. Not the decision they are being used to support.
The rest of this lesson is mostly one measurement repeated in different places. An unchanged detector is scored first against the attacks it was trained on, then against attacks it was not. The gap between those two numbers is the whole subject.
Every detector is a bet on which attacks were named in advance, and the attacker is free to read the bet before placing one.
Example
The same detector: 0.43% EER on what it had heard, 9.57% on what it had not
That bet gets lost like this. One detector was scored twice and never changed in between. B01 was the CQCC-GMM baseline of the ASVspoof 2019 logical-access database. On the development set — the attacks it had trained on — it scored a pooled minimum t-DCF of 0.0123 and 0.43% EER. On the evaluation set, whose generators were mostly ones it had never heard, the same system scored 0.2366 min t-DCF and 9.57% EER. Nothing was altered but the question. The error rose roughly twentyfold. The database paper gives the cause in one line: “This was due to the presence of new attacks that were not included during CM training.”
A pooled headline hides even that. Per attack, B01's evaluation EER ran from 0.00% on A07 and on the known reference attack A16 up to 26.15% on the unseen A13. By the primary metric the costliest attack was a third one, A17, at 0.9820 min t-DCF with 19.62% EER. So the single figure 9.57% contains one generator the baseline caught perfectly and another it caught barely at all. Reporting only the average is what lets a system look uniformly competent when its competence is entirely conditional on lineage. The gap is workable rather than fatal. The top logical-access entry, team T05, reached 0.0069 min t-DCF and 0.22% EER — best of the 48 teams that entered that scenario, out of 63 across both scenarios in ASVspoof 2019. But nobody would know which situation they were in from a development-set score alone.
- What has to be decided here is how to judge anti-spoofing at all — presentation attacks, replay, TTS, voice conversion, the detector models themselves, tandem evaluation, domain shift and incident response.
- The failure that arrives first is training and testing on the same spoof generator family. B01's 0.43% EER on the development set is exactly that measurement, and it is the number a vendor would quote.
- The evidence to ask for is equal error and cost metrics under stated attack priors, reported per attack rather than pooled. 0.00% on A07 and 26.15% on A13 average into a 9.57% that describes neither.
- The practical response is to separate generator families, replay devices and post-processing chains, so that nothing on the test side was also on the training side.
Case
Six known systems, eleven unknown, and two deliberately re-used
The challenge series was built around exactly this failure and fixed it by construction. The construction is more precise than a simple split. Seventeen TTS and voice conversion systems were built for the ASVspoof 2019 logical-access database. Six of them — A01 to A06 — are the known spoofing systems, used in training and development. Eleven are unknown. The evaluation partition mixes those eleven unseen generators with two deliberate reference points. The database paper sets it out: “Then A07 to A19 (apart from A16 and A19) are the eleven unknown spoofing systems, and A16 and A19 are the known reference systems using the same algorithms as A04 and A06.” Eleven unseen plus two re-used, not thirteen unheard. And the re-used pair earns its place. A16 at 0.00% EER is the control that shows what B01's score looks like when the generator is already familiar. Without that control, a low evaluation number could not be read at all.
ASVspoof 5, released in 2024, pushed the same design further and crowdsourced both the speech and the attacks. It carries 32 attack algorithms, split disjointly across partitions: A01 to A08 in training, A09 to A16 in development, A17 to A32 in evaluation. The adversarial Malafide and Malacopula filters were used for the first time. So were eleven codec and compression conditions, C01 to C11, alongside an uncompressed C00. What a genuinely held-out generator set does to a modern architecture is stated plainly in the challenge paper: “The baseline systems achieved minDCF higher than 0.7 and EERs higher than 29%.” Concretely, the AASIST baseline B02 reached 0.7106 minDCF with 29.12% EER, and the RawNet2 baseline B01 0.8266 minDCF with 36.04% EER. Among the 54 participants, the best closed-condition submission reached 0.2436 minDCF with 8.61% EER. The best open-condition submission was free to use external data and pre-trained self-supervised models; it reached 0.0750 minDCF with 2.59% EER. A detector tested only against its own training families has not really been tested. These are the numbers that appear once it is.
Visual
Hold out the generator, not just the speaker
Doing that on purpose is a sequence of three stages, and each one lives on what the stage before it decided. Defining the attack surface is where the assumptions are made: which generators, which replay paths, which codecs count as attacks worth catching. Separating the attack assets is where those assumptions get spent. The generator families, replay devices and post-processing chains pushed to the evaluation side of the line are exactly the ones named at the first stage. That is the whole instruction in the title. Hold out the generator, not just the speaker. Six known systems on one side; eleven unknown ones plus two labelled reference attacks on the other. That is the separation carried out at the scale of a public database. ASVspoof 5's disjoint A01–A08, A09–A16 and A17–A32 is the same separation with 32 algorithms and eleven codec conditions instead.
Operating defensively is the third stage. It is where the assumptions meet an attacker who has read them. Anything the first stage left off the list arrives here with no check waiting for it. The cost of that omission is not an error rate. It is whatever the system was authorising.
1. Define the attack surface
Include physical replay, digital injection, TTS, conversion, editing, and compromised sensors.
2. Separate attack assets
Hold out speakers, rooms, devices, codecs, and generation systems.
3. Train complementary evidence
Use spectral, temporal, phase, spatial, and device cues without relying on one artifact.
4. Operate defensively
Fuse with identity and transaction controls, monitor attacks, and update incident playbooks.
Defensive operation runs on the attack surface you drew, and an attacker who steps outside that surface meets no check at all.
Analogy
A counterfeit detector in a changing printing industry
A banknote detector makes the same bet with a smaller board. Trained on yesterday's ink and paper, it catches yesterday's fakes. It may miss a new printing process. It may reject a legitimate redesign. Neither error shows up in how well it handles last year's counterfeits — which is the only thing anyone measured.
The analogy stops at the size of the target. A counterfeiter has one physical object to reproduce. An audio attacker can work on the playback room, the codec and the identity model as well as the voice. Four surfaces, not one. Which is why holding out a single dimension leaves the others exactly where they were.
Anti-spoofing requires continual unseen-attack testing and layered controls.
Example
A protocol is what the attacker reads
Unseen-attack testing and layered controls both have to be written down somewhere, and the document they get written into is a protocol. Two of the four terms below are not this lesson's coinage but an international standard's. ISO/IEC 30107-3:2023 fixes bona fide versus attack presentation, and the paired error rates APCER and BPCER. APCER counts the attacks that got through — the “proportion of attack presentations using the same PAI species incorrectly classified as bona fide presentations in a specific scenario”, in the definition given by Busch and Thieme, the standard's editors. Note what the second edition then tells testers not to do. Do not collapse the pair into a single figure via EER or HTER. Report BPCER at a fixed APCER instead: BPCER20 at APCER 5%, BPCER100 at APCER 1%. Similar-sounding words imply different evidence, different units, different decision rights. And a protocol is public by design. Which makes it precisely what an attacker studies before deciding where to step outside it.
- A presentation attack is an attempt to fool a biometric sensor using replayed or synthesized input. The thing that does the fooling is the presentation attack instrument, and ISO/IEC 30107-3:2023 asks for the APCER of the most successful instrument rather than an average over all of them.
- Bona fide means a genuine sample under the evaluation protocol. That is a narrower promise than genuine, because the protocol is what decides. The standard pairs the term with attack presentation rather than leaving it as an everyday word.
- Tandem evaluation assesses spoof detection together with the downstream verification system. Its metric is the tandem detection cost function, the primary ASVspoof metric from 2019 onward.
- An unseen attack is a mechanism or generator not represented in training — the eleven unknown systems in the 2019 evaluation partition, and A17 to A32 in ASVspoof 5. That is what those partitions were assembled to be.
Key idea
The detector learned the codec
Those definitions get violated quietly rather than openly, and four conditions do most of it. The first has already been named and measured: training and testing on the same spoof generator family, worth a twentyfold difference in B01's error.
The second is a detector learning codec or dataset fingerprints instead of anything about synthesis. That is the failure this section is titled after. The ASVspoof 2021 DeepFake track isolated it deliberately. Audio was passed through nine compression conditions: C1 with no codec, then mp3, m4a and ogg at high and low variable bit rates, and two undisclosed ones. The attacks were drawn from more than 100 spoofing algorithms. The best participant fell to 0.10% EER during the progress phase, then rose to 15.64% on the evaluation set. The best of the four baselines, B04, reached only 22.38% EER. The organisers name the cause without hedging: “Unlike for the LA and PA tasks, evaluation phase results are substantially higher than those for the progress phase. This is an indication of overfitting to the progress partition.” A change of handset can look like an attack while an attack looks like a clean line.
Outside a challenge it goes further still. Müller and four colleagues re-implemented twelve published anti-spoofing architectures in 2022. They ran them on a new In-the-Wild corpus of found recordings: 37.9 hours from 58 celebrities and politicians, 17.2 hours deepfake and 20.7 hours bona fide. Raw-waveform models fell from as low as 1.2% EER on ASVspoof to 33.9% EER in the wild. Spectrogram models fell from 6.3% to 37.4%. Their abstract puts the size of it in one clause: “We find that related work performs poorly on such real-world data (performance degradation of up to one thousand percent).”
The third condition is treating a low detector score as proof of authenticity, which is the certification no detector can issue. The fourth is attack adaptation once public thresholds or model behavior become known. All four share a shape. Whatever the detector picked up from the generators and the recording paths it was shown is exactly what the next attacker moves away from. It is also what an unremarkable change of codec or handset imitates by accident. One of those is deliberate and one is not. From inside the score they are the same event.
A detector scored against the same generator family it was trained on is reporting how well it memorised that family, not whether the next attack gets through.
Steps
Build an unseen-attack evaluation
There is one artefact that works against all four, and ASVspoof shows what it looks like at full size. An unseen-attack evaluation is what lets another team check whether training and testing happened on the same spoof generator family. It is the only thing that lets you prove they did not.
Build it in the order of the three stages. Write down first what your definition of the attack surface assumes: which generators, which replay devices, which post-processing chains you have decided an attack can come from. Then find one counterexample to that list — a cloning service, a codec, a room you never named — and note that nothing in the current evaluation would catch it. ASVspoof 5's eleven codec conditions C01 to C11 exist because that counterexample is usually a channel rather than a voice. Then write down what operating defensively does on the day it arrives: which threshold moves, who is told, what gets stepped up, what gets rolled back.
Containment is the stage that gets skipped. There is a dated case where it was the only stage left, because no detector stood anywhere in the path. On 21 January 2024 a robocall campaign went to New Hampshire phones carrying a generative-AI deepfake of President Biden's voice, with spoofed caller ID. 9,581 calls were initiated; the Enforcement Bureau verified a sample of 3,000. On 26 September 2024 the Federal Communications Commission adopted a forfeiture order, released four days later. Its first paragraph reads: “We impose a penalty of $6,000,000 against Steve Kramer (Kramer) for effectuating an illegal robocall campaign that targeted potential New Hampshire voters two days before the state’s 2024 Democratic Presidential Primary Election”. The violation cited was of the Truth in Caller ID Act. A related federal suit, League of Women Voters of New Hampshire v. Kramer, was filed in the District of New Hampshire on 14 March 2024 and terminated on 21 November 2025. No equal error rate appears anywhere in that sequence. The consequence arrived as a regulator's dollar figure and a federal docket, on a timescale of months and years. That is the timescale a containment plan is actually written against.
1. Partition by attack lineage
Separate generator families, replay devices, and post-processing chains.
2. Include genuine shifts
Test new microphones, compression, illness, emotion, and languages.
3. Evaluate the tandem
Measure final account or action errors, not only spoof labels.
4. Plan containment
Add rate limits, step-up authentication, provenance, and rollback.
Since no score certifies a recording as genuine, the evaluation only pays for itself when rate limits, step-up authentication, provenance, and a rollback path stand behind the detector.
Example
Score the pair, not the detector
That leaves the question of what to report. Equal error and cost metrics under stated attack priors describe the detector on its own, and the object is smaller than it looks. The priors are the attack surface again, with numbers attached to it.
Tandem cost is not a figure of speech either. It is the tandem detection cost function, t-DCF, introduced by Kinnunen and Lee in 2018 and adopted as the primary ASVspoof metric from 2019. It carries six parameters: false-alarm and miss costs for the countermeasure, the same two for the speaker verifier, and the prior probabilities of target and spoof trials. The stated attack priors are literally two of the six, written into the metric rather than left in a footnote. It exists because of a limitation its authors put first in their own abstract: “First, the CM EER is not necessarily a reliable predictor of performance when ASV and CMs are combined.” A17 extracted 0.9820 min t-DCF from B01, against its 19.62% EER. That is the same sentence in numeric form. The two disagree about which attack was worst.
Three hard slices finish the portfolio. Attacks from generator families the detector never saw in training are the eleven-unknown condition applied to your own system. False rejection of genuine users is the legitimate redesign the banknote detector turns away, and ISO/IEC 30107-3:2023 tells you how to report it: BPCER at a fixed APCER, not folded into one number. And how long an incident takes to detect matters, because the fourth failure mode takes for granted that some attacks land. The forfeiture order arrived months after the calls did.
- For the core task, equal error and cost metrics under stated attack priors, reported per attack rather than pooled — 0.00% on A07 and 26.15% on A13 are not summarised by 9.57%.
- For the behavior of the system as a whole, tandem cost with the speaker verifier: t-DCF with all six of its parameters written down, since the CM EER was never a reliable predictor of the pair.
- For the robustness slice, performance on unseen generators, codecs, rooms and devices. The In-the-Wild result — 1.2% to 33.9% EER across twelve architectures — is the size of surprise this slice exists to catch before deployment does.
- Over the working life of the system, false rejection of genuine users — BPCER at a fixed APCER, per ISO/IEC 30107-3:2023 — and incident detection time.
Report equal error and cost metrics under stated attack priors together with false rejection of genuine users and incident detection time.
Key takeaways
- The ASVspoof 2019 logical-access database was built from seventeen TTS and voice conversion systems. Six known ones, A01 to A06, sit in training and development. Eleven unknown ones sit in evaluation, plus two known reference attacks: A16 and A19 reuse the algorithms of A04 and A06. The evaluation set is eleven unseen generators with two deliberate anchors, not thirteen unheard ones.
- One unchanged detector, the CQCC-GMM baseline B01, scored 0.0123 min t-DCF and 0.43% EER on the development attacks it had trained on. On the evaluation set it scored 0.2366 min t-DCF with 9.57% EER. Roughly twentyfold worse. Per-attack EER ran from 0.00% on A07 and A16 up to 26.15% on A13, with A17 costliest at 0.9820 min t-DCF and 19.62% EER.
- No detector can certify a future recording as genuine, so a low score is one input and never proof of authenticity. ISO/IEC 30107-3:2023 goes further. It tells testers not to collapse APCER and BPCER into a single EER or HTER at all, but to report BPCER20 at APCER 5% and BPCER100 at APCER 1%.
- Defining the attack surface comes first and defensive operation comes last. Hold out generator families, replay devices and post-processing chains, as ASVspoof 5 does with 32 algorithms split disjointly A01–A08, A09–A16, A17–A32 across eleven codec conditions. Even so, its AASIST and RawNet2 baselines landed at 0.7106 and 0.8266 minDCF, with 29.12% and 36.04% EER.
- Benchmark scores travel badly. The ASVspoof 2021 DeepFake track's best participant went from 0.10% EER in the progress phase to 15.64% in evaluation. Twelve re-implemented architectures fell from as low as 1.2% EER to 33.9% on 37.9 hours of found audio from 58 celebrities and politicians.
- Report the pair, not the detector. t-DCF, adopted as the primary ASVspoof metric from 2019, carries six declared parameters, including the target and spoof priors. Behind it keep rate limits, step-up authentication, provenance and a rollback path. When nothing stands in the path, the consequence arrives as a $6,000,000 forfeiture order and a federal docket instead of an error rate.