an open-source framework for detecting audio generated from generative systems
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for audio_sleuth-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7020cddddd049be91293966aaff9b28785f1e95466e471a197712c4a9d0745d |
|
MD5 | f537da547aa9386023f47e1363deb59f |
|
BLAKE2b-256 | b7caab9d5744864db53e313b04dbc0ae58a567d56138ae3f92c36a951a293a78 |