+1 vote

Need some serious help here with Godot + Android integration/behavior with speech api.

Previously, I was able to integrate google speech api with Godot,and it worked perfectly. Details: https://github.com/literaldumb/Godot-SpeechToText/blob/master/speechtotext/GodotSpeech.java

Now, I want to do away with the mic dialog which pops up when the google speech engine is triggered. I took this tutorial as reference: http://www.truiton.com/2014/06/android-speech-recognition-without-dialog-custom-activity/

This is my implemented code: https://github.com/literaldumb/Godot-CustomSpeech/blob/master/GodotSpeech.java

The app crashes as soon as the SpeechRecognizer.createSpeechRecognizer() method is called with the error: java.lang.RuntimeException: SpeechRecognizer should be used only from the application's main thread.

I took a guess at the above error and exposed the onCreate() method from Godot.java and called the createSpeechRecognizer() method from within onCreate(). The problem still exists.

I need some understanding or workaround or a better approach to achieve the same. Any help is hight appreciated.

in Engine by (51 points)

1 Answer

0 votes

did you find some more information about this. I'm looking into using voice api for a game i'm making. IOS posablility asweel?

by (38 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.