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

how to test the network on new voices? #13

Open
ranch-hands opened this issue Jul 5, 2023 · 7 comments
Open

how to test the network on new voices? #13

ranch-hands opened this issue Jul 5, 2023 · 7 comments
Labels
question Further information is requested

Comments

@ranch-hands
Copy link

Hi
thanks for your good work .
will you please explain how to test the network on new data ?
how can we test it on our own voices?

thanks

@SuperKogito
Copy link
Owner

Hello,
The easiest way is to use https://github.com/SuperKogito/Voice-based-gender-recognition/blob/cecc0469196e0a212716a1b3ddc085fe8e78288a/Code/GenderIdentifier.py#L66C1-L68C32

if __name__== "__main__":
    gender_identifier = GenderIdentifier("TestingData/females", "TestingData/males", "females.gmm", "males.gmm")
    gender_identifier.process()

just place your data under a TestingData folder and pass it to GenderIdentifier() as shown above.

@SuperKogito SuperKogito added the question Further information is requested label Jul 5, 2023
@ranch-hands
Copy link
Author

ranch-hands commented Jul 5, 2023 via email

@ranch-hands
Copy link
Author

It means that each time (for testing) the network should be trained?
each time the run.py downloads the dataset and builds the TestingData folder by itself.

@SuperKogito
Copy link
Owner

No you train once and then you test as many times as you want.
the https://github.com/SuperKogito/Voice-based-gender-recognition/blob/master/nnCode/ModelsTrainer.py is responsible for the training, which results in having 2 models one for males and one for females. These models are used by the https://github.com/SuperKogito/Voice-based-gender-recognition/blob/master/nnCode/GenderIdentifier.py to test the new voices/ audios.

@ranch-hands
Copy link
Author

ranch-hands commented Jul 6, 2023

When I give a sound to GenderIdentifier.py it gives error:

984/984 [==============================] - 2s 2ms/step - loss: 0.2400 - accuracy: 0.9044
Epoch 5/5
984/984 [==============================] - 2s 2ms/step - loss: 0.2262 - accuracy: 0.9094

--> TESTING        : testsound.m4a
Error

--> TESTING        : all_systems_go.wav

Some rows of transmat_ have zero sum because no transition from the state was ever observed.
Some rows of transmat_ have zero sum because no transition from the state was ever observed.
Some rows of transmat_ have zero sum because no transition from the state was ever observed.
Some rows of transmat_ have zero sum because no transition from the state was ever observed.
(16, 39)
Error
*** Accuracy = 100.0% ***

or:

Epoch 5/5
984/984 [==============================] - 2s 2ms/step - loss: 0.2195 - accuracy: 0.9144
--> TESTING        : testsound.wav
Error
--> TESTING        : all_systems_go.wav
(16, 39)
Error
*** Accuracy = 100.0% ***

@SuperKogito
Copy link
Owner

Your audios must be mono waves as far I remember so anything different will probably not work. Make sure your audio is not stereo. Use ffmpeg to convert it if needed.

@alizahid999
Copy link

alizahid999 commented Jul 20, 2023 via email

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

No branches or pull requests

3 participants