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

Hard to detect final speech recognition result when using GoogleRecognitionServiceImpl #37

Open
AniFichadia opened this issue May 7, 2017 · 0 comments

Comments

@AniFichadia
Copy link

AniFichadia commented May 7, 2017

This is an enhancement proposal, I hope I'm not missing anything.

When you use the GoogleRecognitionServiceImpl as the AIService, there's no easy way of notifying the user of their final speech output when its submitted to API.AI.

You can use the PartialResultsListener with GoogleRecognitionServiceImpl, but you get something like 2 callbacks to PartialResultsListener.onPartialResults(List<String>) after receiving the AIListener.onListeningFinished() callback.

Here's the logcat output from my phone to illustrate the issue, refer to the last 3-4 lines:
api_ai_partial_result_listener_output_logcat

The really hacky, nasty and potentially fragile way to detect the final input is to just wait for 2 callbacks after AIListener.onListeningFinished().

I'd like to modify theGoogleRecognitionServiceImpl.InternalRecognitionListener.onResults(Bundle) handling by adding something like a QuerySubmitListener (prevents breaking the PartialResultsListener contract). The QuerySubmitListener would notify developers of the query or queries and the confidences (right about here https://github.com/api-ai/apiai-android-client/blob/master/ailib/src/main/java/ai/api/services/GoogleRecognitionServiceImpl.java#L392).

Happy to create a PR if this sounds OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant