This function cuts sound files by non-empty intervals on a specified tier. This tier commonly corresponds to the main_tier specified in get_word_duration.

get_word_sound_files(
  sound_files,
  word_durations,
  extra_tier = NULL,
  directory,
  fileType = "auto",
  from = 1,
  to = Inf,
  units = "samples"
)

Arguments

sound_files

A vector of all wav files you want to include.

word_durations

The durations of words or other relevant intervals. Typically identified using get_word_duration.

extra_tier

Optional: Include another tier. This tier will be used in unique identifier creation. Can be given by its name or by its index.

directory

Specify the directory in which the new wav files should be saved.

fileType

Type of audio file: "wav", "mp3", or "auto".

from

Where to start reading in units.

to

Where to stop reading.

units

Units of from and to arguments.

Value

A list object.

References

Bořil, T., & Skarnitzl, R. (2016). Tools rPraat and mPraat. In P. Sojka, A. Horák, I. Kopeček, & K. Pala (Eds.), Text, Speech, and Dialogue (pp. 367-374). Springer International Publishing.

Author

Dominic Schmitz

Examples

if (FALSE) get_word_sound_files(sound_files = corpus_files[[1]], word_durations = wd_df, extra_tier = "ID", directory = "C:/Users/Project/chopped")