Picovoice / wake-word-benchmark

wake word engine benchmark framework
https://picovoice.ai/
Apache License 2.0
131 stars 28 forks source link

unnecessary recomputaion of `_pcm_energy(speech)` #6

Closed csukuangfj closed 5 years ago

csukuangfj commented 5 years ago

See the code https://github.com/Picovoice/wakeword-benchmark/blob/1a6745de51577f646cfb46d061b85415d5216425/mixer.py#L36-L43

speech_energy is computed at https://github.com/Picovoice/wakeword-benchmark/blob/1a6745de51577f646cfb46d061b85415d5216425/mixer.py#L39

Therefore, line https://github.com/Picovoice/wakeword-benchmark/blob/1a6745de51577f646cfb46d061b85415d5216425/mixer.py#L43 can use speech_energy directly instead of computing it again.

kenarsa commented 5 years ago

Cool! Can you please submit a PR and I will merge it in. Thanks.