Skip to content

Instantly share code, notes, and snippets.

@erzk
Created September 1, 2018 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erzk/e114baf74913108feb3c8906de0e1918 to your computer and use it in GitHub Desktop.
Save erzk/e114baf74913108feb3c8906de0e1918 to your computer and use it in GitHub Desktop.
library(soundgen)
# synthesize a sound 1 s long, with gradually increasing hissing noise
sound = soundgen(sylLen = 1000,
temperature = 0.001,
noiseAnchors = list(
time = c(0, 1300),
value = c(-120, 0)),
formantsNoise = list(
f1 = list(
freq = 5000,
width = 10000)))
# basic spectrogram
spectrogram(sound, samplingRate = 16000)
# there is a function with the same name in phonTools so you might want to
# be more verbose and call it using soundgenn:spectrogram() to avoid clashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment