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.
talking_praatpicture(
sound,
start = 0,
end = 0,
audio_start = start,
audio_end = end,
width = 1080,
height = 720,
pointsize = 25,
outputFile = "praatvid.mp4",
useViewer = TRUE,
...
)
No return value, produces a video file.
String giving the file name of a sound file with the .wav extension.
Start time (in seconds) of desired plotted area. Default is 0
.
End time (in seconds) of desired plotted area. Default is 0
(= the entire file).
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.
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.
Number giving the desired width of the resulting animation in
pixels; default is 1080
.
Number giving the desired height of the resulting animation in
pixels; default is 720
.
Number; which point size should be used for text in the
animation? Default is 25
. See grDevices::png()
for more details.
String giving the desired file name. Default is
praatvid.mp4
.
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
.
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.
if (FALSE) {
datapath <- system.file('extdata', package='praatpicture')
soundFile <- paste0(datapath, '/1.wav')
talking_praatpicture(soundFile)
}
Run the code above in your browser using DataLab