Plot waveform and spectrogram
praat_plot(
file,
wav,
tg = NULL,
start = 0,
end = NULL,
width = 5,
format = "png",
f0 = FALSE,
f0_min = 0,
f0_max = 500,
spec_max = 5000
)
Output file path as a string.
Wav file path as a string.
TextGrid file path as a string. If `NULL` (the default), a TextGrid is plotted if a TextGrid file with the same name as the wav file is found. No TextGrid is plotted otherwise.
Start time of the plotting window in seconds.
End time of the plotting window in seconds. If `NULL` (the default), plot the entire duration.
Width of the plot in inches.
Output file format (`png` by default, or `pdf`).
Whether to plot f0 (`FALSE` by default).
If `f0 = TRUE`, minimum f0 value (`0` by default).
If `f0 = TRUE`, maximum f0 value (`500` by default).
Maximum frequency for the spectrogram (`5000` by default).
Nothing. It is used for its side effects.
if (FALSE) {
wav <- system.file("extdata", "vowels.wav", package = "speakr")
praat_plot("vowels.png", wav, f0 = TRUE, f0_max = 200, end = 3)
}