How to gender recognition with fft

62 visualizaciones (últimos 30 días)
Peter
Peter el 24 de Nov. de 2014
Editada: Umr Nawaz el 10 de Jun. de 2022
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 comentarios
kalsoom fatima
kalsoom fatima el 10 de Jun. de 2022
Hi! @Umr Nawaz please share your email address.Thank you
Umr Nawaz
Umr Nawaz el 10 de Jun. de 2022
@kalsoom fatima thanks for the consideration. My email address is rumarnawaz@gmail.com

Iniciar sesión para comentar.

Respuestas (3)

Star Strider
Star Strider el 24 de Nov. de 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 comentarios
Akshat Dashore
Akshat Dashore el 17 de Mayo de 2018
please replace file name present inside wav.read and read with other downloaded audio file
Richard Tony
Richard Tony el 22 de Mayo de 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?

Iniciar sesión para comentar.


Brian Hemmat
Brian Hemmat el 12 de Abr. de 2019
The Audio Toolbox includes an example on gender identification using LSTM networks:
The example requires Audio Toolbox and Deep Learning Toolbox.

kalsoom fatima
kalsoom fatima el 20 de Dic. de 2021
hi.can i get the complete source code of your project please.
thankyou

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by