How to gender recognition with fft
조회 수: 88 (최근 30일)
이전 댓글 표시
Hello everyone!
I'm new to Matlab and for a project I need to do a "simple" exercise.
I need to record a voice and decide if it's a male or female voice.
How?
Simple:
- record a wave
- use fft on wave
- use statistics that counts the frequencies
- if there're more lower frequencies then the voice is from male
- if there're more upper frequencies then the voice is from female
(I know it's not very accurate, but this is my task)
I searched the internet for content and I was able to:
- record voice from microphone
- convert audiorecorder file to wav
- use fft on wav file
- but I don't know how to count the frequencies and decide the gender
I put a link here to the .m file where I'm at right now:
Advices, tips, codes are welcome.
Thanks!
ps: I found out that the MatLab FFT function only returns on vector of amplitudes. Is this a problem?
댓글 수: 3
Umr Nawaz
2022년 6월 10일
@kalsoom fatima thanks for the consideration. My email address is rumarnawaz@gmail.com
답변 (3개)
Star Strider
2014년 11월 24일
Interesting problem!
A free online article ‘Phonetic differences between male and female speech’ goes into significant detail. Also ‘The frequency range of the voice fundamental in the speech of male and female adults’ will give you some general guidance. I would certainly do a PubMed search for more information.
See the documentation for fft to understand how to calculate a frequency vector for your fft. You have to know your sampling frequency ‘Fs’, and the rest is straightforward.
If this was my project, my initial approach would use two appropriately-designed bandpass filters (Signal Processing Toolbox), and then compare the RMS values of the outputs of the respective filters to determine the gender. Your final design will depend on how robust you want your classification scheme to be.
댓글 수: 19
Akshat Dashore
2018년 5월 17일
please replace file name present inside wav.read and read with other downloaded audio file
Richard Tony
2020년 5월 22일
Hi, can you please tell me in your code, why do you use the value of 0.14 to compare with the meanfreq?? how did you deduce the value?
Brian Hemmat
2019년 4월 12일
The Audio Toolbox includes an example on gender identification using LSTM networks:
The example requires Audio Toolbox and Deep Learning Toolbox.
댓글 수: 0
kalsoom fatima
2021년 12월 20일
hi.can i get the complete source code of your project please.
thankyou
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!