Creates a merged sound file from old sound files in a folder. If the annotation argument is not equal to NULL, it creates an annotation file (Praat .TextGrid, ELAN .eaf or EXMARaLDA .exb) with original sound names annotation.

concatenate_textgrids(path, result_file_name = "concatenated")

Arguments

path

path to the directory with soundfiles.

result_file_name

name of the result and annotation files.

Value

no output

Examples

# create two files in a temprary folder "test_folder" t1 <- system.file("extdata", "test.TextGrid", package = "phonfieldwork") t2 <- system.file("extdata", "post.TextGrid", package = "phonfieldwork") tdir <- tempdir() file.copy(c(t1, t2), tdir)
#> [1] TRUE TRUE
# here are two .wav files in a folder list.files(tdir)
#> [1] "concatenated.TextGrid" "concatenated.wav" #> [3] "file8431537ba2f.so" "libloc_169_8f48fc7d1db1bb3e.rds" #> [5] "libloc_191_ec655bd44ff422f6.rds" "libloc_201_40b5ab1406ba8155.rds" #> [7] "post.TextGrid" "post.wav" #> [9] "test.TextGrid" "test.wav"
# [1] "post.TextGrid" "test.TextGrid" ... # Concatenate all TextGrids from the folder into concatenated.TextGrid concatenate_textgrids(path = tdir, result_file_name = "concatenated") list.files(tdir)
#> [1] "concatenated.TextGrid" "concatenated.wav" #> [3] "file8431537ba2f.so" "libloc_169_8f48fc7d1db1bb3e.rds" #> [5] "libloc_191_ec655bd44ff422f6.rds" "libloc_201_40b5ab1406ba8155.rds" #> [7] "post.TextGrid" "post.wav" #> [9] "test.TextGrid" "test.wav"
# [1] "concatenated.TextGrid" "post.TextGrid" "test.TextGrid" ...