/ Модель

Характеристики

Архитектура
hyperion_deepfake_detector · dense
Библиотека
pytorch
Опубликована
30 сен 2026

hyperion-baseline-deepfake-detector

Классификация аудиоАудио → label

Модель Hyperion на основе wav2vec2-XLS-R классифицирует аудиозаписи как подлинные или поддельные для обнаружения аудиодипфейков и спуфинга.

24скачиваний за 30 дней0лайковвеса обновлены30 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Hyperion Deepfake Detector Baseline — модель классификации аудио, опубликованная пользователем RuiRuihigh. Она определяет, является ли запись подлинной речью или подделкой, и возвращает метку bonafide или spoof с оценками классов. Модель предназначена для локального пакетного или одиночного анализа аудиофайлов через командную строку или Python API.

В основе лежит facebook/wav2vec2-xls-r-300m с классификатором Hyperion wav2vec2 и головой ResNet1D x-vector. Это одноцелевая модель, дообученная от stage-1 чекпойнта без дополнительной вспомогательной головы. На вход подаётся монофоническая звуковая дорожка, автоматически приводимая к частоте 16 кГц; исходные веса и необходимые модули Hyperion размещены в репозитории. Для работы требуется локально доступный код inference.py и зависимости проекта.

Модель подходит для первичной фильтрации подозрительных аудиозаписей и обнаружения спуфинга. CPU-инференс может быть медленным из-за крупного бэкбона XLS-R на 300 млн параметров. Лицензия в предоставленных данных не указана.

Сценарии применения

  • проверка аудиозаписи на дипфейк
  • обнаружение поддельной или синтетической речи
  • классификация записи как подлинной или spoof
  • пакетный анализ аудиофайлов на спуфинг

Ограничения

CPU-инференс может быть медленным из-за бэкбона wav2vec2-xls-r-300m. Для запуска требуются vendored-модули Hyperion и зависимости репозитория.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Hyperion Deepfake Detector (Baseline)

This repository packages a Hyperion single-task audio deepfake detector for local inference from a cloned Hugging Face repository. The needed Hyperion runtime code is included under hyperion/, so you do not need a separate Hyperion checkout for inference.

Model

  • Backbone: facebook/wav2vec2-xls-r-300m
  • Classifier: Hyperion wav2vec2 + ResNet1D x-vector head
  • Training variant: single-task (spoof/bonafide only, no auxiliary head), sampling balanced by dataset_type, fine-tuned from stage-1 model
  • Source checkpoint: fbank80_stmn_trainset_4_wav2vec2xlsr300m_dataset_type.s2/model_ep0001.pth
  • Input: mono waveform, resampled to 16 kHz
  • Output labels: bonafide, spoof
  • Packaged checkpoint: model.pth

Setup

Create a Python 3.10 conda environment, clone the repository, and install dependencies:

conda create -n hyperion_infer python=3.10 -y
conda activate hyperion_infer

git lfs install
git clone https://huggingface.co/RuiRuihigh/hyperion-baseline-deepfake-detector
cd hyperion-baseline-deepfake-detector

pip install -r requirements.txt

Confirm that the model checkpoint was downloaded by Git LFS:

ls -lh model.pth

If model.pth is only a few KB, run:

git lfs pull

Command Line Inference

Run inference from inside the cloned repository:

python inference.py example.wav --model-dir .

By default, the script uses GPU automatically when CUDA is available. If CUDA is not available, it falls back to CPU.

For multiple audio files:

python inference.py a.wav b.wav c.wav --model-dir . --batch-size 8

Force CPU inference:

python inference.py example.wav --model-dir . --device cpu

Force GPU inference:

python inference.py example.wav --model-dir . --device cuda

Command Line Arguments

  • audio: one or more input audio files to classify. Example: example.wav or a.wav b.wav c.wav.
  • --model-dir: directory containing config.json, model.pth, and the vendored hyperion/ code. Default: ..
  • --device: inference device. Choices: auto, cpu, cuda. Default: auto, which uses CUDA if available and otherwise uses CPU.
  • --batch-size: number of audio files processed per batch when more than one input file is provided. Default: 8.

Example output:

{
  "label": "bonafide",
  "score": 0.9998749494552612,
  "scores": {
    "bonafide": 0.9998749494552612,
    "spoof": 0.00012498960131779313
  }
}

Python API

If your Python script is inside the cloned repository, load the local model directory with from_local_dir:

from inference import DeepfakeDetector

detector = DeepfakeDetector.from_local_dir(".")
result = detector.predict("example.wav")
print(result)

from_local_dir(".") also uses GPU automatically when CUDA is available. To force a device:

detector = DeepfakeDetector.from_local_dir(".", device="cpu")
# or
detector = DeepfakeDetector.from_local_dir(".", device="cuda")

Batch inference:

from inference import DeepfakeDetector

detector = DeepfakeDetector.from_local_dir(".")
results = detector.predict_batch(["a.wav", "b.wav", "c.wav"], batch_size=8)

for result in results:
    print(result)

If your Python script is outside the cloned repository, add the cloned repository to PYTHONPATH or run the script from this directory, and pass the full model directory path:

from inference import DeepfakeDetector

detector = DeepfakeDetector.from_local_dir("/path/to/hyperion-baseline-deepfake-detector")
result = detector.predict("/path/to/example.wav")
print(result)

Python API Arguments

  • DeepfakeDetector.from_local_dir(model_dir, device=None): loads config.json and model.pth from a local model directory. device=None means auto-select CUDA if available, otherwise CPU.
  • DeepfakeDetector.from_pretrained(repo_id, device=None): downloads config.json and model.pth from a Hugging Face repo, then loads the model. This still requires inference.py and the vendored hyperion/ code to be importable locally.
  • detector.predict(audio_path): runs inference for one audio file and returns a dictionary with label, score, and scores.
  • detector.predict_batch(audio_paths, batch_size=8): runs batched inference for a list of audio files.

Files

  • inference.py: command line inference and Python API.
  • config.json: model metadata and runtime settings.
  • model.pth: checkpoint containing model_cfg and model_state_dict.
  • hyperion/: vendored runtime modules needed to reconstruct the model.
  • requirements.txt: Python dependencies.

Notes

  • --model-dir . means the model files are in the current directory.
  • CPU inference can be slow because the model uses wav2vec2-xls-r-300m.
  • Audio is loaded with soundfile and resampled to 16 kHz when needed.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · audio-classification

Нельзя запустить

Архитектура hyperion_deepfake_detector неизвестна transformers в образе рантайма.

Ревизия весов
89e8acb

0 моделей