Filter löschen
Filter löschen

human voice frequency between 200h to 3200h

3 Ansichten (letzte 30 Tage)
Abdulkareem
Abdulkareem am 3 Okt. 2012
Kommentiert: Walter Roberson am 19 Apr. 2017
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 Kommentare
Walter Roberson
Walter Roberson am 3 Okt. 2012
Do you have the signal processing toolbox? The filter design toolbox?
Abdulkareem
Abdulkareem am 4 Okt. 2012
yes sir i have signal processing toolbox and i read Filter Design HDL Coder on help

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Honglei Chen
Honglei Chen am 4 Okt. 2012
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 Kommentare
Ahmet Ozan Tatlisu
Ahmet Ozan Tatlisu am 19 Apr. 2017
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 am 19 Apr. 2017
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 4 Okt. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by