-
Notifications
You must be signed in to change notification settings - Fork 127
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
Unity plugin speechToText not working when isShowPopupAndroid = false #82
Comments
Hi ! I had the same problem with isShowPopupAndroid = false. And for now i fixed it.
I had to investigate this problem. And it seams when you're not using the popup, google services can't manage errors. Thanks to the adb debugger I found multiple exception with a runtime exception --> CRASH. Like this one: So I go in the plugin with Android Studio and manage exception for now.
I had NullPointerException and IndexOutOfBoundsException to avoid those problems for now. And also had intent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true); in the intent started without popup. So exception are catch and application doesn't crashed ! I need to re-build the plugin also |
Android studio not working on my pc, can you give me rebuild of this plugin for Unity? |
hey buddy, I have done the change you mentioned, in the android project. |
I know I'm a bit late to this issue, but this worked for me:
|
Also, this issue might have something to do with this: [Bug] Null results with Voice Recognition Service... |
Do you have the .jar? I really never use Android Studio and I don't know how it works.... |
You can download the |
Hi @Uralstech, When i use SpeechToTextPlugin.jar from main source, app get crashes when speak stop in onResults. because its has null value, when i try to use jar from link you share its not crashing now. but its does not print result because its null. |
Hi! Thanks for checking out my fork, @JebarajDaniel! You will have to keep track of the partial results in a variable, like this: private string _partialResults;
private void Start()
{
// STT & TTS setup code goes here.
SpeechToText.Instance.onResultCallback += (results) =>
{
if (string.IsNullOrEmpty(results))
Debug.Log(_partialResults);
else
Debug.Log(results);
_partialResults = string.Empty;
};
SpeechToText.Instance.onPartialResultsCallback += (partialResults) => _partialResults = partialResults;
} |
hi @Uralstech |
You can find the
|
Some information:
If isShowPopupAndroid = true it's working fine, but if isShowPopupAndroid = false it's not working:
The text was updated successfully, but these errors were encountered: