Skip to contents

Process a Zoom recording transcript and return summary metrics by speaker

Usage

summarize_transcript_metrics(
  transcript_file_path = "",
  names_exclude = c("dead_air"),
  consolidate_comments = TRUE,
  max_pause_sec = 1,
  add_dead_air = TRUE,
  dead_air_name = "dead_air",
  na_name = "unknown",
  transcript_df = NULL,
  comments_format = c("list", "text", "count")
)

Arguments

transcript_file_path

Path to the transcript file to process

names_exclude

Vector of names to exclude from analysis (default: c("dead_air"))

consolidate_comments

Whether to consolidate consecutive comments (default: TRUE)

max_pause_sec

Maximum pause in seconds between comments to consolidate (default: 1)

add_dead_air

Whether to add dead air rows for gaps in transcript (default: TRUE)

dead_air_name

Name to use for dead air periods (default: 'dead_air')

na_name

Name to use for unknown speakers (default: 'unknown')

transcript_df

Pre-loaded transcript data frame (alternative to transcript_file_path)

comments_format

Format for comments: "list", "text", or "count" (default: "list")

Value

A tibble with one row per speaker (and source transcript when present), containing participation totals such as duration, word count, session count, and the configured comment representation.

Details

Original code posted by Conor Healy: https://ucbischool.slack.com/archives/C02A36407K9/p1631855705002000 Addition of wordcount, wordcount_perc, and wpm by Brooks Ambrose: https://gist.github.com/brooksambrose/1a8a673eb3bf884c1868ad4d80f08246

This function preserves in-memory comment data for analysis compatibility. Use write_metrics() for privacy-safe CSV exports. The privacy helpers mask structured identifier columns, but they do not redact identifiers embedded in free transcript text.

Examples


# Load a sample transcript from the package's extdata directory
transcript_file <- system.file("extdata/test_transcripts/intro_statistics_week1.vtt",
  package = "engager"
)
summarize_transcript_metrics(transcript_file_path = transcript_file)
#> # A tibble: 4 × 13
#>   transcript_file   name      n duration wordcount comments perc_n perc_duration
#>   <chr>             <chr> <int>    <dbl>     <dbl> <I<list>  <dbl>         <dbl>
#> 1 intro_statistics… Stud…    14      155       361 <chr>      46.7         71.8 
#> 2 intro_statistics… Stud…     6       23        48 <chr>      20           10.6 
#> 3 intro_statistics… Stud…     5       19        37 <chr>      16.7          8.80
#> 4 intro_statistics… Stud…     5       19        40 <chr>      16.7          8.80
#> # ℹ 5 more variables: perc_wordcount <dbl>, n_perc <dbl>, duration_perc <dbl>,
#> #   wordcount_perc <dbl>, wpm <dbl>