Nicolò Trevisan

← Case studiesCasi studio

02EvaluationFrom the lab to the real world

From the lab to WhatsApp: how I made a cloned-voice detector reliable in the real world

In the lab, almost every detector works well. The hard part comes when the voice goes through a phone call or a WhatsApp voice note. How I took mine out of the lab.

The case

On a Friday afternoon, a company assistant receives a WhatsApp voice note from an unknown number. It's the CEO's voice: he asks for an urgent bank transfer, to be made right away. But the voice is fake: an AI generated it.

Before reaching the phone, that voice note has travelled. The app compresses it, the network trims it, sometimes someone plays it on speaker and records it again. Every step erases details, and those are exactly the details a detector uses to recognise a synthetic voice.

1

Original

The file as it comes out of the generator

2

WhatsApp voice note

The same file, passed through WhatsApp

3

Phone call

The same file, passed through a phone call

The same voice note (in Italian) in three versions. 1: the original file, as it comes out of the generator. 2: the voice note passed through WhatsApp. My detector flags it from the first second to the last. 3: the voice note passed through a phone call.

The problem: the lab is not the world

In 2025 a public study tested the best open-source detectors on content actually taken from social media. On audio, they lost about half of the performance claimed in the lab. Many ended up close to guessing.

The reason is almost always the same: the detector is measured on audio too similar to what it was trained on. The grade is high, but it was earned on homework it had already seen.

A report card with three grades

That's why I never measure a detector with a single grade. I give it three, and each one answers a different question:

  1. New voices and recordings. Does it work on people, languages and microphones it has never heard?
  2. New AI tools. Does it recognise voices made with generators it doesn't know? This is what matters when a new tool comes out.
  3. Real world. Does it hold up on audio that is compressed, forwarded and badly recorded, like what actually arrives?

I never average the three grades. A detector can score 90 on the first and 40 on the third: the average, 65, tells you nothing useful. Whoever uses the detector needs to know where it is strong and where it isn't.

The threshold that doesn't travel

A detector doesn't answer "real" or "fake". It gives a score, and above a certain threshold the audio is flagged as fake. Where you set the threshold decides how many false alarms you get.

It's like a smoke alarm. Calibrated for an office, it works perfectly. Installed in a kitchen, it goes off every time someone starts cooking.

It really happened to me. I had calibrated my first threshold on my own test data. On a public collection of almost 2,000 audio clips taken from social media, it flagged 19 real voices out of 100 as fake. Almost one real person in five accused of being an AI.

Real voices recorded in a studio

5 out of 100 flagged as fake

Real voices from social media

19 out of 100 flagged as fake

Illustrative example. Each dot is a real voice; in red, the ones the detector flags as fake. With the threshold calibrated in the studio, studio errors are 5 out of 100, but on social media they become 19: that is the number actually measured on the collection of social-media audio. Raising the threshold lowers false alarms, but a threshold set too high would also let more fake voices through: that's why it has to be calibrated on the type of audio being judged, not raised at random.

The idea: teach the model the journey

I did two things.

First: the model learns what a voice sounds like after the journey. During training it hears voices, real and fake, also as they would arrive in reality: in different rooms, with background noise, through phone calls and messaging apps. So it learns that a compressed voice is not necessarily a fake one.

Second: the threshold is calibrated on the type of audio being judged. And in the report I always state which type of audio it was calibrated on, so the reader knows how far to trust it.

The proof

Real voices mistaken for fakes, out of 100

Before19
After4
Public collection of almost 2,000 audio clips from social media

Real phone calls mistaken for fakes, out of 100

Before14
With the journey in training1.7
Real calls, passed through telephone codecs

Voice scams in Italian caught, out of 40, including when sent as WhatsApp voice notes

Previous version26
Today40
Voice notes like the fake CEO's, voices created with ElevenLabs

False alarms per hour, on real speech

Before12
Today≤ 1
184 hours of real speech from public collections: meetings, conferences, interviews

And the three-grade report card today:

99.7real voices out of 100 recognised as real, in 16 languages.New voices and recordings · almost 14,000 recordings
98times out of 100, given a real voice and a generated one, it picks the generated one, with AI tools it had never met.New AI tools · 4,666 evaluation files
95times out of 100, the same test on audio taken from social media.Real world · almost 2,000 audio clips

The lesson

A detector is only as good as it is outside the lab. That's why I test mine on the type of audio it will have to judge, before it reaches someone who has to make a decision: a company about to make a bank transfer, a lawyer, a judge.

In short

  • I measure a detector where it will be used, not only in the lab.
  • I keep the three grades separate: new voices, new tools, real world.
  • The threshold is calibrated on the type of audio being judged.

02ValutazioneDal laboratorio al mondo reale

Dal laboratorio a WhatsApp: come ho reso affidabile un detector di voci clonate nel mondo reale

In laboratorio quasi tutti i detector funzionano bene. Il difficile arriva quando la voce passa da una telefonata o da un vocale WhatsApp. Come ho portato il mio fuori dal laboratorio.

Il caso

Un venerdì pomeriggio la segretaria di un'azienda riceve un vocale WhatsApp da un numero sconosciuto. È la voce dell'amministratore delegato: chiede un bonifico urgente, da fare subito. La voce però è falsa: l'ha generata un'AI.

Prima di arrivare sul telefono, quel vocale ha fatto un viaggio. L'app lo comprime, la rete lo riduce, a volte qualcuno lo riascolta in vivavoce e lo registra di nuovo. Ogni passaggio cancella dettagli, e sono proprio i dettagli che un detector usa per riconoscere una voce sintetica.

1

Originale

Il file come esce dal generatore

2

Vocale WhatsApp

Lo stesso file, passato attraverso WhatsApp

3

Telefonata

Lo stesso file, passato attraverso una telefonata

Lo stesso vocale in tre versioni. 1: il file originale, come esce dal generatore. 2: il vocale passato attraverso WhatsApp. Il mio detector lo segnala dal primo all'ultimo secondo. 3: il vocale passato attraverso una telefonata.

Il problema: il laboratorio non è il mondo

Nel 2025 uno studio pubblico ha messo alla prova i migliori detector open source su contenuti presi davvero dai social. Sull'audio hanno perso circa metà delle prestazioni dichiarate in laboratorio. Molti finivano vicini al tirare a indovinare.

Il motivo è quasi sempre lo stesso: il detector viene misurato su audio troppo simili a quelli con cui è stato addestrato. Il voto è alto, ma è un voto preso su compiti già visti.

La pagella in tre voti

Per questo non misuro un detector con un voto solo. Gli do tre voti, e ognuno risponde a una domanda diversa:

  1. Voci e registrazioni nuove. Funziona su persone, lingue e microfoni che non ha mai sentito?
  2. Strumenti AI nuovi. Riconosce le voci fatte con generatori che non conosce? È quello che conta quando esce uno strumento nuovo.
  3. Mondo reale. Regge su audio compressi, inoltrati, registrati male, come quelli che arrivano davvero?

Non faccio mai la media dei tre voti. Un detector può prendere 10 nel primo e 4 nel terzo: la media darebbe un 7 che non dice niente di utile. Chi deve usare il detector ha bisogno di sapere dove è forte e dove no.

La soglia che non viaggia

Un detector non risponde "vero" o "falso". Dà un punteggio, e sopra una certa soglia l'audio viene segnalato come falso. Dove metti la soglia decide quanti falsi allarmi avrai.

È come un allarme antincendio. Tarato in un ufficio funziona benissimo. Montato in una cucina, suona ogni volta che qualcuno si mette ai fornelli.

A me è successo davvero. La prima soglia l'avevo tarata sui miei dati di prova. Su una raccolta pubblica di quasi 2.000 audio presi dai social, segnalava come false 19 voci vere su 100. Quasi una persona vera su cinque accusata di essere un'AI.

Voci vere registrate in studio

5 su 100 segnalate come false

Voci vere arrivate dai social

19 su 100 segnalate come false

Esempio illustrativo. Ogni punto è una voce vera; in rosso quelle che il detector segnala come false. Con la soglia tarata in studio, in studio gli errori sono 5 su 100, ma sui social diventano 19: è il numero misurato davvero sulla raccolta di audio presi dai social. Alzando la soglia i falsi allarmi scendono, ma una soglia troppo alta lascerebbe passare anche più voci false: per questo va tarata sul tipo di audio da giudicare, non alzata a caso.

L'idea: insegnare al modello il viaggio

Ho fatto due cose.

La prima: il modello impara com'è una voce dopo il viaggio. Durante l'addestramento sente le voci, vere e false, anche come arriverebbero nella realtà: in stanze diverse, con rumore di fondo, attraverso telefonate e app di messaggi. Così impara che una voce compressa non è per forza una voce falsa.

La seconda: la soglia si tara sul tipo di audio da giudicare. E nel rapporto scrivo sempre su quale tipo di audio è stata tarata, così chi lo legge sa quanto fidarsi.

La prova

Voci vere scambiate per false, su 100

Prima19
Dopo4
Raccolta pubblica di quasi 2.000 audio presi dai social

Telefonate vere scambiate per false, su 100

Prima14
Con il viaggio nell'addestramento1,7
Chiamate vere, passate attraverso codifiche telefoniche

Truffe vocali in italiano scoperte, su 40, anche inviate come vocali WhatsApp

Versione precedente26
Oggi40
Vocali come quello del finto amministratore delegato, voci create con ElevenLabs

Falsi allarmi all'ora, su parlato vero

Prima12
Oggi≤ 1
184 ore di parlato vero da raccolte pubbliche: riunioni, conferenze, interviste

E la pagella in tre voti, oggi:

99,7voci vere su 100 riconosciute come vere, in 16 lingue.Voci e registrazioni nuove · quasi 14.000 registrazioni
98volte su 100, tra una voce vera e una generata, indica quella generata, con strumenti AI che non aveva mai incontrato.Strumenti AI nuovi · 4.666 file di valutazione
95volte su 100, lo stesso test sugli audio presi dai social.Mondo reale · quasi 2.000 audio

La morale

Un detector vale quanto regge fuori dal laboratorio. Per questo il mio lo metto alla prova sul tipo di audio che dovrà giudicare, prima che arrivi a chi deve prendere una decisione: un'azienda che sta per fare un bonifico, un avvocato, un giudice.

In breve

  • Misuro un detector dove verrà usato, non solo in laboratorio.
  • Tengo separati i tre voti: voci nuove, strumenti nuovi, mondo reale.
  • La soglia si tara sul tipo di audio da giudicare.