Learn R Programming

voice (version 0.4.21)

is_mono: Verify if an audio is mono

Description

Verify if an audio is mono

Usage

is_mono(x)

Value

Logical. `TRUE` indicates a mono (one-channel) file. `FALSE` indicates a non-mono (two-channel) file.

Arguments

x

Path to WAV audio file.

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)

is_mono(path2wav[1])
sapply(path2wav, is_mono)

Run the code above in your browser using DataLab