Band Pass Filter from audiorecord
3 views (last 30 days)
Show older comments
hi, im trying to filter an audio using a bandpass filter for 400-2000Hz, im getting the audio from audiorecord and then plotting it with getaudiodata but when i tried to add the getaudiodata to my filter, just doesnt work. so far this is what i have:
clc;
fs = 8000;
a = audiorecorder (fs, 8, 1);
t = 0:1/fs:5;
disp('start speaking')
recordblocking(a, 5);
disp('stop speaking');
b = getaudiodata(a);
play(a);
x = fft(b);
subplot(2,1,1);
plot (x)
title('Señal de Audio original(spectrum)');
subplot(2,1,2);
plot(b); %señal original
title('Señal de Audio original');
After this how do i apply a filter to b = getaudiodata(a);
0 Comments
Answers (1)
Star Strider
on 30 Jul 2020
2 Comments
Star Strider
on 30 Jul 2020
You need to use audioread and use the sampling frequency (second output) with bandpass to get the result you want.
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!