# NOT RUN {
# [a] with F1-F3 visible
image(t(getSpectralEnvelope(nr = 512, nc = 50,
formants = soundgen:::convertStringToFormants('a'),
temperature = 0)))
# some "wiggling" of specified formants plus extra formants on top
image(t(getSpectralEnvelope(nr = 512, nc = 50,
formants = soundgen:::convertStringToFormants('a'),
temperature = 0.1, formantDepStoch = 10)))
# stronger extra formants
image(t(getSpectralEnvelope(nr = 512, nc = 50,
formants = soundgen:::convertStringToFormants('a'),
temperature = 0.1, formantDepStoch = 30)))
# a schwa based on the length of vocal tract = 15.5 cm
image(t(getSpectralEnvelope(nr = 512, nc = 50, formants = NA,
temperature = .1, vocalTract = 15.5)))
# no formants at all
image(t(getSpectralEnvelope(nr = 512, nc = 50,
formants = NA, temperature = 0)))
# manual specification of formants
image(t(getSpectralEnvelope(nr = 512, nc = 50,
samplingRate = 16000, formants = list(
'f1' = data.frame('time' = 0, 'freq' = 900, 'amp' = 30, 'width' = 120),
'f2' = data.frame('time' = 0, 'freq' = 1300, 'amp' = 30, 'width' = 120),
'f3' = data.frame('time' = 0, 'freq' = 3200, 'amp' = 20, 'width' = 200)))))
# }
Run the code above in your browser using DataLab