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

TIMEDUR – Time Duration

Status: Current Last updated: 2026-05-22 09:41 EDT

Purpose

Computes time duration statistics from media timestamp bullets attached to utterances. Utterances without bullet timing are silently skipped.

See the CLAN manual for the original TIMEDUR command specification.

Usage

chatter-clan timedur file.cha
chatter-clan timedur --speaker CHI file.cha
chatter-clan timedur --format json file.cha

Options (chatter-native)

OptionCLAN FlagDescription
--speaker <CODE>+t*CHI (or +tCHI)Include speaker
--exclude-speaker <CODE>-t*CHI (or -tCHI)Exclude speaker
--gem <LABEL>+g"label"Restrict to gem segment
--range <START-END>+z25-125Utterance range
--id-filter <PATTERN>+t@ID="..."Filter by @ID pattern
--include-retracings+r6Include retraced words in counting
--format <FMT>–Output format: clan (default), text, json, csv

CLAN +-flag coverage audit

Authoritative enumeration of every CLAN timedur flag. Sources:

  • OSX-CLAN/src/clan/timedur.cpp: usage().
  • OSX-CLAN/src/clan/cutt.cpp: mainusage() TIMEDUR branches.
  • crates/talkbank-clan/src/clan_args.rs: chatter’s rewriter.
  • crates/talkbank-cli/src/cli/args/clan_commands.rs::Timedur plus clan_common.rs::CommonAnalysisArgs.

(Status legend: same as FREQ.)

TIMEDUR has no command-specific flags beyond the general inherited set. All variation is in +d display modes:

TIMEDUR-specific flags (from timedur.cpp::usage)

CLAN flagMeaningChatterStatusNotes
+dDefault results in spreadsheet format,Rewriter only--display-mode rewrite.
+d1Ratio of words/utterances over time duration,Rewriter only
+d10+d1 results in spreadsheet format,Rewriter only

Audit summary

BucketCount
Done6
Partial1
Rewriter only6
Missing4

TIMEDUR’s gap profile is dominated by +dN display modes. Body parity already matches CLAN. The default (+d) emits in spreadsheet format, chatter’s text/json/csv formats cover the spreadsheet use case but with different shapes; researchers expecting CLAN’s exact spreadsheet column layout need --format csv plus the layout audit.

Output

Per speaker:

  • Number of timed utterances
  • Total duration (formatted as HH:MM:SS.mmm)
  • Mean utterance duration
  • Min/max duration

Plus a corpus-wide summary:

  • Total timed utterances across all speakers
  • Total duration
  • Recording span (earliest start to latest end)
  • Speaker interaction matrix (overlap and gap analysis)

Differences from CLAN

Timestamp extraction

Uses parsed media bullet structures from the AST (Bullet { start_ms, end_ms }) rather than raw byte scanning in text. This is more robust against formatting variations.

Interaction matrix header

The interaction matrix header includes a leading space, matching CLAN exactly. This was verified during golden test parity work.

Output formats

Supports text, JSON, and CSV. CLAN produces text only.

Golden test parity

100% parity with CLAN C binary output.