bishoph / sopare

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

Raw files are not being generated in dict #81

Open Calliygous87 opened 4 years ago

Calliygous87 commented 4 years ago

I have been playing with sopare for a few months, trying to tune it. I played around with a lot of the config settings, and ran into various issues. Most recently, when I run

python2.7 sopare.py -v -t [whatever word]

it appears to complete normally, but it doesn't generate a file in the dict folder.

DEBUG:sopare.worker:characteristic = 7 {'dfm': 5384, 'peaks': [], 'df': 23, 'volume': 32, 'fc': 28.8, 'norm': [0.2519432143823154, 0.22318844398948093, 0.20071753049756172, 0.2136548267965626, 0.22417511718584066, 0.18617595757458338, 0.18838399427283367, 0.16998043209156405, 0.1885089280426451, 0.1761397285193244, 0.18974441158873803, 0.17672721237103814, 0.19149833803021746, 0.18546270313910432, 0.1725360196372977, 0.17605895333641222, 0.17060876939118427, 0.17099732490087569, 0.1826009547910714, 0.1765820657558681, 0.16010990320083737, 0.1757318007420866, 0.17391228706615175, 0.16064826612749547, 0.18590990978658958, 0.17307250540617722, 0.16757538470664501, 0.16568737327807073, 0.1742288046109486], 'token_peaks': [10143, 15357, 14198, 13319, 16546, 14727]} DEBUG:sopare.worker:meta = [{'adapting': 14727, 'token_peaks': [10143, 15357, 14198, 13319, 16546, 14727], 'pos': 48, 'volume': 32, 'token': 'token', 'silence': 39}] INFO:sopare.buffering:stop buffering INFO:sopare.buffering:terminating queue runner DEBUG:sopare.worker:characteristic = 8 {'dfm': 0, 'peaks': [], 'df': 0, 'volume': 0, 'fc': 0.0, 'norm': [0], 'token_peaks': []} DEBUG:sopare.worker:meta = [{'token': 'stop'}] INFO:sopare.recorder:Buffering not alive, stop recording INFO:sopare.recorder:stop endless recording

Eventually I decided I had gotten to deep to sort out which settings were causing my problems, so I deleted sopare and got a fresh installation following the instructions on the main page. My problem persists, every time I train a word, everything looks the same as it always has, but no file is generated.

bishoph commented 4 years ago

The end of the word does not get detected and the input ends. From my experience you need to adjust the parameters MAX_SILENCE_AFTER_START, MAX_TIME , LONG_SILENCE and/or THRESHOLD. My suggestion is to stay with the defaults and only adapt the THRESHOLD.