[英]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")
但是如何在應用短時傅立葉變換之前獲得頻率陣列並在R中取出特定的頻率范圍呢? 例如,成年男性為[60,300] Hz,另存為另一個波形。 文件。
聽起來您正在請求一個帶通濾波器。 軟件包seewave
具有合適的功能fir
和其他許多有用的東西 。
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")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.