uttTG: Create a Praat TextGrid marking speech onset and offset

View source: R/uttTG.R

uttTGR Documentation

Create a Praat TextGrid marking speech onset and offset

Description

Create a Praat TextGrid marking speech onset and offset

Usage

uttTG(wave, outfile, begin = NULL, end = NULL, transcription = NULL)

Arguments

wave

Required. Either a tuneR::Wave object or a valid file path to an existing wav file.

outfile

If not NULL (the default), a filename ending in .TextGrid where the output of this function will be stored. If NULL, the function will return a character vector including the text to put in a TextGrid file.

begin

Integer. The first SAMPLE in the wave to be considered part of the speech signal. If NULL (the default), will use the automatically detected value output by findSpeech(wave).

end

Integer. The last SAMPLE in the wave to be considered part of the speech signal. If NULL (the default), will use the automatically detected value output by findSpeech(wave).

transcription

Character. The transcription of the segment between the begin and end markers.

Value

A praat TextGrid file.

Examples

data("samp_wav")
uttTG(samp_wav, outfile = "samp_tg.TextGrid",
      transcription = c("why what do you mean asked the detective"))

abbey-thomas/speechcollectr documentation built on Nov. 19, 2024, 7:09 p.m.