Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] update to run #16

Open
zoldaten opened this issue Jan 11, 2024 · 1 comment
Open

[SOLVED] update to run #16

zoldaten opened this issue Jan 11, 2024 · 1 comment

Comments

@zoldaten
Copy link

zoldaten commented Jan 11, 2024

thanks for model. i did not install it from requirements so stuck with errors.
and fixed em.
so to start it working with updated sklearn:
in Voice-based-gender-recognition\Code\ModelsTrainer.py change:

#from sklearn.mixture import GMM
from sklearn import mixture

#females_gmm = GMM(n_components = 16, n_iter = 200, covariance_type='diag', n_init = 3)
#males_gmm   = GMM(n_components = 16, n_iter = 200, covariance_type='diag', n_init = 3)
females_gmm = mixture.GaussianMixture(n_components = 16, max_iter = 200, covariance_type='diag', n_init = 3)
males_gmm   = mixture.GaussianMixture(n_components = 16, max_iter = 200, covariance_type='diag', n_init = 3)

also in FeaturesExtractor.py to avoid warnings:

#nfft         = 512,
nfft         = 2400,

also i have to change a bit GenderIdentifier.py (i use Windows) when i use it alone:

expected_gender = file.split("\\")[1][:-1]
#expected_gender = file.split("/")[1][:-1]
#gender_identifier = GenderIdentifier("TestingData/females", "TestingData/males", "females.gmm", "males.gmm")
gender_identifier = GenderIdentifier("females", "males", "females.gmm", "males.gmm")

and finally i saw strange thing - the model identifies upside-down:

--> TESTING        : 1073565748.wem.wav
+ FEMALE SCORE     : 0.487
+ MALE SCORE       : 0.8
+ EXPECTATION      : 1073565748.wem.wa
+ IDENTIFICATION   : male
----------------------------------------------------
--> TESTING        : 1073638869.wem.wav
+ FEMALE SCORE     : -0.127
+ MALE SCORE       : 0.432
+ EXPECTATION      : 1073638869.wem.wa
+ IDENTIFICATION   : male
----------------------------------------------------
--> TESTING        : 1073566498.wem.wav
+ FEMALE SCORE     : 0.661
+ MALE SCORE       : 0.229
+ EXPECTATION      : 1073566498.wem.wa
+ IDENTIFICATION   : female
----------------------------------------------------
*** Accuracy = 0.0% ***

True results: male -> female, female -> male.
May be somewhere is wrong path?

ok.fixed the last just changed *args in GenderIdentifier.py like follows:
gender_identifier = GenderIdentifier("males", "females", "males.gmm","females.gmm")

@yegeonhee
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants