voice icon indicating copy to clipboard operation
voice copied to clipboard

Efficient way to always get n most recent partial results?

Open dangtony98 opened this issue 4 years ago • 3 comments

For context, I'm working on a voice recognition application that wishes to consider the last n words that are uttered by the user; the application doesn't care about any words that precede the last n-word window.

partialResults seems to return results from the beginning of start recognizing and clears when I either stop or cancel recognizing. Given this output, I'm currently slicing the last n words off the partialResults to be considered by my application but this feels inefficient in the order of O(n) ...

Is there a more efficient way to limit partialResults to by default only return the n most recent results at all times?

dangtony98 avatar Dec 30 '21 18:12 dangtony98

I'm also looking at this problem. it seems that this library does not provide a continual mode to get partial results.

I'm going to attempt detecting speech, then set a window of say 5 seconds to get partial results and repeat.

hongzhou85 avatar Feb 08 '22 18:02 hongzhou85

Yeah I just want a clear/easy way to reset partialResults to an empty string. I'm trying to cancel and/or stop and/or destroy...but i run into all sorts of errors and issues.

tslater avatar Apr 16 '22 05:04 tslater

it must be a bug. partial results should not always the same as results.

chhornponleu avatar Aug 21 '22 02:08 chhornponleu

any update on this issue?

aliyaus avatar Dec 06 '22 20:12 aliyaus