Spaces:
Sleeping
Sleeping
File size: 779 Bytes
9e5239c 5aea4af 9e5239c 5aea4af | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ---
title: Whisper.cpp
emoji: 🦀
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
---
Minimal REST API for Whisper.cpp on free CPU Spaces.
Endpoints
- GET /health: liveness check
- POST /v1/transcribe: multipart file upload (audio/video). Returns JSON with text and per-segment metadata.
Quick use
```bash
curl -s -X POST \
-F "file=@sample.mp3" \
https://<your-space-subdomain>.hf.space/v1/transcribe | jq
```
Environment
- WHISPER_MODEL: model name (e.g. tiny.en, base.en, small). Default tiny.en.
- WHISPER_THREADS: number of CPU threads to use. Default 4.
Notes
- Uses pywhispercpp wheels (no compile) + ffmpeg to handle non-WAV inputs.
- Weights cache in ephemeral storage. For persistence, add a storage upgrade and set HF_HOME=/data/.huggingface.
|