Skip to contents

This function takes an SSFF object or a path to a file containing one, reads the content of a specific field (and channel/column if required) and uses Praat to construct a Pitch object and store it in a file. The function's primary purpose is to allow the user to re-use already computed, and possibly adjusted, pitch tracks in subsequent calculations in for instance praat_sauce.

Usage

ssffToPitch(
  inData,
  outputPath = NULL,
  field = 1,
  channel = 1,
  start = 0,
  end = 0,
  zero.threshold = 0,
  dump.script = FALSE,
  soundFileDuration = NULL
)

Arguments

inData

An SSFF f0 track object, or the full path to one.

outputPath

The directory where the Pitch file should be stored.

field

The field / column in the SSFF object where the f0 track values are stored. The field may be indicated by the name of it, or its number. Often, the SSFF object will contain just one field, the one containing f0 values, and field=1 is therefore a good default.

channel

The channel / column of the field which should be used to construct the pitch track. It is likely very uncommon that channel values higher than one will be used in real world applications.

start

An optional start time (in s) for a part of the SSFF f0 track which should be converted to a Pitch object.

end

An optional end time (in s) for a part of the SSFF f0 track which should be converted to a Pitch object.

zero.threshold

The threshold below which f~0~ values will be considered to indicate an unvoiced frame. The default is zero, which is how the SSFF format and Praat pitch tracks encode lack of voicing. It is however also possible to trim away really low f$_0$ values before making the Pitch object by choosing a higher threshold.

dump.script

If TRUE, the Praat script that is used to create a Pitch object will be dumped to a file for debuging or inspection. The file will be placed in the same directory as the output Pitch file, but with a '.praat'. extension.

soundFileDuration

An explicit duration that will be set for the created Pitch object. If not explicitly supplied, the duration of the SSFF object track will be used instead.

Value

The path to the created Pitch file

Details

The user may optionally compute a Pitch object for only parts of the SSFF pitch track if the track is stored in a file. An ability to subset an SSFF object directly is currently not implemented.