tidy_audio: Tidy MP3 or Wave

Description Usage Arguments Details Value Examples

View source: R/data_prep.R

Description

Apply transformations on an wav object for modelling purposes.

Usage

1
tidy_audio(wav, sample_rate = 16000, bits = 16)

Arguments

wav

Wave object. Usualy returned by readMP3/readWave.

Details

The transformations are:

- mp3 to wav - normalization - stereo to mono

Value

a transformed Wave object.

Examples

1
2
3
4
5
6
library(tuneR)
mp3_dir <- system.file("mp3_sample", package = "mestrado")
mp3_files <- list.files(mp3_dir, full.names = TRUE)
wav <- readMP3(mp3_files[1])

transformed_wav <- tidy_audio(wav)

Athospd/mestrado documentation built on Jan. 2, 2021, 3:59 a.m.