필터 지우기
필터 지우기

human voice frequency between 200h to 3200h

조회 수: 3 (최근 30일)
Abdulkareem
Abdulkareem 2012년 10월 3일
댓글: Walter Roberson 2017년 4월 19일
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