r - How to get the frequency array and extract a range of frequency from wav file -


readwave('hello.wav',from=0,to=1,units='seconds') plot(hello@left,xlab="time",ylab="freq")   

but how frequency array before applying short-time fourier transform , take out specific range of frequency in r? example, [60,300] hz adult men , save wav. file.

it sounds you're asking frequency band-pass filter. package seewave has suitable function, fir, (and lot of other useful things).

library(tuner) library(seewave)  hello <- readwave("hello.wav")  hello.bp <- fir(hello, from=60, to=300, output="wave") hello.bp <- normalize(hello.bp, unit=as.character(hello.bp@bit)) meanspec(hello.bp, log="x") writewave(hello.bp, "hello.bp.wav") 

Comments