Official code for our source tracing work on codec-based deepfake speech. Pretrained model checkpoints are hosted on Hugging Face.
π Towards Generalized Source Tracing for Codec-Based Deepfake Speech received a Best Student Paper Nomination (Top 2.5%) at IEEE ASRU 2025.
Download the CodecFake+ dataset from Hugging Face.
CodecFake+/
βββ all_data_16k/ # CoRS + maskgct_vctk set
β βββ p225_001_audiodec_24k_320d.wav
β βββ p225_001_bigcodec.wav
β βββ ....
β βββ s5_400_xocdec_hubert_general_audio.wav
βββ SLMdemos_16k/ # CoSG set
βββ SIMPLESPEECH1/
βββ VIOLA/
βββ ....
βββ MASKGCT/
Note: The tree above and the
metadata/files in this repository use the file names from our internal copy of the dataset. The public release on Hugging Face uses a different layout (Codecfake_plus_CoRS/andCoSG/) and different CoSG file names, so the paths need to be adapted before running the scripts.
-
- Place
xlsr2_300m.ptdirectly intow2v2_aasist_baseline/
- Place
-
- Create directory
Pretrain_weightinsideSAST_Net/ - Download and place the following checkpoints in
SAST_Net/Pretrain_weight:
Model Description Download xlsr2_300m.pt Wav2Vec2 pretrained weight Download mae_pretrained_base.pth AudioMAE pretrained on AudioSet Download tuned_weight.pth Wav2Vec2-AASIST on CodecFake+ Download - Create directory
conda env create -f environment.yml
conda activate CodecFakeSourceTracing-
- BIN: Binary spoof detection task
- VQ: Vector quantization source tracing task
- AUX: Auxiliary training objective source tracing task
- DEC: Decoder type source tracing task
-
- vq: VQ taxonomy sampling (MVQ : SVQ : SQ = 1:1:1)
- aux: AUX taxonomy sampling (None : Semantic Distillation : Disentanglement = 1:1:1)
- dec: DEC taxonomy sampling (Time : Freqency = 1:1)
-
Single-Task Learning Models
Model Task Trained Dataset Download Links S_BIN BIN vq / aux / dec vq β’ aux β’ dec S_VQ VQ vq Download S_AUX AUX aux Download S_DEC DEC dec Download -
Model Task Trained Dataset Download Links SAST Net BIN vq / aux / dec vq β’ aux β’ dec VQ vq Download AUX aux Download DEC dec Download
-
cd w2v2_aasist_baseline/ bash inference.sh ${dataset_type} ${base_dir} ${checkpoint_path} ${model_type}
Parameters:
dataset_type:"CoRS"or"CoSG"base_dir: Path to dataset directory- For CoRS:
"CodecFake+/all_data_16k/" - For CoSG:
"CodecFake+/SLMdemos_16k/"
- For CoRS:
checkpoint_path: Path to model checkpointmodel_type:S_BIN/S_VQ/S_AUX/S_DEC/D_VQ/D_AUX/D_DEC/M1/M2
-
cd SAST_Net/ bash inference.sh ${base_dir} ${dataset_type} ${checkpoint_path} ${task} ${eval_output}
Parameters:
base_dir: Path to dataset directorydataset_type:"CoRS"or"CoSG"checkpoint_path: Path to model checkpointtask:Bin/AUX/DEC/VQeval_output: Results directory (default:"./Result")
-
cd w2v2_aasist_baseline/ bash train.sh ${base_dir} ${batch_size} ${num_epochs} ${lr} ${model_type} ${sampling_strategy}
Parameters:
base_dir: Path to"CodecFake+/all_data_16k/"batch_size: Batch size (default:8)num_epochs: Training epochs (default:20)lr: Learning rate (default:1e-06)model_type:S_BIN/S_VQ/S_AUX/S_DEC/D_VQ/D_AUX/D_DEC/M1/M2sampling_strategy:VQ/AUX/DEC
-
cd SAST_Net bash train.sh ${base_dir} ${save_dir} ${batch_size} ${num_epochs} ${lr} ${task} ${sampling_strategy} ${mask_ratio}
Parameters:
base_dir: Path to"CodecFake+/all_data_16k/"save_dir: Checkpoint save directory (default:./models_SAST_Net)batch_size: Batch size (default:12)num_epochs: Training epochs (default:40)lr: Learning rate (default:5e-06)task:Bin/VQ/AUX/DECsampling_strategy:VQ/AUX/DECmask_ratio: MAE mask ratio (default:0.4)
If this work helps your research, please consider citing our papers:
@inproceedings{chen2025codec,
title = {Codec-Based Deepfake Source Tracing via Neural Audio Codec Taxonomy},
author = {Chen, Xuanjun and Lin, I-Ming and Zhang, Lin and Du, Jiawei and Wu, Haibin and Lee, Hung-yi and Jang, Jyh-Shing Roger},
booktitle = {{INTERSPEECH 2025}},
pages = {1538--1542},
year = {2025},
doi = {10.21437/Interspeech.2025-1297}
}
@inproceedings{chen2025towards,
title = {Towards Generalized Source Tracing for Codec-Based Deepfake Speech},
author = {Chen, Xuanjun and Lin, I-Ming and Zhang, Lin and Wu, Haibin and Lee, Hung-yi and Jang, Jyh-Shing Roger},
booktitle = {2025 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU)},
pages = {1--8},
year = {2025},
doi = {10.1109/ASRU65441.2025.11434771}
}
@article{chen2026codecfake+,
title = {{CodecFake+}: Codec-Based Resynthesized Data as a Proxy for Detecting {CodecFake} Speech},
author = {Chen, Xuanjun and Du, Jiawei and Wu, Haibin and Zhang, Lin and Lin, I-Ming and Chiu, I-Hsiang and Ren, Wenze and Tseng, Yuan and Tsao, Yu and Jang, Jyh-Shing Roger and Lee, Hung-yi},
journal = {IEEE Transactions on Audio, Speech and Language Processing},
volume = {34},
pages = {2929--2944},
year = {2026},
doi = {10.1109/TASLPRO.2026.3692291}
}