Converters
These are standalone programs that convert transcripts from one tool format to another, e.g.
- trs - Transcriber transcripts
- eaf - ELAN files
- vtt - web subtitles (Web VTT)
- slt - SALT transcripts
- cha - CLAN CHAT transcripts
- textgrid - Praat TextGrids
- pdf - PDF files
- tex - LaTeX files
- txt - plain text files
- kaldi - input files for the Kaldi automatic speech recognition training system
- whisper - output .json files from the Whisper automatic speech recognition system (and its derivatives)
| to↓ from→ | trs | eaf | vtt | slt | cha | textgrid | txt | whisper |
|---|---|---|---|---|---|---|---|---|
| trs | eaf-to-trs | vtt-to-trs | slt-to-trs | cha-to-trs | textgrid-to-trs | |||
| eaf | trs-to-eaf | vtt-to-eaf | slt-to-eaf | cha-to-eaf | textgrid-to-eaf | txt-to-eaf | whisper-to-eaf | |
| vtt | trs-to-vtt | eaf-to-vtt | slt-to-vtt | cha-to-vtt | textgrid-to-vtt | whisper-to-vtt | ||
| slt | trs-to-slt | eaf-to-slt | ||||||
| cha | trs-to-cha | eaf-to-cha | vtt-to-cha | |||||
| textgrid | trs-to-textgrid | eaf-to-textgrid | vtt-to-textgrid | slt-to-textgrid | cha-to-textgrid | whisper-to-textgrid | ||
| txt | trs-to-txt | |||||||
| trs-to-pdf | eaf-to-pdf | vtt-to-pdf | slt-to-pdf | cha-to-pdf | textgrid-to-pdf | |||
| tex | trs-to-tex | eaf-to-tex | vtt-to-tex | slt-to-tex | textgrid-to-tex | |||
| kaldi | trs-to-kaldi | eaf-to-kaldi | textgrid-to-kaldi |
To use a particular converter, you need to have Java installed on your system. Download the file, and double-click it to run.
If double-clicking doesn't work, you can run the converter from the command line, by entering:
java -jar vtt-to-textgrid.jar
By default converters display a window on to which you can drag and drop files for converting. However, they can also be run in ‘batch mode’, which allows you to automatically convert a list of files from the command line - e.g.
java -jar trs-to-textgrid.jar --batchmode *.trs
Some conversions have configurable output, e.g.
java -jar trs-to-txt.jar *.trs
…will include annotations and participant names in the output text files, but:
java -jar trs-to-txt.jar --textonly *.trs
…produces text files that exclude all annotations and participant names.
The --usage command-line switch prints information about command-line options.
As many formats do not support the meta-data, annotation granularity or ontology of other formats, many of these conversions necessarily entail loss of data. However, mappings are made from one format to another wherever possible.
For notes about specific correspondences or data losses, use the --help command-line
switch, or use the Help|Information menu option of the conversion utility concerned.
These use annotator serializers/deserializers to read a file in one format, convert it to an annotation graph, and then write that graph out as a file in another format. As pointed out by Cochran et al. (2007 - Report from TILR Working Group 1 : Tools interoperability and input/output formats) this saves having order n2 explicit conversion algorithms between formats; only 2n format conversions are required (as some of these formats above are output-only, it's actually less than 2n).
This exemplifies an approach to linguistic data interoperability called the interlingua philosophy on interoperability by Witt et al. (2009) and uses annotation graphs as an ‘interlingua’ similar to work by Schmidt et al. (2008), except that rather using a third file format as a persistent intermediary, the annotation graph models of the linguistic data are ephemeral, existing in memory only for the duration of the conversion.
Getting TextGrid Transcripts of YouTube Videos
The basic process of making a YouTube video corpus with TextGrid transcripts is:
- Download Youtube videos with their closed-caption subtitle files.
- Convert the closed-caption subtitle files to TextGrids.
1. Download Youtube videos with subtitles
There's a tool called yt-dlp which can be used for downloading videos from YouTube. It's a command-line program that can be given a URL for downloading. If the URL is a playlist, then it will download all videos in the playlist into separate files.
It has many useful command-line options:
--help- Displays information about all the other command-line options.-f- Sets the format for the video, e.g.-f wavshould download WAV files,mp4will download MP4's, etc.--extract-audio- Extracts the audio from the video after downloading it. This option is useful if-f wavdoesn't work because WAV is not available.--audio-format- Specifies what format to use if you're using--extract-audio--sub-lang- Downloads subtitle/closed-caption files for the given ISO language code. e.g.--sub-lang en-GBwill download British English subtitles. The subtitle files are saved in …vtt files.
So for example the following command will download MP4 files and English closed-captions for the given playlist:
yt-dlp -f mp4 --sub-lang en https://www.youtube.com/playlist?list=PLdsZeeCVYnY3em55M2d3Iq3H-jSPLIWBF
…and the following will download WAV files instead of MP4 for the given playlist:
yt-dlp --extract-audio --audio-format wav --sub-lang en https://www.youtube.com/playlist?list=PLdsZeeCVYnY3em55M2d3Iq3H-jSPLIWBF
Caveat: There's a potential problem with using YouTube's automatically-generated captions; they often have a whole bunch of repeated phrases as it goes through the recording, so much of the resulting transcript is doubled up. So make sure you eyeball your TextGrids at the end to ensure the results are what you expect!
2. Convert subtitles to Praat TextGrids
vtt-to-textgrid.jar is a utility for converting VTT files to TextGrids.
(If you prefer ELAN transcripts, try vtt-to-eaf.jar instead)
It's a Java program, so you must have a recent version of Java installed for it to work.
Downloading the vtt-to-textgrid.jar file and double-clicking it should work, but if not, you can run it from the command line like this:
java -jar vtt-to-textgrid.jar
When it starts, it looks like this:

You need to drag/drop vtt files into the big white space (or use the + button), and then click Convert. This will save each TextGrid in the same folder as the VTT file.
nzilbb.converter