簡體   English   中英

如何獲取頻率陣列並從WAV文件中提取頻率范圍

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM