Skip to main content

an open-source framework for detecting audio generated from generative systems

Project description

animated

Audio Sleuth

A torch based open-source framework for detecting audio generated from generative systems. The overarching goal of this repository is to be a toolbox for datasets, augmentations, and pretrained baseline models to assist researchers in the task of audio deepfake detection.

Install

To install, simply use pip:

pip install audio-sleuth

Usage

The goal of this package is to contain augmentations, models, and losses all as a torch.nn.Module class. Each augmentation contains an internal LabelAlignment such that you can implement various time-frequency transformations to automatically translate the sample-wise labels as well.

Here is an example of how to chain together augmentations on the Half Truth Dataset.

from audio_sleuth.augmentations import Resample, LFCC, Augmentations
from audio_sleuth.data.datasets import HalfTruthDataset 

# Augmentation chain
transform = Augmentations(
  [
    Resample(input_sr=48000, new_sr=16000, return_original_sr=False), # Downsample block
    LFCC(
      fs=16000, n_fft=512, hop_size=128, win_size=128, n_filters=128, n_lfcc=40 # LFCC augmentation
    )
  ]
)

# Returns torch Dataset that can be fed into DataLoader
dataset = HalfTruthDataset(
  path_to_txt, # Initialize to your txt file of filepaths and labels from dataset
  fs=16000,
  transform = transform
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audio_sleuth-0.0.2.tar.gz (11.3 kB view hashes)

Uploaded Source

Built Distribution

audio_sleuth-0.0.2-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page