How to gender recognition with fft
62 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Umr Nawaz
le 10 Juin 2022
@kalsoom fatima thanks for the consideration. My email address is rumarnawaz@gmail.com
Réponses (3)
Star Strider
le 24 Nov 2014
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 commentaires
Akshat Dashore
le 17 Mai 2018
please replace file name present inside wav.read and read with other downloaded audio file
Richard Tony
le 22 Mai 2020
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
le 12 Avr 2019
The Audio Toolbox includes an example on gender identification using LSTM networks:
The example requires Audio Toolbox and Deep Learning Toolbox.
0 commentaires
kalsoom fatima
le 20 Déc 2021
hi.can i get the complete source code of your project please.
thankyou
0 commentaires
Voir également
Catégories
En savoir plus sur Spectral Measurements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!