Enrich watch history data with DDP Transcribe

A donated watch history is a list of dates and links. It tells you which videos a participant watched, but most researchers who collect this data want to know what participants were exposed to. That means enriching the data by adding the content of the videos after donation. DDP Transcribe does this by transcribing the speech in each video.

A JSON file listing 25 viewings, each with a date and a link to a TikTok video from a news organisation such as NOS, RTL, BBC News or Al Jazeera English
What a watch history looks like when it is donated: one date and one link for every video a participant watched, and nothing about what the video contained. This example is a test file in the donation format, filled with public videos from news organisations. The first ten of its 25 viewings are shown.

How it works

Export the donations from Next and put them where the workspace can read them: on Yoda, on a mounted Research Drive, or in a folder in the workspace. The pipeline then runs five steps, with transcription handled locally on the workspace so no audio goes to an outside service.

Diagram of the five steps: ingest, fetch, transcribe, store, retry and report, with the tools used in each step
The five steps of the pipeline and the tools each one uses. Only the second step, fetch needs external access; the other four can be run in a SANE environment.
  1. Ingest. It reads the files and queues each video once, however many participants watched it. You can limit a run to a period of viewing.
  2. Fetch. It downloads the audio of each public video with yt-dlp and converts it with ffmpeg.
  3. Transcribe. It transcribes the audio on the GPU with whisper.cpp and the large-v3-turbo model, and detects the language of each video.
  4. Store. It writes the transcript and deletes the audio. No audio or video is kept.
  5. Retry and report. It classifies each failure, retries what may still succeed and writes off videos that are gone. One command shows the counts.

A batch that stops, for any reason, resumes where it left off.

What comes back

For every video you get two files, named after the video ID. The text file holds the transcript. The JSON file holds the link to the video, its duration, the detected language, the model and the time of transcription. It also holds the probability Whisper gave to every token, so you can set your own threshold for which transcripts to trust. The pipeline also keeps what the platform showed for each video at the time of fetching: the description, the uploader and the numbers of views, likes and comments.

You can read the transcripts in DDP Inspector, next to the donated watch history.

The DDP Inspector page for one video: the full English transcript of a 38-second BBC News item about a school protest in Lincolnshire, a table with the confidence of each segment between 0.90 and 1.00, and a panel with the video's caption, uploader, posting date and numbers of views, likes and comments
One transcript in DDP Inspector, complete and unedited: the spoken text, the detected language and length, Whisper's confidence for each segment, and what the platform showed for the video when it was fetched. The video is a BBC News item on TikTok.

What a study needs

  • The watch history files from your data donation study.
  • A collaboration on SURF Research Cloud that can start a GPU workspace.

DDP Transcribe is one of three tools on SURF Research Cloud that start from the same donated watch history. DDP Comments collects the comments under the same videos, with student collectors and 4CAT. DDP Inspector shows the donations and the transcripts in the browser, read-only.

Getting access

DDP Transcribe runs on SURF Research Cloud, in your own collaboration. To use it for a study, email DataDonation@uu.nl.