Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Deepfake Audio Detector (V2)

Python Version Scikit-Learn Librosa License

An advanced Python-based machine learning project designed to detect AI-generated speech (deepfakes). This is the highly optimized Version 2 of the system, upgrading the core architecture to utilize a Non-Linear Radial Basis Function (RBF) Support Vector Machine for state-of-the-art classification.

✨ Features

  • Advanced Feature Extraction: Extracts 98 distinct features per audio file, including 13 MFCCs + Deltas, Spectral Centroid, Spectral Contrast, Spectral Rolloff, and Zero-Crossing Rate (ZCR).
  • Audio Preprocessing: Automatically detects and trims silence from audio files before processing to ensure high-quality statistical mapping.
  • Robust Classification: Uses a Non-Linear Support Vector Machine (RBF kernel) dynamically optimized with strict GridSearchCV parameters for maximum generalization.
  • Explainable AI: Adapts visual explainability proxies for non-linear feature variances to provide insights and explain the model's predictions.

🚀 Getting Started

Prerequisites

Ensure you have Python 3.8 or higher installed. You will also need pip for installing the required packages.

Installation

  1. Clone this repository to your local machine:
    git clone https://github.com/DevAlnahari/Deepfake-Audio-Detector-V2.git
    cd Deepfake-Audio-Detector-V2
  2. Install the required dependencies:
    pip install -r requirements.txt

📂 Project Structure & Usage

Before running the model, ensure your dataset is properly organized into the following directory structure:

.
├── 📁 Train/
│    ├── 📁 Real/
│    └── 📁 Fake/
├── 📁 Val/
│    ├── 📁 Real/
│    └── 📁 Fake/
└── 📁 uploads/

Once your dataset is organized, run the main script to start extracting features and training the model:

python main.py

📊 Performance Metrics

The model has been evaluated on a comprehensive validation dataset with the following results:

  • Model Architecture: Non-Linear SVM (kernel='rbf', class_weight='balanced')
  • Validation Dataset Size: 1,846 audio files
  • Accuracy: 99.13%

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

📄 License

This project is open-source and available under the MIT License.

About

An advanced Deepfake Audio Detector (V2) utilizing an RBF Support Vector Machine and 98-D acoustic features to achieve 99.13% accuracy.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages