Skip to content

[SOLVED] update to run #16

@zoldaten

Description

@zoldaten

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions