LabVoiceMachine learningAudio
Testing a deepfake audio detector for podcast editing
I built a detector for a University of Arizona class and tested it on 181,566 benchmark clips. Then I ran the same clips again with added noise, room echo and MP3 compression.
Brian Stever4 min read

“When did it start?”
Imagine you’ve just asked that in an OslerAI practice call. Your simulated patient tells you it started on the walk to work. Now you’ve got to decide what to ask next. That’s the part I care about when we build simulated patients. You get to ask the question out loud, wait for an answer, and follow up on what somebody actually said. A voice makes you practise the timing of a conversation, too.
I spend a lot of time with voices in my other work, producing podcasts. One habit I’ve picked up is keeping the original tape close. If someone sent me an ad read in a host’s voice and I couldn’t find the take, I’d want to know where it came from. Once it’s in the episode, people will hear it as something the host said.
That became a project for my deep learning class at the University of Arizona. If all I had was four seconds of audio, could I build something that would tell me if an audio clip was real or fake? I used a public research dataset with genuine speech and examples of speech made or altered by software.
Four seconds of audio
In a podcast edit, I use the waveform to find where somebody starts talking. For the project I used a different picture called a spectrogram. You still read it from left to right, but you also get to see what’s happening from low sounds at the bottom to high sounds at the top. A bright patch tells you the sound is strong in that part of the picture.

I used those pictures to train a small neural network. It learned which patterns tended to show up in genuine and generated clips, then gave new clips a score. To turn a score into a flag, I needed a cutoff. Set it low and more genuine clips get pulled in for review. Set it high and more fakes get through.
What the detector got wrong
My first encouraging result came on the set I used while developing the model. The error rate was under 0.04%. Then I tried it on a new set of 181,566 clips. These had passed through different phone and internet channels, and the model hadn’t seen the systems that generated the fakes. The error rate went up to 18.28%. Both numbers use the same comparison. I looked for the cutoff where the share of genuine clips flagged and the share of fake clips missed were about equal. That’s the “equal error rate” on the chart.
I also wanted to see what happened when the audio sounded a little more like something I’d get from a guest. Someone calls in from a tiled kitchen. The fridge kicks on. The file gets squeezed down to an MP3 somewhere along the way. I simulated room echo, background noise and MP3 compression, then ran the same clips through again. The error rate went to 18.48%. All those effects together made a much smaller difference than switching to the harder test in the first place.

There was still a number I could have put in a headline. The detector got about 91% right at its default cutoff. The catch was that nearly nine in ten clips in that test were fake to begin with. The number I’d have to live with in an edit was how many real clips it flagged. That was nearly two in five genuine clips. In an edit, every one of those flags is another reason to stop and go looking for the original.
Back to the practice room
When Casey Newton made an audio edition of Platformer, his first voice clone sounded like him chatting on Hard Fork. It was a strange fit for the more serious columns he wanted it to read. He recorded new material and now tells listeners in each episode that they’re hearing a clone. Casey’s account of the experiment (opens in a new tab).
In an OslerAI practice call, the learner already knows they’re speaking with a simulated patient. They can put their attention on what the patient says and what they’ll ask next. In a podcast edit, figuring out who said the words is part of the job. I’d test the detector on real exports before putting it in front of an editor. If I ever added a flag to an edit timeline, I know what I’d want it to do first. Open the original recording.
Experiment notes
I trained the 1.31-million-parameter CNN on ASVspoof 2019 Logical Access, chose the checkpoint on its development split and evaluated it on ASVspoof 2021 Logical Access. Inputs were four-second, 16 kHz mono clips represented as 128-bin log-Mel spectrograms. The model used four convolutional blocks and squeeze-and-excitation, which lets it reweight the patterns it picks up for each clip. The larger ResNet-18 had the lowest equal error rate at 17.21%. A traditional statistical baseline scored 30.89%.
At the default 0.5 cutoff, my model flagged 6,935 of 18,452 genuine clips. Its AUC-ROC, which measures how well the scores rank real and synthetic clips across cutoffs, went from 0.8979 to 0.8852 after the simulated podcast effects. In a separate run with two voice-generation systems held out of training, the model ranked clips well (0.9881 AUC-ROC) and flagged only 21.3% of synthetic clips at that same cutoff.
Project code on GitHub (opens in a new tab) · ASVspoof 2021 Logical Access dataset (opens in a new tab) · ASVspoof 2021 paper (opens in a new tab)