Band Pass Filter from audiorecord
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);
Answers (1)
Star Strider
on 30 Jul 2020
0 votes
2 Comments
miroslava del carmen villanueva castillo
on 30 Jul 2020
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.
Categories
Find more on Measurements and Spatial Audio 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!