Skip to content

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodecFake Source Tracing

INTERSPEECH 2025 IEEE ASRU 2025 IEEE TASLP 2026 Dataset Checkpoints Audio Demo

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.

πŸ› οΈ Setup

Dataset Download

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/ and CoSG/) and different CoSG file names, so the paths need to be adapted before running the scripts.

Pretrained Weights Setup

  • For Wav2Vec2-AASIST

    • Place xlsr2_300m.pt directly into w2v2_aasist_baseline/
  • For SAST Net

    • Create directory Pretrain_weight inside SAST_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

Environment Setup

conda env create -f environment.yml
conda activate CodecFakeSourceTracing

πŸš€ Inference

Notation

  • Tasks

    • BIN: Binary spoof detection task
    • VQ: Vector quantization source tracing task
    • AUX: Auxiliary training objective source tracing task
    • DEC: Decoder type source tracing task
  • Training Subsets

    • 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)

Model Checkpoints

  • Wav2Vec2-AASIST

    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
    Dual-Task Learning Models
    Model Task Trained Dataset Download Links
    D_VQ BIN / VQ vq Download
    D_AUX BIN / AUX aux Download
    D_DEC BIN / DEC dec Download
    Multi-Task Learning Models
    Model Task Trained Dataset Download Links
    M1 BIN / VQ / AUX / DEC vq / aux / dec vq β€’ aux β€’ dec
    M2 VQ / AUX / DEC vq / aux / dec vq β€’ aux β€’ dec
  • SAST Net

    Model Task Trained Dataset Download Links
    SAST Net BIN vq / aux / dec vq β€’ aux β€’ dec
    VQ vq Download
    AUX aux Download
    DEC dec Download

Running Inference

  • Wav2Vec2-AASIST

    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/"
    • checkpoint_path: Path to model checkpoint
    • model_type: S_BIN / S_VQ / S_AUX / S_DEC / D_VQ / D_AUX / D_DEC / M1 / M2
  • SAST Net

    cd SAST_Net/
    bash inference.sh ${base_dir} ${dataset_type} ${checkpoint_path} ${task} ${eval_output}

    Parameters:

    • base_dir: Path to dataset directory
    • dataset_type: "CoRS" or "CoSG"
    • checkpoint_path: Path to model checkpoint
    • task: Bin / AUX / DEC / VQ
    • eval_output: Results directory (default: "./Result")

🎯 Training

  • Wav2Vec2-AASIST

    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 / M2
    • sampling_strategy: VQ / AUX / DEC
  • SAST Net

    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 / DEC
    • sampling_strategy: VQ / AUX / DEC
    • mask_ratio: MAE mask ratio (default: 0.4)

πŸ“š Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages