get_samp.rate {voice}R Documentation

Get sample rate

Description

Get sample rate from WAV file.

Usage

get_samp.rate(x)

Arguments

x

Wave object from 'tuneR::readWave'.

Value

Integer indicating the sample rate from a WAV file.

Examples

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_samp.rate(rw)

rwl <- lapply(path2wav, tuneR::readWave)
sapply(rwl, voice::get_samp.rate)

[Package voice version 0.4.21 Index]