talking_praatpicture {praatpicture}R Documentation

Make Praat Picture style plots of acoustic data with embedded audio

Description

Generate simple MP4 video files with Praat Picture style plots of acoustic data with time-aligned transcriptions and embedded audio to use in presentations etc.

Usage

talking_praatpicture(
  sound,
  start = 0,
  end = 0,
  audio_start = start,
  audio_end = end,
  width = 1080,
  height = 720,
  pointsize = 25,
  outputFile = "praatvid.mp4",
  useViewer = TRUE,
  ...
)

Arguments

sound

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

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).

audio_start

Start time (in seconds) of embedded audio. By default it is the same as start, i.e. the embedded audio is the portion of the sound file that is being plotted.

audio_end

End time (in seconds) of embedded audio. By default it is the same as end, i.e. the embedded audio is the portion of the sound that is being plotted.

width

Number giving the desired width of the resulting animation in pixels; default is 1080.

height

Number giving the desired height of the resulting animation in pixels; default is 720.

pointsize

Number; which point size should be used for text in the animation? Default is 25. See grDevices::png() for more details.

outputFile

String giving the desired file name. Default is praatvid.mp4.

useViewer

Logical; should the video be shown in the Viewer pane in RStudio? Default is TRUE; if true, the video is oSnly saved in a temporary directory, but can be downloaded from a browser.

...

Further arguments passed to praatpicture.

Value

No return value, produces a video file.

See Also

This function is a wrapper for av::av_capture_graphics() used to produce plots similar to those made with praatpicture() with embedded audio. For more detail on your options, see the praatpicture() help file.

Examples

## Not run: 
datapath <- system.file('extdata', package='praatpicture')
soundFile <- paste0(datapath, '/1.wav')
talking_praatpicture(soundFile)

## End(Not run)

[Package praatpicture version 1.0.0 Index]