Skip to main content
  1. Blog/

Wrapping Whisper in a FastAPI Service for Remote Transcription

Author
Chengyu
I’m Chengyu — a final-year Computer Science student at the University of Sydney. I write about the things I build and break, plus hiking, travel, gaming, and gadgets.
Table of Contents

Background
#

Right now my NAS handles audio-to-text conversion, but without a GPU, anything more than a short clip takes hours to process. So I exposed the Whisper instance running on a desktop with a 4060 as an API service instead, and pointed the NAS at it.

Wrapping it
#

Wrote a small FastAPI app that wraps the Whisper model behind an API endpoint capable of accepting an externally-uploaded audio file — loading the medium model and handling transcription requests through a /transcribe/ POST endpoint.

Since it’s only reachable from inside the home network, I skipped token authentication for now.

Related