Skip to content

Deepfake voice detection service (Excellence Award, information security contest, 2025.04)

2025.04
Flask model server — changing how overlapping requests are handled FIRST · QUEUE + WORKER THREAD Audio upload Flask /analyze Queue it, reply at once No result in the reply The frontend never gets the verdict FINAL · LOCK, ONE AT A TIME Audio upload Flask /analyze · file checks Global lock Inference one at a time Spoof score + transcript Mine: Flask server · Teammates: detection model (ReDimNet), frontend (React)

Problem

My teammates' detection model and transcription only ran from the command line. Uploading audio from the web and getting a result back needed a server, and heavy inference requests could overlap.

My part

Built an upload API (/analyze) in Flask with file-type and 16 MB limits, filename sanitizing, CORS for the frontend, and a conversion from the raw model score to a 0–1 verdict. I first handled overlapping requests with a queue and a worker thread, but that only sent back an acknowledgement, so the frontend never got the result. I switched to a global lock that runs inference one request at a time and returns the score and transcript in the response.

Result

Finished a service where uploading audio from the frontend returns per-segment spoof scores together with a transcript. Excellence Award at the Future & Software information security contest.
PythonFastAPIOracle CloudDocker