powered by
Clip and copy a single wave files to a given length. See clip_wave() for processing multiple files.
clip_wave()
clip_wave_single( path_in, path_out, clip_length, start_time = 0, wave_length = NULL, overwrite = FALSE )
TRUE if successful
Character. Path to the wave file to clip.
Character. Path to copy the new clipped wave file to.
Numeric. Length of new clip in seconds.
Numeric. Time in seconds where new clip should start. Default 0.
Numeric. Length of the clipped wave file in seconds (if NULL, default, will be the length of time from start_time to the end of the file).
NULL
start_time
Logical. Whether to overwrite existing files when creating new clipped wave files. Default (FALSE) will error if the file already exists.
FALSE
# Create test wave file f <- temp_wavs(1) # Clip file and check it out clip_wave_single(f, "new_file.wav", clip_length = 1) tuneR::readWave("new_file.wav") unlink("new_file.wav")
Run the code above in your browser using DataLab