← writings

RoCo: Robust Code for Fast and Effective Proactive Defense against Voice Cloning Attack

RoCo grew out of a practical limitation of RoVo: generating protected speech took too long. In this 2025–2026 study, we replaced continuous embedding perturbations with discrete perturbation codes. The aim was to reduce processing time while keeping the resistance to speech enhancement that motivated our earlier work.

The paper appeared in the ICASSP 2026 proceedings, and I gave an oral presentation in Barcelona. We combined a dedicated perturbation code, a Straight-Through Estimator (STE), and two-stage loss optimization. The evaluation covered six speech corpora, three cloning models, and three speaker verifiers, with measurements of protection, audio quality, resistance to post-processing, and generation time.

Period2025 – 2026
TaskFast proactive voice protection
PublicationICASSP 2026 · Oral

Moving from continuous embeddings to discrete codes

RoVo adds perturbations to the continuous embeddings of a neural audio codec. After passing through the nonlinear decoder, the perturbation becomes part of the reconstructed speech structure, making it harder for an enhancement model to separate it as ordinary noise. But optimizing a continuous perturbation for every utterance still carries a substantial cost.

RoCo puts the protection signal in a separate discrete codebook channel. It keeps the original acoustic tokens, adds a perturbation code that interferes with speaker-identity extraction, and decodes them together. The design retains RoVo's use of the codec representation while narrowing what has to be optimized.

ComponentRoVoRoCo
Protection unitPerturbation of continuous codec embeddingsDiscrete perturbation code in an additional codebook channel
OptimizationPGD updates in continuous latent spaceSTE linking quantized forward passes to gradient updates
Loss controlAlternates between protection and perceptual qualityTarget Loss before the threshold; SNR Loss afterward
FocusResistance to adaptive removal attacksLower generation time with retained robustness

Protection has to survive post-processing and be affordable to generate

Proactive defenses perturb speech before it is released, so that a cloning model's speaker encoder has difficulty recovering the original identity. Small waveform perturbations, however, can resemble background noise to an enhancement or denoising model. An attacker can clean the reference audio before cloning it, reducing the protection.

Processing time is another obstacle. Signal-domain methods repeatedly update many waveform samples. If protecting a 5–10-second utterance takes tens of seconds or nearly two minutes, it is difficult to use the method for video, broadcasting, or a continuous conversation.

The question behind RoCo

Could we place protection in discrete codec tokens that survive speech enhancement, while generating the protected audio faster than existing signal-domain methods?

A dedicated channel alongside the acoustic tokens

Neural codec models represent speech with acoustic tokens from several codebooks. A Coarse Transformer predicts the longer structure in the earlier codebooks autoregressively, and a Fine Transformer fills in acoustic details in the later ones. Let a(q,t) denote the original token at codebook q and time frame t. RoCo adds a perturbation code p(t) of the same temporal length.

ã = [a; p]

The concatenation [a; p] is along the codebook axis, not time. The original tokens continue to carry phonetic content, prosody, and timbre. The added p is optimized to interfere with speaker-identity extraction. This confines the updates to a dedicated channel instead of changing all the tokens that represent the utterance.

RoCo adds a perturbation code to the original latent codes, optimizes it with STE, Target Loss, and SNR Loss, and decodes protected speech
The original latent codes are retained. Target Loss shifts the speaker representation, then SNR Loss reduces the audio distortion. Figure 1 from the ICASSP 2026 paper.

Passing gradients through discrete code selection

A perturbation code is an integer codebook index. Selecting a codebook vector through a one-hot index is not differentiable, so the Target Loss gradient cannot pass directly through that selection. We used a Straight-Through Estimator to supply a gradient path.

z_STE = q + (e − stopgrad(e))

Here, q is the discrete codebook vector selected in the forward pass, and e is a continuous representation from the embedding matrix. During the forward pass, e − stopgrad(e) evaluates to zero, leaving the quantized vector q. During backpropagation, stopgrad(e) blocks one path while the gradient through e remains. This allows gradient-based updates while the forward computation still uses a discrete code.

The role of STE

  • Forward — select the discrete code used by the codec.
  • Backward — approximate quantization with an identity gradient.
  • Update — optimize the dedicated perturbation code rather than the full waveform.

Establishing protection before recovering audio quality

Target Loss and SNR Loss pull in different directions. Target Loss moves the protected speaker embedding toward a chosen target speaker, making the original identity harder to extract. SNR Loss reduces the difference between the original and protected waveforms. In our experiments, a strong SNR term could suppress the perturbation before it provided enough protection.

We separated the objectives into stages. While the embedding-space magnitude of the perturbation code, ||P||₂, is below a threshold τ, the model optimizes Target Loss alone. At the threshold, it stops those updates and switches to SNR Loss.

L = L_Target if ||P||₂ < τ, otherwise L_SNR

The intention is to establish enough identity disruption first, then recover quality without largely undoing it. We selected the switching threshold on VCTK and applied it to the other five corpora without retuning.

1,200 utterances from 120 speakers across six corpora

We used VCTK, FST, MCV, CSNED, CSUKIED, and LibriSpeech. Across these corpora, we selected 120 speakers and ten utterances per speaker, for 1,200 protected recordings. VCTK supplied the threshold-selection data; the remaining corpora tested the same threshold under different recording and speaker conditions.

ComponentConfigurationPurpose
Speech corporaVCTK, FST, MCV, CSNED, CSUKIED, LibriSpeech120 speakers × 10 utterances = 1,200 samples
Voice cloningSV2TTS, YourTTS, AdaptVC (AVC)Two zero-shot TTS models and one voice-conversion model
Speaker verificationResemblyzer, ECAPA-TDNN, ResNetWhether a clone is accepted as the original speaker
EnhancementSpectral Masking, DeepFilterNet, MP-SENet DNS/VBChange in DSR after attempted perturbation removal
PurificationDe-AntiFakeAn additional attack designed to clean protected speech
BaselinesAntiFake, AttackVC, VoiceGuardSignal-domain proactive defenses

Defense Success Rate (DSR) is the fraction of clones made from protected audio that are rejected as the original speaker. Higher is better. We assessed audio quality with NISQA MOS on a 1–5 scale and measured the time needed to protect input recordings lasting 5–10 seconds.

Protection across three cloning models

Unprotected (RAW) recordings generally produced low DSR because the clones were accepted as the original speakers. RoCo increased DSR for every combination of the three cloning models and three verifiers. On AVC, its mean DSR was 81.5%, compared with 74.8% for AntiFake, 66.9% for VoiceGuard, and 60.1% for AttackVC.

AttackVC and AntiFake had higher averages on SV2TTS, while RoCo reached 84.6%. On YourTTS, RoCo's 75.3% was 1.8 percentage points below AntiFake's leading 77.1%. We assessed these results alongside post-processing resistance and generation time; the highest initial DSR was only one part of the comparison.

CloningVerifierRAWAntiFakeAttackVCVoiceGuardRoCo
SV2TTSResemblyzer0.891.392.775.481.6
ECAPA25.189.396.078.087.2
ResNet13.792.492.782.785.0
YourTTSResemblyzer0.772.245.257.372.8
ECAPA10.680.372.069.879.0
ResNet3.078.973.174.374.1
AVCResemblyzer6.973.237.563.077.5
ECAPA42.179.962.968.682.8
ResNet33.771.379.969.184.3
84.6%SV2TTS mean DSR
75.3%YourTTS mean DSR
81.5%AVC mean DSR

Smaller losses after speech enhancement

We applied Spectral Masking, DeepFilterNet, and the DNS and VoiceBank variants of MP-SENet before cloning. Across 36 combinations of enhancement, cloning, and verification models, the paper reported an average DSR drop of roughly 15 percentage points for RoCo, compared with about 38 points for the baselines.

The table below averages the nine cloning–verification combinations for each enhancement method in Table 2 of the paper. Some MP-SENet DNS combinations fell to 44.7%, while other conditions stayed near 80%. Protection persisted, but its strength varied substantially by condition.

EnhancementMean DSRMinimum–maximumCombinations
Spectral Masking67.8%54.8–78.6%9
DeepFilterNet62.6%49.1–76.5%9
MP-SENet DNS63.6%44.7–78.2%9
MP-SENet VB64.8%52.0–80.4%9

We also tested De-AntiFake purification. On AVC, DSR remained at 77.4% with Resemblyzer, 80.3% with ECAPA, and 79.1% with ResNet. Results ranged from 63.1–79.2% on YourTTS and 49.4–70.5% on SV2TTS. The amount of remaining protection depended on the model, but purification did not remove it entirely.

VerifierSV2TTSYourTTSAVC
Resemblyzer49.4%63.1%77.4%
ECAPA70.5%79.2%80.3%
ResNet65.2%78.2%79.1%

Protecting a 5–10-second recording in 13–22 seconds

The clearest improvement was generation time. In the SV2TTS setting, RoCo took 20 seconds, compared with 113 seconds for AntiFake and 122 for AttackVC. In the YourTTS setting, the corresponding times were 22, 89, and 40 seconds; for AVC, they were 13, 105, and 59 seconds. This was still slower than real time, but substantially shorter than the 1–2 minutes required by some signal-domain configurations.

Time required by AntiFake, AttackVC, and RoCo to protect speech in the SV2TTS, YourTTS, and AVC settings
Time to protect a 5–10-second utterance. RoCo took 13–22 seconds across the three cloning settings. Chart based on Table 5 of the ICASSP 2026 paper.

We also measured quality with NISQA MOS. RoCo's mean MOS was 2.42 before enhancement, rising to 3.23 with DeepFilterNet and 3.17 with MP-SENet DNS. These gains need to be read alongside DSR: enhancement can improve how the audio sounds while also weakening its protection.

EnhancementSV2TTS MOSYourTTS MOSAVC MOSMean across models
None2.72 ± 0.292.09 ± 0.372.44 ± 0.422.42
Spectral Masking2.63 ± 0.732.43 ± 0.643.02 ± 0.732.69
DeepFilterNet3.16 ± 0.733.30 ± 0.783.24 ± 0.693.23
MP-SENet DNS2.97 ± 0.833.42 ± 0.973.13 ± 0.793.17
MP-SENet VB2.11 ± 0.602.21 ± 0.642.38 ± 0.642.23

Remaining limits

Code-level optimization reduced generation time and the average loss of protection after enhancement. The measured 13–22 seconds still falls short of real-time use. The evaluation covered three cloning models and selected enhancement and purification attacks; reconstruction by an attacker who knows the full defense, and testing on a wider range of cloning models, remain follow-up work.

Presenting RoCo in Barcelona

I presented RoCo at IEEE ICASSP 2026, held in Barcelona, Spain, on May 4–8, 2026. The talk introduced the codec-based defense work that led from RoVo to RoCo, then used Figure 1 to explain how perturbation codes, STE, and two-stage optimization changed generation time and resistance to post-processing.

Presenting RoCo's perturbation code, STE, two-stage optimization, and architecture at ICASSP 2026
The ICASSP 2026 oral presentation, with the three design components shown alongside the codec-based defense pipeline. Barcelona, Spain · May 2026.

The demo page lets readers hear what the DSR and MOS measurements describe. For AVC, SV2TTS, and YourTTS, it places the original recording, protected speech, cloned output, enhanced speech, and clones made after enhancement side by side.

Paper and audio samples

The study began in 2025 and was published as a five-page paper in the ICASSP 2026 proceedings, on pages 1671–1675. The IEEE Xplore DOI is 10.1109/ICASSP55912.2026.11462176.

ICASSP 2026 · Oral · Published

RoCo: Robust Code for Fast and Effective Proactive Defense against Voice Cloning Attack

Seungmin Kim, Dain Kim, Sohee Park, Daeseon Choi · ICASSP 2026 · pp. 1671–1675 · May 2026