This project was developed during the AIAmplify Hackathon, a 24-hour hackathon focused on using AI to address real-world challenges. The goal of this project is to detect deepfake audio using machine learning techniques. The project uses MFCC (Mel-frequency cepstral coefficients) features extracted from audio files and a Support Vector Machine (SVM) classifier to differentiate between genuine and deepfake audio.
- Noor Chauhan
- Abhishek Khadgi
- Omkar Sapkal
- Himanshi Shinde
- Furqan Ali
To initialize the project, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/your-username/deepfake-audio-detection.git cd deepfake-audio-detection
-
Set up a virtual environment (optional but recommended):
# For Windows python -m venv venv venv\Scripts\activate # For Linux/macOS python3 -m venv venv source venv/bin/activate
-
Install the required dependencies
To train the SVM model with the provided data, follow these steps:
-
Prepare the dataset: Place genuine audio files in the
real_audio
directory and deepfake audio files in thedeepfake_audio
directory. -
Run the training script:
python main.py
After sucessfully running the main script, it will initially ask you to provide the path of the voice to analyze, provide it with the path and the
-
Run the web app by:
python app.py
The training script will extract MFCC features from the audio files, split the data into training and testing sets, scale the features, train the SVM model, and save the trained model and scaler for future use.
To classify an audio file as genuine or deepfake, follow these steps:
-
Ensure the trained model and scaler are available (already saved during training).
-
Run the analysis script:
python analyze_audio.py path/to/your/audio/file.wav
Replace
path/to/your/audio/file.wav
with the path to the audio file you want to analyze. The script will extract MFCC features from the audio, scale the features using the saved scaler, pass the features to the trained SVM model, and display the classification result.
- For contributing, fork this project and compare and submit a pull request with proper description to your changed/added features
- OpenSource MIT License, for more information read the License.