GPU Compute / Recipe
Audio and transcription jobs
Run Whisper batch transcription or audio processing pipelines as one-off GPU jobs. Billing stops when the script exits — no persistent endpoint needed for occasional workloads.
npm install -g badgr-cli then badgr login. Setup guide →Shortcut: badgr transcribe
For a single file or URL, badgr transcribe handles everything — no script needed. Accepts local files ≤50 MB, public URLs, or S3/GCS URIs:
# Local file badgr transcribe audio.mp3 # Public URL badgr transcribe https://example.com/recording.mp3 # S3 URI badgr transcribe s3://my-bucket/audio/interview.wav
Outputs transcript to stdout. Use --output txt or --output json to change the output format. Use badgr run below for batch jobs or custom pipelines.
Batch transcription with Whisper
Run a Python script that transcribes a folder of audio files. Point Badgr at your project folder — it uploads your script and audio files, and mounts them at /app:
badgr run . --cmd "python transcribe.py" --gpu RTX_4090 \ --env WHISPER_MODEL=large-v3 \ --env AUDIO_DIR=/app/audio \ --env OUTPUT_FILE=/app/transcripts.json \ --max-cost 5
A typical transcribe.py using faster-whisper:
import os, json
from pathlib import Path
from faster_whisper import WhisperModel
model = WhisperModel(
os.environ.get("WHISPER_MODEL", "large-v3"),
device="cuda",
compute_type="float16",
)
audio_dir = Path(os.environ.get("AUDIO_DIR", "/app/audio"))
results = []
for path in audio_dir.glob("*.mp3"):
segments, info = model.transcribe(str(path))
text = " ".join(seg.text for seg in segments)
results.append({"file": path.name, "language": info.language, "text": text})
print(f"Done: {path.name}")
output = os.environ.get("OUTPUT_FILE", "/app/transcripts.json")
with open(output, "w") as f:
json.dump(results, f, indent=2)
print(f"Wrote {len(results)} transcripts to {output}")Custom image (escape hatch)
For unusual setups, bring a container that already has faster-whisper and CUDA configured. Pass model size and paths via --env:
badgr run \ --image ghcr.io/my-org/whisper-batch:latest \ --gpu RTX_4090 \ --env WHISPER_MODEL=large-v3 \ --env MANIFEST_URL=https://storage.example.com/manifest.json \ --env OUTPUT_BUCKET=my-transcripts \ --max-cost 5
Detach and check logs later
Use --detach for large batches so you don't need to keep your terminal open:
# Launch and return immediately badgr run . --cmd "python transcribe.py" --gpu RTX_4090 \ --env WHISPER_MODEL=large-v3 \ --max-cost 5 \ --detach # Check progress when ready badgr logs <deployment-id>
Options
--gpu RTX_4090Recommended for Whisper — fits large-v3 at 24 GB VRAM--cmd <command>Command to run inside the uploaded project folder.--image <ref>Custom container with faster-whisper or whisper.cpp — bypasses the runner.--env KEY=VALUESet environment variables (model size, paths, etc.) — repeatable--detachReturn job ID immediately, don't stream logs--max-runtime <min>Auto-stop after N minutes (recommended to cap spend)--max-cost <$>Auto-stop when spend reaches this amountNext steps