Instructions to use JunXueTech/LaST-Net with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Fairseq
How to use JunXueTech/LaST-Net with Fairseq:
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub models, cfg, task = load_model_ensemble_and_task_from_hf_hub( "JunXueTech/LaST-Net" ) - Notebooks
- Google Colab
- Kaggle
File size: 1,803 Bytes
7b18ff0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ---
tags:
- audio
- speech-deepfake-detection
- pytorch
- fairseq
base_model: facebook/wav2vec2-xls-r-300m
---
# LaST-Net
Model weights for **LaST-Net: Length-Aware Layer and Scale-Adaptive Temporal Network for Speech Deepfake Detection**.
**Training and inference code:** [JunXue-tech/LaST-Net](https://github.com/JunXue-tech/LaST-Net).
## Checkpoint
`best.pt` is the original epoch-52 checkpoint selected by the lowest mean development EER across 1, 2, 4 and 6 seconds on ASVspoof 2019 LA. It includes the fine-tuned XLS-R 300M frontend, LaST-Net backend, optimizer state and original training metadata.
## Usage
Follow the environment setup in the [code repository](https://github.com/JunXue-tech/LaST-Net). From that repository:
```bash
python download_model.py
python infer.py example.wav --checkpoint checkpoints/best.pt \
--ssl-path /path/to/xlsr2_300m.pt --seconds 6
```
The model constructor requires the original fairseq-format XLS-R 300M checkpoint, available from the [official XLS-R repository](https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec/xlsr), before loading the fine-tuned parameters from `best.pt`.
Input audio must be mono at 16 kHz. The supplied inference code evaluates 1–6 second inputs using prefix cropping and repetition of shorter recordings. Higher `bonafide_log_score` values favor bona fide speech. Scores are not calibrated probabilities.
## Evaluation
Duration-averaged EER (%) across 1–6 second inputs: 19LA **1.29**, 21LA **4.98**, 21DF **3.62**, and In-the-Wild **7.58**. Per-duration results and evaluation commands are provided in the code repository. Results depend on the evaluation protocol and preprocessing.
## Author
Jun Xue — [junxue@whu.edu.cn](mailto:junxue@whu.edu.cn)
|