Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Listener for Final Result or Listening Stopped #68

Closed
alistairheath opened this issue May 29, 2023 · 6 comments
Closed

Event Listener for Final Result or Listening Stopped #68

alistairheath opened this issue May 29, 2023 · 6 comments

Comments

@alistairheath
Copy link

Is your feature request related to a problem? Please describe.
On iOS and Android when implementing this plugin, speech recognitions starts and then stops either when the user finishes talking or after a predetermined a mount of time. Whilst it is possible to capture the partial results as the listener is talking. It doesn't seem possible to either listen indefinitely and the use the .stop() method to manually stop listening and process teh final result, nor is there a listener to return the full result.

Describe the solution you'd like
I think the above could be solved with one of two new features:

  • An event listener for "finalResult" as well as "partialResult".
  • The ability for the speech recognition to go on indefinitely with a manual .stop() ending it. This could be followed by a .then() which could handle the final results set.

Describe alternatives you've considered

  • If details could be shared in the documentation for the default listening time on each platform then one could set a Timeout to trigger once listening has stopped.
  • An isListening() method was proposed in Issue Add isListening function #44, this could be repeatedly called to determine if the listening session ahs ended, were this feature to be implemented.
@OnlinePage

This comment was marked as abuse.

@adamcohenhillel
Copy link

Is there an update on this one?

@focafull
Copy link

For me not having this events makes it unusable for now. Maybe an error event would be nice to have.

@veneliniliev

This comment was marked as abuse.

@shaibrown5
Copy link

for me IOS works fine, records on start and stops recording on stop.
however Android does not work. as stated above, the recording finishes when user pauses or after a few seconds.

PR #83 added a useful isListening method that has 2 problems:
Ios - isListening returns undefined both when recording and not.
Android - isListening works fine, but can not be used to override the automatic stopping of the recording.

@jcesarmobile
Copy link
Contributor

isListening is working fine for me on iOS, if it doesn't work for you, please, create a new issue and provide a sample app that reproduces the problem

it's not possible to do continuous recognition on any of the platforms, iOS stops after a minute, Android when it detects a silence.
You can listen for the listeningState event and when the status is stopped call start again.

iOS was missing some cases where listeningState with stopped value should be fired, fixed on #95

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants