Band Pass Filter from audiorecord
Mostrar comentarios más antiguos
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);
Respuestas (1)
Star Strider
el 30 de Jul. de 2020
0 votos
2 comentarios
miroslava del carmen villanueva castillo
el 30 de Jul. de 2020
Star Strider
el 30 de Jul. de 2020
You need to use audioread and use the sampling frequency (second output) with bandpass to get the result you want.
Categorías
Más información sobre Measurements and Spatial Audio en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!