zenorocha / voice-elements

:speaker: Web Component wrapper to the Web Speech API, that allows you to do voice recognition and speech synthesis using Polymer
http://zenorocha.github.io/voice-elements
1.36k stars 256 forks source link

voice-recognition Element does not clear it's previous result, on a new run #32

Open avdaredevil opened 8 years ago

avdaredevil commented 8 years ago

Hi, I am having a pestering problem where the last result get's appended to the current result, the more times I trigger the element, the way I solved this was by keeping a track of how long the last e.detail.result was and accordingly substring out that length from the next result, but this is a sure shot way of creating memory leaks, or unnecessary computation.

Is it possible to clear the internal results after a on-result is triggered. Thanks.

che-effe commented 7 years ago

Yes please I would love a better way to handle this issue.

che-effe commented 7 years ago

I just submitted a PR to fix this, #35

che-effe commented 7 years ago

@zenorocha Will #35 this cause any issues with how you intend this to function?

masonlouchart commented 6 years ago

The PR was merged, I tested the branch master and it works, so I guess this issue can be closed 🤓.

The repo isn't really active so, it is possible to make a release patch to get the fix without using master @zenorocha ?