Coder Social home page Coder Social logo

simpleaudiodeepfakedetection's Introduction

Deepfake Speech Detection Project

This project focuses on detecting deepfake speech using a combination of Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN).

Project Outline

  1. Data Preparation

    • Audio files are organized into a directory structure with 'data/fake' and 'data/real' subdirectories.
    • The generateDataCSV.py script is used to generate CSV files for organizing the audio dataset into training, validation, and evaluation sets.
  2. Data Preprocessing

    • The train1.py script preprocesses the audio files to extract MFCC features.
    • MFCC features are saved to disk for future use.
  3. Model Training

    • The train1.py script defines a CNN-RNN model and trains it on the preprocessed data.
    • The trained model is evaluated on the validation and test data.
  4. Model Evaluation

    • The eval.py script evaluates the trained model on the test data.
  5. Running the Application

    • The app.py script uses the trained model to classify audio files and creates a web-based user interface using Streamlit.

Step-by-Step Guide

1. Prepare Data

  1. Place your audio dataset in the following directory structure:

    /path/to/root/dataset/
    ├── data
    │   ├── fake
    │   └── real
    ├── generateDataCSV.py
    ├── train1.py
    ├── eval.py
    └── app.py
    
  2. Run the generateDataCSV.py script to generate CSV files for organizing the audio dataset:

    python generateDataCSV.py
    • The generated CSV files will be saved in the csvFilesReduced directory, as evaluate train and validate.csv.

2. Train the Model

  1. Run the train.py script to train the model:
    python train.py

1.1. You may also Run the trainProcessedSample.py script to train the model, here features are already extracted of a large dataset:

python trainProcessedSample.py

3. Evaluate the Model

  1. Run the eval.py script to evaluate the trained model:
    python eval.py

4. Run the Application

  1. Run the app.py script to start the application:
    streamlit run app.py

Notes

  • This is a basic model implementation. Feel free to modify and enhance it based on your requirements and dataset.

simpleaudiodeepfakedetection's People

Contributors

anmol2059 avatar

Stargazers

Pei Chengdong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.