Run OpenAI's Whisper speech-to-text model locally in a Docker container, with a simple Python API for file uploads and transcription.
- No API keys required – runs entirely on your machine.
- Transcribe large files – not limited by OpenAI's 25MB API restriction.
- Simple HTTP API – upload audio/video files and get JSON transcriptions.
- No extra Python dependencies – uses only Python standard library and Whisper CLI.
git clone https://github.com/jaypetersdotdev/local-whisper.git
cd local-whisperdocker build -t whisper-api .docker run -p 5001:5001 whisper-api- The API will be available at http://localhost:5001/transcribe
Send a POST request with your file as form-data (field name: file):
curl -F "file=@your-audio-file.mp3" http://localhost:5001/transcribe- Use the "HTTP Request" node
- Method:
POST - URL:
http://localhost:5001/transcribe - Request Format:
Form-Data - Field Name:
file - Type:
File - Value: (reference to your binary file, e.g.
{{$binary.data}})
You will receive a JSON object with the transcription and segment timings.
- Docker
- (No OpenAI API key required)
- Sufficient CPU and RAM for Whisper (large files/models require more resources)
- This API is for local or trusted use only. The multipart parser is minimal and not hardened for public internet exposure.
- The default model is
small. You can change this inapi_server.pyif you want to use a different Whisper model.
- YouTube channel: Jay Peters - @jaypetersdotdev
- FREE workflows and resources: Learn Automation & AI
MIT (or your preferred license)
Pull requests and issues welcome!