Comments (16)
Hey, I could actually found the solution in this thread:
https://stackoverflow.com/questions/45992420/speechrecognizer-bind-to-recognition-service-failed
Just add this lines to your unityLibrary/manifests/AndroidManifest.xml:
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
from speech-and-text-unity-ios-android.
@tibi321 https://www.youtube.com/watch?v=Tyv3PRbe9fs You have to increase the Gradle version as shown in that video
its worked!!...thanks bro
from speech-and-text-unity-ios-android.
Hello All,
In android 11 we got this issue, after searching a lot we found that by adding the below lines it should work :
Error : Error SpeechRecognizer bind to recognition service failed
but our app was crashed & we got a new error please check the attached screenshot
Can anyone help us to fix it?
from speech-and-text-unity-ios-android.
The update needed is in \SpeechToText_AppleAPI\Assets\Plugins\Android\AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.starseed.speechtotext" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> <queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries> <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:configChanges="orientation|screenSize|locale" android:theme="@style/UnityThemeSelector"> <activity android:name="com.starseed.speechtotext.MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
Hey, I could actually found the solution in this thread:
https://stackoverflow.com/questions/45992420/speechrecognizer-bind-to-recognition-service-failedJust add this lines to your unityLibrary/manifests/AndroidManifest.xml:
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
Hey, I could actually found the solution in this thread:
https://stackoverflow.com/questions/45992420/speechrecognizer-bind-to-recognition-service-failedJust add this lines to your unityLibrary/manifests/AndroidManifest.xml:
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
Due to adding these lines There is an issue during build "package key is missing"
from speech-and-text-unity-ios-android.
@tibi321 https://www.youtube.com/watch?v=Tyv3PRbe9fs You have to increase the Gradle version as shown in that video
from speech-and-text-unity-ios-android.
Hello All, In android 11 we got this issue, after searching a lot we found that by adding the below lines it should work : Error : Error SpeechRecognizer bind to recognition service failed
but our app was crashed & we got a new error please check the attached screenshot Can anyone help us to fix it?
hi, did you manage to resolve this one your end? i'm facing this exact same error
from speech-and-text-unity-ios-android.
Hi, same problem here. In my case, I actually observed this problem on some phones with Android 10, either.
Have you found any solution?
from speech-and-text-unity-ios-android.
Same problem here. Just updated to Android 11. Seems like the MainActivity class is missing?
Here's a snapshot of the Android Logcat error that I'm getting at least.
from speech-and-text-unity-ios-android.
The update needed is in \SpeechToText_AppleAPI\Assets\Plugins\Android\AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.starseed.speechtotext"
android:versionCode="1" android:versionName="1.0">
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" />
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
<application
android:icon="@drawable/app_icon"
android:label="@string/app_name" android:debuggable="false"
android:configChanges="orientation|screenSize|locale"
android:theme="@style/UnityThemeSelector">
<activity
android:name="com.starseed.speechtotext.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
from speech-and-text-unity-ios-android.
The update needed is in \SpeechToText_AppleAPI\Assets\Plugins\Android\AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.starseed.speechtotext" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" /> <queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries> <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:configChanges="orientation|screenSize|locale" android:theme="@style/UnityThemeSelector"> <activity android:name="com.starseed.speechtotext.MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
Hey, I could actually found the solution in this thread:
https://stackoverflow.com/questions/45992420/speechrecognizer-bind-to-recognition-service-failed
Just add this lines to your unityLibrary/manifests/AndroidManifest.xml:
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
Hey, I could actually found the solution in this thread:
https://stackoverflow.com/questions/45992420/speechrecognizer-bind-to-recognition-service-failed
Just add this lines to your unityLibrary/manifests/AndroidManifest.xml:
<queries>
<package android:name="com.google.android.googlequicksearchbox"/>
</queries>
Due to adding these lines There is an issue during build "package key is missing"
how will i solve this build error
from speech-and-text-unity-ios-android.
Hi there, I seem to be having the same issues as everyone else, but the solutions don't seem to be doing anything. Regarding upgrading the gradle version, the video says to upgrade it to 3.4.3
, but on the latest version of unity it's already at 4.0.1
, and going backwards doesn't seem to help. I have also copy and pasted the exact xml code to AndroidManifest.xml, so I've really seemed to hit a roadblock. Right now all I'm trying to do is to run the sample scene on my android phone and not get the Error Unity java.lang.ClassCastException: com.unity3d.player.UnityPlayerActivity cannot be cast to com.starseed.speechtotext.MainActivity
error. Any help would go a long ways. Thanks so much.
"
from speech-and-text-unity-ios-android.
Hi there, I seem to be having the same issues as everyone else, but the solutions don't seem to be doing anything. Regarding upgrading the gradle version, the video says to upgrade it to
3.4.3
, but on the latest version of unity it's already at4.0.1
, and going backwards doesn't seem to help. I have also copy and pasted the exact xml code to AndroidManifest.xml, so I've really seemed to hit a roadblock. Right now all I'm trying to do is to run the sample scene on my android phone and not get theError Unity java.lang.ClassCastException: com.unity3d.player.UnityPlayerActivity cannot be cast to com.starseed.speechtotext.MainActivity
error. Any help would go a long ways. Thanks so much. "
from speech-and-text-unity-ios-android.
I adjusted the manifests and it still does not work.
Later I found out that I checked the Release option of Minify.
After I unchecked the Minify option, it worked.
from speech-and-text-unity-ios-android.
After adding in menifest
<queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries>
I was experiencing crash with error
2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime FATAL EXCEPTION: main 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime Process: com.starseed.speechandtext, PID: 32514 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.get(int)' on a null object reference 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at com.starseed.speechtotext.MainActivity$3.onResults(MainActivity.java:115) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at android.speech.SpeechRecognizer$InternalListener$1.handleMessage(SpeechRecognizer.java:459) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:106) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at android.os.Looper.loop(Looper.java:246) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at android.app.ActivityThread.main(ActivityThread.java:8633) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at java.lang.reflect.Method.invoke(Native Method) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) 2022-05-05 18:51:21.677 32514 32514 Error AndroidRuntime at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Then I found a comment saying to add following in menifest
<queries> <intent> <action android:name="android.speech.RecognitionService" /> </intent> </queries>
Now, app does not crash but when ever I am trying to detect speech it says following
2022-05-05 18:18:09.511 24114 24114 Error SpeechRecognizer bind to recognition service failed
from speech-and-text-unity-ios-android.
Hello All, In android 11 we got this issue, after searching a lot we found that by adding the below lines it should work : Error : Error SpeechRecognizer bind to recognition service failed
but our app was crashed & we got a new error please check the attached screenshot Can anyone help us to fix it?hi, did you manage to resolve this one your end? i'm facing this exact same error
Hi, MaekellMina.
No unfortunately we haven't managed to resolve the issue from our end, we are exploring other possible solutions at this stage. Will keep you posted if we find anything useful.
from speech-and-text-unity-ios-android.
Hi,
I have found a fix for this issue. Reason for crash was in MainActivity.java
@Override
public void onResults(Bundle results) {
ArrayList<String> text = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
/// For some reason `text` is null.
UnityPlayer.UnitySendMessage("SpeechToText", "onResults", text.get(0));// this line was crashing.
}
so I added a null check like this and built a new SpeechToTextPlugin.jar
@Override
public void onResults(Bundle results) {
ArrayList<String> text = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
if(text!=null && !text.isEmpty())
{
UnityPlayer.UnitySendMessage("SpeechToText", "onResults", text.get(0));
}else {
UnityPlayer.UnitySendMessage("SpeechToText", "onResults", "null recieved");
}
}
Solution:
- Download and extract following zip file.
SpeechToTextPlugin.zip - Replace new
SpeechToTextPlugin.jar
in 'Assets\Plugins\Android' folder.
Note:
For some reason we will get result in onPartialResultsCallback
not in onResultCallback
.
from speech-and-text-unity-ios-android.
Related Issues (20)
- .
- Build is failing in xcode
- Registering new Vocabulary for the Speech-To-Text-Plugin to understand (IOS)
- IOS build error by undefined sumbols for arm64
- Error on Samsung S8 HOT 18
- Error SpeechRecognizer bind to recognition service failed |Android 11 HOT 11
- Build fails for iOS HOT 2
- Speech to text in android not working HOT 9
- Recents problems with Android 11 HOT 2
- Language pt-BR (Brasil) uses pt (Portugal)
- Speech to text doesn't work with popup - false (android) HOT 3
- speech to text just doesnot work
- Unity plugin speechToText not working when isShowPopupAndroid = false HOT 11
- Speech recognition not working HOT 1
- Create text in real time
- TextMeshPro not updating, does anyone know how to solve this? HOT 2
- 2 Android manifest
- Unexpected file found in Frameworks error during iOS Archiving process. HOT 1
- Android build fails
- IOS Text to Speech is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speech-and-text-unity-ios-android.