Transcribe a folder of recordings with one command (or the OpenAI SDK)
Most transcription docs show you one file. Archives are thousands of files in nested folders, and the job will get interrupted at some point. Here are three ways to handle that, from least code to most control.
1. The command line tool: one command, resumable
speechtrace is a small open-source tool (MIT licence) on PyPI. With uv installed there's nothing to install: uvx fetches it. Sign in first (this also creates your account, with 10 free hours and no card):
uvx speechtrace login --email [email protected] # we email you a 6-digit code
uvx speechtrace login --code 123456
uvx speechtrace transcribe ./recordings --out ./transcripts --formats txt,srt,json
It finds every audio and video file under the folder, uploads them a few at a time, waits for the transcripts, and saves them in a matching folder structure. Without --out, they go in a transcripts folder next to your recordings.
Prefer a single file you can read in one sitting? The same code is bulk-transcribe.py, which needs only Python and the requests package, and an API key from your dashboard (click Create key):
curl -O https://speechtraceai.com/bulk-transcribe.py
pip install requests
export SPEECHTRACE_API_KEY=tx_your_key
python bulk-transcribe.py ./recordings --out ./transcripts --formats txt,srt,json
Both keep their progress in transcripts/.bulk-transcribe.json, so either can pick up the other's run. Stop it any time; the next run skips finished files and picks up the ones already uploaded. If your credit runs out, it stops uploading and tells you; uvx speechtrace buy 10 gives you a Stripe link, and the next run carries on.
The formats:
- txt: plain text, with speaker names when there's more than one speaker.
- srt and vtt: subtitles.
- json: every word with its start time, end time and speaker, plus speaker segments.
Add --no-speakers to skip speaker labels, or --parallel 8 for more uploads at once.
Or ask your AI assistant
Claude Code, Cursor, Codex and other assistants can run all of this for you. Tell yours:
Use https://speechtraceai.com to transcribe the audio files in ~/Recordings. Instructions for AI assistants: https://speechtraceai.com/llms.txt
It signs you up (you tell it the emailed code), transcribes, and gives you a Stripe link if you need more hours. See AI assistants for chat apps such as Claude Desktop.
2. The OpenAI SDK: change one line
If your code already calls OpenAI's transcription endpoint, point it at us:
from openai import OpenAI
client = OpenAI(base_url="https://speechtraceai.com/v1", api_key="tx_your_key")
with open("interview.mp3", "rb") as f:
result = client.audio.transcriptions.create(model="default", file=f, response_format="verbose_json")
print(result.text)
response_format can be json, text, srt, vtt or verbose_json (segments with speakers, and word times). The call returns when the transcript is ready, so it suits files up to 200 MB. For more, use the batch API below.
3. The batch API with webhooks
For pipelines, ask for an upload link, send the file straight to storage, and start the transcription. Then let us call you when it's done:
# 1. an upload link
curl -s https://speechtraceai.com/v1/uploads -H "Authorization: Bearer $TX_API_KEY" \
-H "Content-Type: application/json" -d '{"filename": "ep1.mp3", "content_type": "audio/mpeg"}'
# 2. upload the bytes
curl -X PUT -H "Content-Type: audio/mpeg" --upload-file ep1.mp3 "$PUT_URL"
# 3. transcribe, with a webhook
curl -s https://speechtraceai.com/v1/transcriptions -H "Authorization: Bearer $TX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"upload_id": "'$UPLOAD_ID'", "speakers": true, "webhook_url": "https://you.example/hooks/transcripts"}'
When the file is finished, your webhook gets {"type": "transcription.done", "data": {...}} with links to every format. The API docs have the details, and the full reference is at /api-docs.
Tips for big archives
- Convert first if your files are large. Mono 16 kHz Opus at 32 kbps is about 14 MB per hour, with little or no effect on accuracy. That's a quarter of a 128 kbps MP3.
- Files up to 3 hours each. Split longer recordings.
- Audio is deleted after transcription, and transcripts after 30 days. Download what you need.
Moving more than a few thousand hours? Ask for a pilot and we'll transcribe a sample free first.