Skip to contents

This function is an extension of the tjm.praat::wrap_praat_script function that wraps a Praat script into an R function, but with an extra demand to specify a directory where the Praat script should be stored before execution. This means that rather than having multiple Praat script executing from the same temporary directory (which is the case when using tjm.praat::wrap_praat_script, an environment is expected to have been created using the make_dsp_environment already, and supplied to this function via the directory argument. Any additional sound files or batches of sound files will then only be available to the particular instance of Praat and DSP Praat functions can be called concurrently.

Usage

cs_wrap_praat_script(
  praat_location,
  script_code_to_run,
  directory,
  return = c("last-argument", "info-window")
)

Arguments

praat_location

path to the Praat executable

script_code_to_run

Praat script to run

directory

the full path of a directory set up by make_dsp_environment

return

value to return. "last-argument" returns the last argument to the Praat script. "info-window" returns the contents of the Praat Info Window.

Value

see return argument