bishoph / sopare

Real time sound pattern recognition in Python for Raspberry/Banana Pi.
Other
321 stars 86 forks source link

Add SIMILARITY_ZERO_CROSSING_RATE setting #55

Closed a3020 closed 5 years ago

a3020 commented 5 years ago

Based on https://github.com/bishoph/sopare/issues/21#issuecomment-383583335 I think this setting is missing from the default.ini file.

If it's missing, it gives an error when using the 'plot' functionality.

a3020 commented 5 years ago

@bishoph I just realize that the combined values shouldn't exceed '1'. I don't know which values you think are appropriate as default settings.

bishoph commented 5 years ago

Cool, not sure why I haven't updated the default config yet. In my custom speech config the following values are used to turn lights on and off:

SIMILARITY_NORM = 0.5 SIMILARITY_HEIGHT = 0.2 SIMILARITY_DOMINANT_FREQUENCY = 0 SIMILARITY_ZERO_CROSSING_RATE = 0.3

Will merge within the next days...

a3020 commented 5 years ago

I think it'd make sense to better document all these config settings. As a newcomer to this project, I have a (really) hard time understanding all the different switches. The way I currently do it is via browsing the code, watching all the videos, and going through blog posts and comments.

Also, I have a suggestion for the default.ini file. I think it'd make more sense to create a default.ini.example file that users would have to rename manually. That way changes to the user's config are not tracked with Git. Do you agree?

a3020 commented 5 years ago

@bishoph I see you've already committed this yourself. If you want people to collaborate with you / this project, consider merging instead. I'll close this now, as the config setting has been added already via https://github.com/bishoph/sopare/commit/314bfbf60050a4e5a2c3242c58c374f0b9377fe3

bishoph commented 5 years ago

As I fixed some bugs recently it was far easier to push my changes I had anyway (as said in the comment above) than to run through the pull and merge commands to be honest ;)