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

Add wakeword detection with Genetic Programming #8

Open
farooqkz opened this issue Oct 2, 2023 · 5 comments
Open

Add wakeword detection with Genetic Programming #8

farooqkz opened this issue Oct 2, 2023 · 5 comments

Comments

@farooqkz
Copy link

farooqkz commented Oct 2, 2023

Hello. I was about to write a software in Rust to do the job of hotword/wakeword detection. And I found this crate. However, I wanted to do the detection with Genetic Programming. I would be happy to make a PR to add experimental wakeword detection with Genetic Programming to this crate. And it could become stable when the experiments are done and we have good enough accuracy. What do you think?

@GiviMAD
Copy link
Owner

GiviMAD commented Oct 2, 2023

Of course, that will be great. Any improvement or alternative detection method is welcome.

Are you going to add any additional dependency?

@farooqkz
Copy link
Author

farooqkz commented Oct 2, 2023

Of course, that will be great. Any improvement or alternative detection method is welcome.

Are you going to add any additional dependency?

Yeah I think it makes sense to write a library for GP and add it utilize it using rustpotter. And it makes sense that rustpotter have different detection methods available as "features" and GP is disabled by default as long as it's experimental.

@GiviMAD
Copy link
Owner

GiviMAD commented Oct 2, 2023

Yeah I think it makes sense to write a library for GP and add it utilize it using rustpotter.

Makes sense, I was asking because I would like to keep the library fully compatible with WebAssembly, but I don't think that would be a problem.

And it makes sense that rustpotter have different detection methods available as "features" and GP is disabled by default as long as it's experimental.

Yes, we can add features for the different detection methods, great idea, but I would prefer to have all of them enabled by default.

Maybe you have already look into these, but as a summary, rustpotter expose their different detection methods as different types of "wakewords", for adding a new one you need to:

  • Create a struct that implements the trait WakewordDetector which holds the implementation for this detection method.
  • Create a serializable struct implementing the traits WakewordLoad, WakewordSave and WakewordFile, used to save/load the wakeword data and initialize your detection implementation.
  • Also you need to modify the Rustpotteradd_wakeword_from_buffer method to try to deserialize the new type, and add a public method like pub fn add_wakeword_gp(&mut self, key: &str, wakeword: WakewordGP) -> Result<(), String> ....
  • Create a PR in the rustpotter-cli adding a command for creating this kind of wakeword.

I think those are all the steps required in order to add a new wakeword type, if no new config is required adding support to the other packages (the java and javascript ones) is just a matter of updating the library.

@farooqkz
Copy link
Author

farooqkz commented Nov 2, 2023

I'm working on it. However, I would like to polish my method more by testing on greater datasets. Currently with 11 positive and 11 negative samples, it reaches zero loss easily.

@farooqkz
Copy link
Author

I am still working on it. It has been a year? dunno. There is a Telegram group for Speech processing. If you are interested, consider joining. https://t.me/speech_recognition

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