sox.spectrogram: Generate a spectrogram using SoX

Description Usage Arguments Examples

View source: R/soxspectrogram.R

Description

This function uses SoX to generate a spectrogram of desired length from a wav file.

Usage

1
2
3
4
5
6
7
sox.spectrogram(
  file.path,
  out.path = file.path(getwd(), "Spectrograms"),
  size = list(x = 2000, y = 1000),
  duration = list(start = 0, end = 180),
  soxpath
)

Arguments

file.path

A string of the file path to the wav file you want to generate a spectrogram for.

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 = 2000 and y = 1000 which should work for most instances.

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.

Examples

1
sox.spectrogram("C:/LV-01-01-01/LV-01-01-01_20170609_033500.wav",out.path = file.path(getwd(),"Spectrograms"), size = list(x = 2000, y = 1000), duration = list(start = 0, end = 180))

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