Process a Zoom recording transcript with given parameters and return tibble containing the consolidated and annotated comments.
Usage
process_zoom_transcript(
transcript_file_path = "",
consolidate_comments = TRUE,
max_pause_sec = 1,
add_dead_air = TRUE,
dead_air_name = "dead_air",
na_name = "unknown",
transcript_df = NULL
)Arguments
- transcript_file_path
Path to the transcript file to process
- consolidate_comments
Whether to consolidate consecutive comments from the same speaker (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)
Value
A tibble of processed transcript cues with normalized speaker, comment, timing, duration, word-count, and source-file fields. Depending on the arguments, adjacent cues may be consolidated and dead-air rows added.
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
Examples
# Load a sample transcript from the package's extdata directory
transcript_file <- system.file("extdata/test_transcripts/intro_statistics_week1.vtt",
package = "engager"
)
process_zoom_transcript(transcript_file_path = transcript_file)
#> # A tibble: 30 × 8
#> transcript_file name comment start end duration wordcount comment_num
#> <chr> <chr> <chr> <time> <time> <dbl> <int> <int>
#> 1 intro_statistics_… Prof… Good m… 00'00" 00'08" 8 29 1
#> 2 intro_statistics_… Stud… I've u… 00'08" 00'12" 4 7 2
#> 3 intro_statistics_… Stud… I've d… 00'12" 00'15" 3 9 3
#> 4 intro_statistics_… Stud… I'm co… 00'15" 00'18" 3 8 4
#> 5 intro_statistics_… Prof… That's… 00'18" 00'35" 17 38 5
#> 6 intro_statistics_… Stud… What d… 00'35" 00'38" 3 7 6
#> 7 intro_statistics_… Prof… Great … 00'38" 00'50" 12 26 7
#> 8 intro_statistics_… Stud… I see … 00'50" 00'54" 4 8 8
#> 9 intro_statistics_… Prof… Exactl… 00'54" 01'02" 8 20 9
#> 10 intro_statistics_… Stud… Can we… 01'02" 01'06" 4 6 10
#> # ℹ 20 more rows