human voice frequency between 200h to 3200h

3 次查看(过去 30 天)
i konw that the human voice frequency between 200 to 3200 H and i record wave file ,how can i filter this wave ile so only human voice (frequency between 200 to 3200) will stay in the wave file
for record i use
Fs = 8000;
y = wavrecord(10*Fs, Fs, 'double');
  2 个评论
Walter Roberson
Walter Roberson 2012-10-3
Do you have the signal processing toolbox? The filter design toolbox?
Abdulkareem
Abdulkareem 2012-10-4
yes sir i have signal processing toolbox and i read Filter Design HDL Coder on help

请先登录,再进行评论。

采纳的回答

Honglei Chen
Honglei Chen 2012-10-4
Let's say the passband is between 200 and 3200 Hz and the stop band is 100 and 3300 Hz, you can use a Butterworth filter
Ws = [100 3300]/(Fs/2);
Wp = [200 3200]/(Fs/2);
[N,Wn] = buttord(Wp,Ws,0.1,30);
[b,a] = butter(N,Wn);
filter(b,a,y)
If you want more options to design your filter, try fdatool
  4 个评论
Ahmet Ozan Tatlisu
Ahmet Ozan Tatlisu 2017-4-19
oh ok but i have a homework that my instructer wants me to do filtering in frequency domain idk how to do, can you help ?
Walter Roberson
Walter Roberson 2017-4-19
The fft of the real-valued sound is going to give you a complex result where the second half is the complex conjugate of the reflection of the first half, similar to
[F, conj(fliplr(F))]
When you have that particular pattern of complex data then ifft() if it will give a real result.
However, your butter filter is not leaving your data in that pattern, so when you ifft() the result you will not get something that is real-valued, and then sound() will not be able to handle it.
If you were to apply your filter to only the first half of the data, and then put that together with the complex conjugate of its reflection, then you would get something that could be ifft()'d.
Note, though, that I simplified the pattern a little: what I wrote is for the case where the number of samples is even. In the case where the number of samples is odd, the midpoint of the fft will be real-valued and so will be its own complex conjugate.
Applying butter() to the result of fft() does not make much sense, but it is possible if you take the steps I describe.
You should be using a different technique to filter in the frequency domain.

请先登录,再进行评论。

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-10-4

Community Treasure Hunt

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

Start Hunting!

Translated by