Skip to content

Instantly share code, notes, and snippets.

@aarblaster
Created April 6, 2026 13:15
Show Gist options
  • Select an option

  • Save aarblaster/d147b1b886584def6dc6e203f5f90581 to your computer and use it in GitHub Desktop.

Select an option

Save aarblaster/d147b1b886584def6dc6e203f5f90581 to your computer and use it in GitHub Desktop.
A wrapper for a python script to transform a vtt file to a text file ready for editing.
# vtt_process
# Version: 1.0
#
# Process a Zoom/Teams .vtt transcript file for research use.
# Removes timecodes, merges same-speaker blocks, replaces speaker
# names with interview labels (I / R), and applies US → UK spelling.
# Output is written alongside the original as <name>_edited.txt.
#
# Dependency: relies on the file vtt_process.py.
#
# Usage:
# vtt_process <file.vtt>
# vtt_process <file.vtt> --self "Other Name"
#
# Created by Anthony Arblaster on 28 March 2026.
#
# Copyright Anthony Arblaster 2026.
# – Web: https://codebyanthony.com
# – Mastodon: https://mastodonapp.uk/@aarblaster
# – GitHub: https://github.com/aarblaster
#!/bin/zsh
# Process a Zoom/Teams .vtt transcript for research use
function vtt_process() {
local script="/user/pathname/vtt_process.py"
if [[ -z "$1" ]]; then
echo "Usage: vtt_process <file.vtt> [--self \"Speaker Name\"]"
return 1
fi
python3 "$script" "$@"
}
@aarblaster
Copy link
Copy Markdown
Author

aarblaster commented Apr 6, 2026

The script is a wrapper for python code!

This is a simple zsh wrapper to make use of a python script called vtt_process. It won't do anything without the python script.

More information

For more information about the usage of this gist you can read about it on my site at phd.anthonyarblaster.com/phd/Transcript-Management/.
I developed this as part of my PhD research. You can read more at phd.anthonyarblaster.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment