Get started
Run the project locally: clone the repo, set up the backend and frontend, configure optional environment variables, and deploy to production when ready.
Overview
The project has two parts: a backend (Flask + PyTorch + RawNetLite) that loads the model and serves /health and /predict, and a frontend (Next.js) that proxies those to /api/health and /api/predict. You run both locally for development.
Prerequisites
- Python 3.8+ (for backend)
- Node.js 18+ and npm (for frontend)
- Git (to clone the repository)
- Model checkpoint (
.pt) andRawNetLite.pyin the backend
Installation
Clone the repository and install dependencies for backend and frontend.
git clone https://github.com/zuberkhan01st/Vcs-DeepFake-Audio-Detection cd Vcs-DeepFake-Audio-Detection
Backend
Create a virtual environment, install dependencies, and place the model file in backend/models/.
cd backend python -m venv venv # Windows: venv\Scripts\activate # macOS/Linux: source venv/bin/activate pip install -r requirements.txt # Place your .pt file in backend/models/ # Ensure RawNetLite.py is in backend/
Frontend
From the project root, install and run the Next.js app.
cd web npm install
Configuration
Optional environment variables:
- Backend:
MODEL_ROOT(default:./models),BEST_MODEL(default:augmented_triple_cross_domain_focal_rawnet_lite.pt),PORT(default: 5000). - Frontend:
BACKEND_URLin.env.local(e.g.http://127.0.0.1:5000) if the backend is not on the default.
Download & model
The model checkpoint (.pt) must be in backend/models/ (or MODEL_ROOT). Default filename: augmented_triple_cross_domain_focal_rawnet_lite.pt. You also need RawNetLite.py (model definition) in the backend. Check the project README or release assets for download links.
Running the app
Start the backend first, then the frontend.
Terminal 1 (backend)
cd backend # with venv activated python app.py
Terminal 2 (frontend)
cd web npm run dev
Open http://localhost:3000. Use Detect to upload audio and get predictions.
Production deployment
Run Flask behind a WSGI server (e.g. Gunicorn) and the Next.js app behind a reverse proxy (e.g. Nginx). Use environment variables for BACKEND_URL, MODEL_ROOT, and secrets. Docker support may be added in a future release.
Next steps
- Deployment โ host locally or on a VPS, Nginx, SSL, security.
- API reference โ endpoints, schemas, code examples.
- Mission โ why we build this and how to contribute.