tg_createTier {praatpicture}R Documentation

Interactively create a TextGrid tier

Description

Function for creating TextGrid tiers called by make_TextGrid. Instead of using this function directly, use make_TextGrid.

Usage

tg_createTier(
  sound,
  tierName,
  start = 0,
  end = 0,
  show = "wave",
  channel = 1,
  sampa2ipa = FALSE
)

Arguments

sound

String giving the file name of a sound file with the .wav extension.

tierName

String giving the name of the tier.

start

Start time (in seconds) of desired plotted area. Default is 0.

end

End time (in seconds) of desired plotted area. Default is 0 (= the entire file).

show

String giving the type of plot to show. Default is wave, another option is spectrogram. Note that spectrogram plotting is relatively slow within this function.

channel

Number indicating which audio channel to show. Default is 1.

sampa2ipa

Logical; should SAMPA transcriptions be converted to IPA? Default is FALSE.

Value

A list object identical to a single tier created by rPraat::tg.read() when loading TextGrid objects into R.

Examples

## Not run: 
# Don't use directly
datapath <- system.file('extdata', package='praatpicture')
soundFile <- paste0(datapath, '/2.wav')
tg <- make_TextGrid(soundFile, tierNames='Mary')
# Follow the steps shown in the console

praatpicture(soundFile, tg_obj=tg)

## End(Not run)

[Package praatpicture version 1.0.0 Index]