preemphasis {seewave} | R Documentation |
A pre-emphasis frequency filter for speech
preemphasis(wave, f, channel = 1, alpha = 0.9, plot = FALSE, output = "matrix", ...)
wave |
an R object. |
f |
sampling frequency of |
channel |
channel of the R object, by default left channel (1). |
alpha |
time constant, see |
plot |
a logical, if |
output |
character string, the class of the object to return,
either |
... |
other arguments to be passed to |
The function applies a pre-emphasis filter usually applied in speech analysis. The filter is a kind of high-pass frequency filter that amplifies the high-frequency content of the sample. The filter is defined with:
y(n) = x(n) - alpha * x(n - 1)
where alpha is a time constant usually set between 0.9 and 1.
The frequency response of the filter is obtained with:
H(f) = 1+a^2 - 2*a*cos(2*pi*freq*1000/f)
A new wave is returned. The class of the returned object is set with the argument output
.
Jerome Sueur
bwfilter
, combfilter
, ffilter
, fir
,lfs
, afilter
data(sheep) fc <- 150 f <- sheep@samp.rate alpha <- exp(-2*pi*fc/f) res <- preemphasis(sheep, alpha=alpha, output="Wave")