Python caption export
Convert a transcript to WebVTT subtitles.
Turn a saved YouTube or podcast transcript into a .vtt file with start times, end times and any speaker names in the response. Try the example with Python 3. The conversion runs locally.
Play the caption track
Each card in this silent video lasts six seconds. The English subtitles follow the edit. The timestamp printed on each card takes you to the passage in the original recording.
Download the WebVTT subtitles or see the original video sources.
Reproduce the export
Download the sample transcript JSON and the Python converter. Save both in the same folder and run this command there.
python3 export_vtt.py quote-cards.json > quote-cards.vtt
The sample contains three lines timed to the edited video. For example, the second card starts at 6 seconds in the edit and 13:43 in the original recording.
Use your own transcript
Save a ready response from the Arcmira transcript API with timestamps=true. Replace quote-cards.json in the command with your filename. A source excerpt keeps its original timestamps. If you cut or reorder the recording, adjust the cue times to match.
When a line has a speaker ID, the converter looks up the returned name and writes a WebVTT voice tag such as <v Speaker 1>. Lines without a speaker ID get plain text. Check the words and names against the recording before publishing.
Publish a WebVTT transcript with your podcast
Check a cue near the beginning and end of the published episode, and after each ad break. A different intro, cut or ad can shift later captions. Upload the VTT that matches the final audio to your podcast host.
If your host manages transcripts, use its episode transcript field. If you edit the RSS yourself, declare xmlns:podcast="https://podcastindex.org/namespace/1.0" on the rss element. Add the following element inside the episode’s item, replacing the sample clip URL and language with your own.
<podcast:transcript
url="https://arcmira.github.io/integrations/youtube-transcript-to-webvtt/quote-cards.vtt"
type="text/vtt"
language="en" />
Apple Podcasts. For an RSS episode, select “Display transcripts I provide” in Apple Podcasts Connect. Apple checks the linked file when it refreshes the feed. Apple’s transcript settings
Spotify for Creators. If your episode has transcript editing enabled, open its details on the web, edit the transcript, upload the timestamped VTT and save. Spotify also accepts SRT and sets a 5 MB limit. Spotify’s upload instructions