sox.spectrograms: Generate multiple spectrograms using SoX

Description Usage Arguments Examples

View source: R/soxspectrogram.R

Description

This function uses SoX to generate a multiple spectrograms of desired length from wav files.

Usage

1
2
3
4
5
6
7
sox.spectrograms(
  data,
  out.path = file.path(getwd(), "Spectrograms"),
  size = list(x = 1200, y = 500),
  duration = list(start = 0, end = 180),
  doParallel = FALSE
)

Arguments

data

Selection data.frame containing a file.path column with paths to wavs to generate spectrograms.

out.path

A string of the folder path to save the spectrogram file. Defaults to create a Spectrogram folder in your working directory.

size

A list for the x and y size in px of the spectrogram. Default is x = 1200 and y = 500 which is faster than the sox.spectrogram default.

duration

A list for the start and end time of the spectrogram in seconds. Default is start = 0 and end = 180 for a 3 min clip.

doParallel

Binary TRUE or FALSE whether to run process in parallel to save time. Will work better on some machines vs others.

Examples

1
sox.spectrogram(data,out.path = file.path(getwd(),"Spectrograms"), duration = list(start = 0, end = 180))

deanrobertevans/TrillR documentation built on Dec. 19, 2021, 10:06 p.m.