Guides
Download transcripts
Get the text, timestamped segments and speakers as JSON, or a DOCX, PDF, SRT or VTT file.
Code examples use API and HEADERS (headers in JavaScript), set up as in the Quickstart.
The transcript as JSON
When a transcript is completed, retrieving it gives you everything as data:
text: the whole transcript as plain text, one line per segment.segments: each piece of speech with itsstartandendtime in seconds, itstextand itsspeaker(when speaker labels are on).speakers: the names of everyone who speaks.
"segments": [
{ "start": 0.0, "end": 4.2, "text": "Okay, let's start with the launch.", "speaker": "Maya" },
{ "start": 4.2, "end": 9.8, "text": "Design is done, QA needs two more days.", "speaker": "Daniel" }
],
"speakers": ["Daniel", "Maya"]
Files
To get a document or subtitles, export the transcript. The response is the file itself, with a Content-Disposition header holding a file name.
format | What you get |
|---|---|
txt | Plain text |
docx | Word (DOCX) |
pdf | |
srt | Subtitles (SRT) |
vtt | Subtitles (VTT) |
csv | Spreadsheet (CSV) |
json | JSON |
Two switches control what's included: timestamps and speakers (both true by default).
curl "https://scribefiles.com/v1/transcripts/TRANSCRIPT_ID/export?format=srt" \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY" \
-o episode.srt
curl "https://scribefiles.com/v1/transcripts/TRANSCRIPT_ID/export?format=txt×tamps=false&speakers=false" \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY" \
-o episode.txt
def export(transcript_id: str, fmt: str, path: str, **switches):
res = requests.get(f"{API}/transcripts/{transcript_id}/export", headers=HEADERS,
params={"format": fmt, **switches})
res.raise_for_status()
with open(path, "wb") as f:
f.write(res.content)
export(transcript["id"], "srt", "episode.srt")
export(transcript["id"], "txt", "episode.txt", timestamps="false", speakers="false")
import { writeFile } from "node:fs/promises";
async function exportFile(id, format, path, switches = {}) {
const params = new URLSearchParams({ format, ...switches });
const res = await fetch(`${API}/transcripts/${id}/export?${params}`, { headers });
if (!res.ok) throw new Error((await res.json()).error.message);
await writeFile(path, Buffer.from(await res.arrayBuffer()));
}
await exportFile(transcript.id, "srt", "episode.srt");
await exportFile(transcript.id, "txt", "episode.txt", { timestamps: "false", speakers: "false" });
Naming the speakers
Speakers start as Speaker 1, Speaker 2… Give them real names once, with update, and every later export uses them:
curl -X PATCH https://scribefiles.com/v1/transcripts/TRANSCRIPT_ID \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY" \
-H "Content-Type: application/json" \
-d '{"speaker_names": {"Speaker 1": "Maya", "Speaker 2": "Daniel"}}'
requests.patch(f"{API}/transcripts/{transcript['id']}", headers=HEADERS,
json={"speaker_names": {"Speaker 1": "Maya", "Speaker 2": "Daniel"}})
await fetch(`${API}/transcripts/${transcript.id}`, {
method: "PATCH",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({ speaker_names: { "Speaker 1": "Maya", "Speaker 2": "Daniel" } }),
});
Editing by hand
Every transcript has a url that opens it in the ScribeFiles editor, where you can listen and fix words. Edits made there show up in the API and in later exports.
Questions about the API? Contact us.