audio_time {voice}R Documentation

Returns the total time of audio files in seconds

Description

Returns the total time of audio files in seconds

Usage

audio_time(x, filesRange = NULL, recursive = FALSE)

Arguments

x

Either a WAV file or a directory containing WAV files.

filesRange

The desired range of directory files (default: NULL, i.e., all files).

recursive

Logical. Should the listing recursively into directories? (default: FALSE) Used by base::list.files.

Value

A tibble containing file name <chr> and audio time <dbl> in seconds.

Examples

library(voice)

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

# Tibble containing file name and audio time
(at <- voice::audio_time(unique(dirname(path2wav))))
str(at)

[Package voice version 0.4.21 Index]