简体   繁体   中英

Speech Recognition(Speech To Text) is not working in android 4.2.2

I have device which has android 4.2.2 is installed on it. Is is not supporting SpeechRecognition api. I tried one speech to text application and it is giving "Speech to Text doesnot support in your device" error. I also tried installing Google Search application and tried to search using voice icon, but it is giving following exception:

02-13 21:58:48.077: E/AndroidRuntime(9403): java.lang.RuntimeException:  java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError:  Couldn't load google_recognizer_jni from loader  dalvik.system.PathClassLoader[dexPath=/system/app/com.google.android.googlequick searchbox-4.0.26.1499465.arm-300400260-minAPI16.apk,libraryPath=/data/app- lib/com.google.android.googlequicksearchbox-4.0.26.1499465.arm-300400260- minAPI16]: findLibrary returned null
02-13 21:58:48.077: E/AndroidRuntime(9403):     at emt.afterExecute(PG:487)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.lang.Thread.run(Thread.java:856)
02-13 21:58:48.077: E/AndroidRuntime(9403): Caused by:  java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError:  Couldn't load google_recognizer_jni from loader  dalvik.system.PathClassLoader[dexPath=/system/app/com.google.android.googlequick searchbox-4.0.26.1499465.arm-300400260-minAPI16.apk,libraryPath=/data/app- lib/com.google.android.googlequicksearchbox-4.0.26.1499465.arm-300400260- minAPI16]: findLibrary returned null
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.util.concurrent.FutureTask.report(FutureTask.java:94)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.util.concurrent.FutureTask.get(FutureTask.java:160)
02-13 21:58:48.077: E/AndroidRuntime(9403):     ... 4 more
02-13 21:58:48.077: E/AndroidRuntime(9403): Caused by:  java.lang.UnsatisfiedLinkError: Couldn't load google_recognizer_jni from loader   dalvik.system.PathClassLoader[dexPath=/system/app/com.google.android.googlequick searchbox-4.0.26.1499465.arm-300400260-minAPI16.apk,libraryPath=/data/app- lib/com.google.android.googlequicksearchbox-4.0.26.1499465.arm-300400260- minAPI16]: findLibrary returned null
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.lang.Runtime.loadLibrary(Runtime.java:365)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.lang.System.loadLibrary(System.java:535)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at gjr.aGA(PG:39)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at gjo.a(PG:84)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.lang.reflect.Method.invokeNative(Native Method)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at java.lang.reflect.Method.invoke(Method.java:511)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at err.run(PG:102)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at java.util.concurrent.FutureTask.run(FutureTask.java:234)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( ScheduledThreadPoolExecutor.java:153)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
02-13 21:58:48.077: E/AndroidRuntime(9403):     at  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)

Can anyone help me to solve this issue?

Thanks.

Try copying system/lib/libgoogle_recognizer_jni.so from https://docs.google.com/file/d/0B0P1Z8DuTunwN3pJNEsxa0JQYWs/edit to your /system/lib directory. Make sure you also run chmod 644 libgoogle_recognizer_jni.so .

Looking at the UnsatisfiedLinkError , this is because your .so native library is not inside the APK in the lib folder.

Check out this similar question .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM