50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


voice (version 0.4.21)

get_dur: Time duration

Description

Get time duration from WAV file.

Usage

get_dur(x)

Value

Numeric indicating the time duration in seconds from a WAV file.

Arguments

x

Wave object from `tuneR::readWave`.

Examples

Run this code
library(voice)

# get path to audio file
path2wav <- list.files(system.file('extdata', package = 'wrassp'),
pattern <- glob2rx('*.wav'), full.names = TRUE)

rw <- tuneR::readWave(path2wav[1])
voice::get_dur(rw)

rwl <- lapply(path2wav, tuneR::readWave)
sapply(rwl, voice::get_dur)

Run the code above in your browser using DataLab