library(tjm.praat) # This example textgrid has back-to-back sounding/silence labels tg <- system.file( "demo-textgrids/merge-duplicate-intervals.TextGrid", package = "tjm.praat" ) tg_data <- readtextgrid::read_textgrid(tg) tg_data[tg_data$tier_num == 3, c("tier_name", "xmin", "xmax", "text")] # Set path tg_out <- tempfile("test", fileext = ".TextGrid") f_merge_duplicate_intervals <- wrap_praat_script( script_code_to_run = merge_duplicate_intervals, returning = "last-argument" ) tg_data2 <- f_merge_duplicate_intervals(tg, "silence", tg_out) |> readtextgrid::read_textgrid() tg_data2[tg_data2$tier_num == 3, c("tier_name", "xmin", "xmax", "text")]
print(f_merge_duplicate_intervals, condense = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.