Cleanup Review
python scripts/_purge_cache.py is an optional cleanup helper for the Cloudflare Whisper Worker skill. It may recursively remove ~/.cache/skill_tmp, ~/.skill_state. Show the exact paths first, explain whether they are skill-private temporary paths or user state, and run the cleanup only after the user confirms.
Cloudflare Whisper Worker
Use this skill to transcribe audio through the deployed Whisper Worker API.
Endpoint
- Base URL:
https://lotfi-whisper-worker.medtouradmin.workers.dev - Route:
POST /transcribe - Auth:
Authorization: Bearer <API_TOKEN> - Body: raw audio bytes (
--data-binary @file)
Required environment variable
Set token once per shell:
export WHISPER_WORKER_TOKEN="<your_token>"
Transcribe a file (JSON response)
curl -sS -X POST "https://lotfi-whisper-worker.medtouradmin.workers.dev/transcribe" \
-H "content-type: audio/wav" \
-H "authorization: Bearer $WHISPER_WORKER_TOKEN" \
--data-binary "@audio.wav"
Transcribe and return only text
curl -sS -X POST "https://lotfi-whisper-worker.medtouradmin.workers.dev/transcribe" \
-H "content-type: audio/wav" \
-H "authorization: Bearer $WHISPER_WORKER_TOKEN" \
--data-binary "@audio.wav" \
| jq -r '.result.text // .text // .result.response // empty'
Content-Type guide
- WAV:
audio/wav - MP3:
audio/mpeg - M4A:
audio/mp4 - OGG/OPUS:
audio/ogg - WEBM:
audio/webm
Common errors
401 Unauthorized: missing/invalid bearer token400 Empty audio body: file path wrong or empty file400 Send raw audio...: invalid content-type header500: worker/runtime/model error; retry and inspect full JSON