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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file audio_sleuth-0.0.2.tar.gz.

File metadata

  • Download URL: audio_sleuth-0.0.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for audio_sleuth-0.0.2.tar.gz
Algorithm Hash digest
SHA256 30f6bde25b3f572dc1c3a4dabc056330f813217785f715fa3ae25d3db1179a9c
MD5 9af78fb181e3a6909d4c30f222f7cbb8
BLAKE2b-256 d31aaabc7778c3ea9e1dee1228c81d4373de238f9d39cbaf0453013c3f391071

See more details on using hashes here.

File details

Details for the file audio_sleuth-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: audio_sleuth-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for audio_sleuth-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7020cddddd049be91293966aaff9b28785f1e95466e471a197712c4a9d0745d
MD5 f537da547aa9386023f47e1363deb59f
BLAKE2b-256 b7caab9d5744864db53e313b04dbc0ae58a567d56138ae3f92c36a951a293a78

See more details on using hashes here.

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