Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CHAT2SRT – CHAT to Subtitle Conversion

Status: Current

Purpose

Converts CHAT files to subtitle format for captioned video. The legacy manual describes CHAT2SRT as converting a CHAT file to SRT for video captioning and then walks through a GUI workflow using external subtitle software.

This book focuses on the CLI semantics only: clan-core converts timed CHAT utterances to SRT or WebVTT subtitle entries.

Usage

chatter clan chat2srt input.cha

Output Formats

FormatFunctionTimestamp style
SRTchat_to_srt()HH:MM:SS,mmm
WebVTTchat_to_vtt()HH:MM:SS.mmm

Options

OptionDefaultDescription
(none)This converter operates on a parsed ChatFile and has no additional configuration options.

Input Format

Standard CHAT (.cha) files with timing bullets on utterances. Utterances without timing bullets are excluded from the output.

Output

Numbered subtitle blocks with timestamps derived from CHAT timing bullets and cleaned text content (no CHAT markers, annotations, or speaker codes).

Example SRT output:

1
00:00:01,000 --> 00:00:03,500
hello world

2
00:00:04,200 --> 00:00:06,800
how are you

Differences from CLAN

  • GUI material intentionally omitted here: The legacy manual’s Subtitle Writer walkthrough belongs in the TalkBank VS Code extension docs, not in this CLI command chapter.
  • Uses typed AST for subtitle text extraction
  • Produces valid, well-formed SRT/WebVTT output
  • Additionally supports WebVTT output format
  • Manual feature not yet mirrored: The legacy manual documents using +t%glo to caption from the gloss tier. This chapter should not imply that arbitrary dependent-tier caption sourcing is available unless explicitly implemented.

Reference

See the CLAN manual for the original CHAT2SRT command documentation.