Scamurai is an AI-powered system that detects deepfake audio from voicemails or recordings. It uses a deep learning model (RawNet2) to analyze raw audio and determine whether a voice is real or AI-generated.
Due to the rise of AI-generated voices, scams have become a lot more convincing and harder to detect. It is especially harder for the elderly who are targeted through phone calls and voicemails. We wanted to build a tool that would help people verify whether a voice is real or fake, before they act on it.
- Upload or record audio
- Detect deepfake vs real voice
- Fast inference using trained model
- Designed for mobile app integration (SwiftUI)
We built Scamurai using RawNet2. It is a deep learning model that processes raw audio directly.
This is how the code works:
- Upload an audio file (voicemail or recording)
- Preprocessing of the file (resampling, trimming, normalization)
- Deep learning model: Audio -> Sinc Filters -> Residual CNN -> GRU -> Prediction
- Outputs Real or Fake with a confidence score
We trained the model using a gender-based labeled dataset of real and spoofed audio, and integrated the system with a mobile app where users can upload audio for analysis.
- PyTorch – Deep learning framework
- RawNet2 – Deepfake audio detection model
- FastAPI – Backend API
- SwiftUI – iOS frontend
Audio Processing: NumPy, SciPy, SoundFile
Languages: Python, Swift
pip install -r requirements.txt
python server.py
Server will run at:
http://localhost:8000
- Go to settings in your iPhone and turn on Developer Mode
- Open the application in XCode
- Connect your iPhone through a USB cable and select it in Device Selector
- Go to Signing & Capabilities and select your Apple ID under Team
- Click the Run button
POST /analyze
Audio file (.wav)
Example (Python request):
import requests
files = {"file": open("sample.wav", "rb")}
response = requests.post("http://localhost:8000/analyze", files=files)
print(response.json())
{
"label": "bonafide",
"confidence": 0.93
}
python infer.py path/to/audio.wav
In the future, we plan to:
- Improve accuracy even more with larger and more diverse datasets
- Enable real-time call detection
- Improve accessibility for elderly users
Scamurai helps make phone calls safer by giving users a simple way to verify authenticity in an age of AI-generated content.
Spot the fake. Trust the real.
