Filter specific frequencies in an audio file

31 次查看(过去 30 天)
Hello,
First time asking a question on here as I have hit that brick wall now.
I am trying to filer an audio signal that I have, for example I only want to know between 100 and 1000 Hz, instead of the whole thing. I can try a limit of the axis, but of course the data is still there when I further process it.
I have read through many, many, many examples on here and can't seem to figure it out at all. I have looked at bandpass filtering, something to do with butter....
My code uses a FFT to look at the full frequency spectrum, with the audio clip available at http://bit.ly/2RlPl6p . This is just the FFT, I haven't included any filering bits.
File = 'Loud.wav';
[x,fs] = audioread(File);
lpad = 8*length(x);
xdft = fft(x,lpad);
xdft = xdft(1:lpad/2+1);
xdft = xdft/length(x);
xdft(2:end-1) = 2*xdft(2:end-1);
freq = 0:fs/lpad:fs/2;
plot(freq,(abs(xdft)));
hold on
xlabel('Hz')
xlim([0,16000])
ylim([0,3e-3])
ylabel('Amplitude')
hold off
Any help at all would be greatly appreciatied!
(I am not a student doing homework)
P.s.
This is the wav file stats.
SampleRate: 48000
TotalSamples: 513984
Duration: 10.7080
Title: []
Comment: []
Artist: []
BitRate: 63.1170

采纳的回答

Star Strider
Star Strider 2019-1-12
If you have R2018a or later, use the bandpass (link) function.
If you want to filter it in the frequency domain, see the documentation for the fftfilt (link) function.
  14 个评论
Kavy Jain
Kavy Jain 2020-9-7
can somebody plz help me how to extract a given audio signal from set of audio signals

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by