load.wave {callsync}R Documentation

load.wave

Description

Wrapper function for 'readWave' from *tuneR*. Also optionally applies 'ffilter' from *seewave*.

Usage

load.wave(path_audio_file, from = 0, to = Inf, ffilter_from = NULL)

Arguments

path_audio_file

the path to the .wav file

from

time in seconds from where to start the loading of the audio file. Default is '0' which loads the whole file.

to

time in seconds until where to load the audio file. Default is 'Inf' which loads the whole file.

ffilter_from

numeric, frequency in Hz for the high-pass filter. Default is 'NULL', which does not apply a filter.

Value

Returns an R wave object.

Examples

require(callsync)
require(seewave)
require(tuneR)
path_git = 'https://raw.githubusercontent.com'
path_repo = '/simeonqs/callsync/master/tests/testthat/files'
file_1 = '/wave_1.wav'
url_1 = paste0(path_git, path_repo, file_1)
local_file_1 = paste(tempdir(), file_1, sep = '/')
if(!file.exists(local_file_1))
  download.file(url_1, destfile = local_file_1, mode = 'wb',)
wave = load.wave(local_file_1)


[Package callsync version 0.2.3 Index]