Whisper-based transcription with both CLI and Web App modes.
- Browser upload flow for audio/video files
- Docker-first startup with CUDA acceleration
- Optional Cloudflare Tunnel sidecar for public access
- English (this file)
- 繁體中文: README.zh-TW.md
The web app is implemented with FastAPI and serves both frontend and API from one process.
Architecture:
Browser <--HTTPS--> Cloudflare Tunnel <--> Docker (FastAPI:80) <--> transcribe() API
|
CUDA GPU
GET /— Embedded frontend pagePOST /api/transcribe— Upload file + create transcription jobGET /api/jobs— List jobsGET /api/jobs/{job_id}— Poll job statusGET /api/jobs/{job_id}/download/{filename}— Download outputs
A completed job may include:
out.srtout.vttout.txtout.jsonspeaker.json(only when supported by backend/options)
./install
source activate
transcribe-anything-webOpen: http://localhost:80
- Create
.envin project root:
CLOUDFLARE_TUNNEL_TOKEN=your-tunnel-token-here- Build and run:
docker compose up --build -d- Open local web app:
http://localhost:8092
- Stop:
docker compose downThe Docker image prewarms backend environments to reduce first-request latency:
transcribe-anything-init-cudatranscribe-anything-init-insane
The image defaults to web mode:
ENTRYPOINT ["/app/entrypoint.sh"]CMD ["--web"]
- Configures CUDA runtime library paths
- Runs shared-library checks
- Starts web server for
--web
docker-compose.yml defines:
transcribe- Built from local
Dockerfile - Port mapping:
8092:80 - Volume:
transcribe-data:/app/data - Env:
MAX_UPLOAD_SIZE_MB=0NVIDIA_VISIBLE_DEVICES=all
- Built from local
cloudflared- Image:
cloudflare/cloudflared:latest - Command:
tunnel run - Env:
TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
- Image:
- Create a Tunnel in Cloudflare Zero Trust.
- Put token into
.envasCLOUDFLARE_TUNNEL_TOKEN. - Configure public hostname service target to:
http://transcribe:80
- Restart stack:
docker compose down
docker compose up -d- App-side upload limit is controlled by
MAX_UPLOAD_SIZE_MB(default unlimited; set0,none, orunlimitedfor no limit). - Cloudflare edge upload limits may still apply on public URLs.
- For very large uploads, use local endpoint
http://localhost:8092.
CLI examples:
transcribe-anything video.mp4 --device cpu
transcribe-anything video.mp4 --device cuda
transcribe-anything video.mp4 --device insane --batch-size 8
transcribe-anything video.mp4 --device mlxPython API:
from transcribe_anything import transcribe
transcribe(
url_or_file="video.mp4",
output_dir="output_dir",
task="transcribe",
model="small",
device="cuda",
)- Setup:
./install && source activate - Tests:
./test - Lint:
./lint --no-ruff - Clean:
./clean
- Originally derived from transcribe-anything
BSD-3-Clause