s = spectrogram(soundgen(), samplingRate = 16000, windowLength = 10,
output = 'original', plot = FALSE)
s = log(s + .001)
# image(s)
s1 = gaussianSmooth2D(s, kernelSize = 5, plotKernel = TRUE)
# image(s1)
if (FALSE) {
# more smoothing in time than in frequency
s2 = gaussianSmooth2D(s, kernelSize = c(5, 15))
image(s2)
# vice versa - more smoothing in frequency
s3 = gaussianSmooth2D(s, kernelSize = c(25, 3))
image(s3)
# sharpen the image by deconvolution with the kernel
s4 = gaussianSmooth2D(s1, kernelSize = 5, action = 'unblur')
image(s4)
s5 = gaussianSmooth2D(s, kernelSize = c(15, 1), action = 'unblur')
image(s5)
}
Run the code above in your browser using DataLab