31 lines
770 B
Markdown
31 lines
770 B
Markdown
# whisper-remote-backend
|
|
|
|
FastAPI wrapper around the upstream `whisper` CLI from `openai/whisper`.
|
|
|
|
Package layout is flat in this folder: `src/server.py`.
|
|
|
|
## Run
|
|
|
|
```bash
|
|
pip install -e .
|
|
uvicorn server:app --app-dir src --host 0.0.0.0 --port 8000
|
|
```
|
|
|
|
## API
|
|
|
|
`POST /transcriptions`
|
|
|
|
Multipart form fields:
|
|
|
|
- `file`: media file
|
|
- `model`: Whisper model name
|
|
- `language`: optional language code
|
|
- `output_format`: `txt`, `vtt`, `srt`, `tsv`, or `json`
|
|
|
|
The response body is the transcript artifact itself. The backend deletes the uploaded file and generated output after each request.
|
|
|
|
## Notes
|
|
|
|
- The backend host must already have the upstream `whisper` command on `PATH`.
|
|
- The included Gitea Actions workflow runs backend tests and package builds automatically.
|