capacitor-community / speech-recognition

MIT License
81 stars 43 forks source link

fix(android)!: correct handling of partial results #60

Closed mxlle closed 1 year ago

mxlle commented 1 year ago

Android stops recognition automatically, so the start promise should be resolved on the results event even if partialResults are activated.

This should fix #58 and parts of #43

An alternative approach could be to also pass through the results event, sth like: notifyListeners("results", ret);

Long term it could also be nice to include EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS as param, though I think that would require more changes.

mxlle commented 1 year ago

@jcesarmobile how are the chances of getting this merged? Any changes needed?