csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
361 stars 221 forks source link

On Huawei's phone for 30s, the version is Hongmeng System 3.0.0. After initialization and clicking Start, it will crash directly #402

Open ssh199956 opened 1 year ago

ssh199956 commented 1 year ago

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Launching lib\main.dart on CDY AN90 in debug mode... Running Gradle task 'assembleDebug'... Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! √ Built build\app\outputs\flutter-apk\app-debug.apk. Debug service listening on ws://127.0.0.1:61701/8qm1NCdP3ww=/ws Syncing files to device CDY AN90... W/Gralloc3(23289): mapper 3.x is not supported I/HwViewRootImpl(23289): removeInvalidNode jank list is null I/AwareBitmapCacher(23289): init lrucache size: 2097152 pid=23289 I/Hwaps (23289): APS: EventAnalyzed: initAPS: version is 11.0.0.4 D/Hwaps (23289): Fpsrequest create,type:EXACTLY_IDENTIFY D/Hwaps (23289): Fpsrequest create,type:EXACTLY_IDENTIFY D/Hwaps (23289): Fpsrequest create,type:OPENGL_SETTING D/Hwaps (23289): FpsController create D/Hwaps (23289): APS: EventAnalyzed: reInitFpsPara :mBaseFps = 60; mMaxFps = 60 W/Settings(23289): Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global. V/HiTouch_HiTouchSensor(23289): User setup is finished. W/HwApsManager(23289): HwApsManagerService, registerCallback, start ! D/Hwaps (23289): APS: EventAnalyzed: registerCallbackInApsManagerService, mPkgName:com.csdcorp.speech_to_text_example; result = true V/AudioManager(23289): querySoundEffectsEnabled... V/AudioManager(23289): querySoundEffectsEnabled... I/BlockMonitor(23289): dispatchingThrewException In MainThread D/AndroidRuntime(23289): Shutting down VM I/QarthLog(23289): [PatchStore] createDisableExceptionQarthFile I/QarthLog(23289): [PatchStore] create disable file for com.csdcorp.speech_to_text_example uid is 10186 E/AndroidRuntime(23289): FATAL EXCEPTION: main E/AndroidRuntime(23289): Process: com.csdcorp.speech_to_text_example, PID: 23289 E/AndroidRuntime(23289): java.lang.SecurityException: Not allowed to bind to service Intent { act=android.speech.RecognitionService cmp=com.huawei.vassistant/.voiceui.service.FakeRecognitionService } E/AndroidRuntime(23289): at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1868) E/AndroidRuntime(23289): at android.app.ContextImpl.bindService(ContextImpl.java:1778) E/AndroidRuntime(23289): at android.content.ContextWrapper.bindService(ContextWrapper.java:705) E/AndroidRuntime(23289): at android.speech.SpeechRecognizer.startListening(SpeechRecognizer.java:287) E/AndroidRuntime(23289): at com.csdcorp.speech_to_text.SpeechToTextPlugin.startListening$lambda-1(SpeechToTextPlugin.kt:304) E/AndroidRuntime(23289): at com.csdcorp.speech_to_text.SpeechToTextPlugin.$r8$lambda$yjNp_RCA9xqERSl0VjgCZu0NF-o(Unknown Source:0) E/AndroidRuntime(23289): at com.csdcorp.speech_to_text.SpeechToTextPlugin$$ExternalSyntheticLambda3.run(Unknown Source:2) E/AndroidRuntime(23289): at android.os.Handler.handleCallback(Handler.java:900) E/AndroidRuntime(23289): at android.os.Handler.dispatchMessage(Handler.java:103) E/AndroidRuntime(23289): at android.os.Looper.loop(Looper.java:219) E/AndroidRuntime(23289): at android.app.ActivityThread.main(ActivityThread.java:8673) E/AndroidRuntime(23289): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(23289): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) E/AndroidRuntime(23289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) I/Process (23289): Sending signal. PID: 23289 SIG: 9 Lost connection to device.

this is whole log.

ssh199956 commented 1 year ago

After I couldn't finish sending this question, I realized that many people had already had this problem before, but there was no solution in the comments section. This problem has been happening for a year now.Developers can quickly identify any issues.

sowens-csd commented 1 year ago

Are you using the androidIntentLookup option on the initialize method?

jaeqy commented 5 months ago

Are you using the androidIntentLookup option on the initialize method?

I'm having the same problem, and I tested the androidIntentLookup option on the initialize method, But it didn't work.

D/SpeechToTextPlugin(30094): Start initialize D/SpeechToTextPlugin(30094): Checked permission D/SpeechToTextPlugin(30094): has permission, completing D/SpeechToTextPlugin(30094): completeInitialize D/SpeechToTextPlugin(30094): Testing recognition availability D/SpeechToTextPlugin(30094): sending result D/SpeechToTextPlugin(30094): leaving complete D/SpeechToTextPlugin(30094): leaving initializeIfPermitted D/SpeechToTextPlugin(30094): before setup intent D/SpeechToTextPlugin(30094): setupRecognizerIntent D/SpeechToTextPlugin(30094): after setup intent D/SpeechToTextPlugin(30094): Start listening D/SpeechToTextPlugin(30094): setupRecognizerIntent D/SpeechToTextPlugin(30094): Notify status:listening D/SpeechToTextPlugin(30094): Start listening done D/SpeechToTextPlugin(30094): Creating recognizer D/SpeechToTextPlugin(30094): RecognitionService, found: 1 D/SpeechToTextPlugin(30094): RecognitionService: packageName: com.huawei.vassistant, name: com.huawei.vassistant.voiceui.service.FakeRecognitionService D/SpeechToTextPlugin(30094): Setting listener after intent lookup D/SpeechToTextPlugin(30094): In RecognizerIntent apply D/SpeechToTextPlugin(30094): put model D/SpeechToTextPlugin(30094): put package D/SpeechToTextPlugin(30094): put partial I/BlockMonitor(30094): dispatchingThrewException In MainThread D/AndroidRuntime(30094): Shutting down VM I/QarthLog(30094): [PatchStore] createDisableExceptionQarthFile I/QarthLog(30094): [PatchStore] create disable file for com.weixue.dianchang uid is 10231 I/flutter (30094): 🐛 debug:Status: listening E/AndroidRuntime(30094): FATAL EXCEPTION: main E/AndroidRuntime(30094): Process: com.weixue.dianchang, PID: 30094 E/AndroidRuntime(30094): java.lang.SecurityException: Not allowed to bind to service Intent { act=android.speech.RecognitionService cmp=com.huawei.vassistant/.voiceui.service.FakeRecognitionService } E/AndroidRuntime(30094): at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1868) E/AndroidRuntime(30094): at android.app.ContextImpl.bindService(ContextImpl.java:1778) E/AndroidRuntime(30094): at android.content.ContextWrapper.bindService(ContextWrapper.java:705) E/AndroidRuntime(30094): at android.speech.SpeechRecognizer.startListening(SpeechRecognizer.java:287) E/AndroidRuntime(30094): at com.csdcorp.speech_to_text.SpeechToTextPlugin.startListening$lambda-1(SpeechToTextPlugin.kt:302) E/AndroidRuntime(30094): at com.csdcorp.speech_to_text.SpeechToTextPlugin.$r8$lambda$yjNp_RCA9xqERSl0VjgCZu0NF-o(Unknown Source:0) E/AndroidRuntime(30094): at com.csdcorp.speech_to_text.SpeechToTextPlugin$$ExternalSyntheticLambda3.run(Unknown Source:2) E/AndroidRuntime(30094): at android.os.Handler.handleCallback(Handler.java:900) E/AndroidRuntime(30094): at android.os.Handler.dispatchMessage(Handler.java:103) E/AndroidRuntime(30094): at android.os.Looper.loop(Looper.java:219) E/AndroidRuntime(30094): at android.app.ActivityThread.main(ActivityThread.java:8673) E/AndroidRuntime(30094): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(30094): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) E/AndroidRuntime(30094): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) I/Process (30094): Sending signal. PID: 30094 SIG: 9

htbeazxcq123 commented 3 months ago

I have the same issue,I am using NOVA5 pro.,running Speech Demo

zhangweiwei0326 commented 2 months ago

E/AndroidRuntime(32043): FATAL EXCEPTION: main E/AndroidRuntime(32043): Process: com.example.mind_robot, PID: 32043 E/AndroidRuntime(32043): java.lang.SecurityException: Not allowed to bind to service Intent { act=android.speech.RecognitionService cmp=com.huawei.vassistant/.voiceui.service.FakeRecognitionService } E/AndroidRuntime(32043): at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1868) E/AndroidRuntime(32043): at android.app.ContextImpl.bindService(ContextImpl.java:1778) E/AndroidRuntime(32043): at android.content.ContextWrapper.bindService(ContextWrapper.java:705) E/AndroidRuntime(32043): at android.speech.SpeechRecognizer.startListening(SpeechRecognizer.java:287) E/AndroidRuntime(32043): at com.csdcorp.speech_to_text.SpeechToTextPlugin.startListening$lambda$1(SpeechToTextPlugin.kt:302) E/AndroidRuntime(32043): at com.csdcorp.speech_to_text.SpeechToTextPlugin.$r8$lambda$RC0sWTeLN7UFjv6g94q17VDN7PE(Unknown Source:0) E/AndroidRuntime(32043): at com.csdcorp.speech_to_text.SpeechToTextPlugin$$ExternalSyntheticLambda3.run(Unknown Source:2) E/AndroidRuntime(32043): at android.os.Handler.handleCallback(Handler.java:908) E/AndroidRuntime(32043): at android.os.Handler.dispatchMessage(Handler.java:103) E/AndroidRuntime(32043): at android.os.Looper.loop(Looper.java:219) E/AndroidRuntime(32043): at android.app.ActivityThread.main(ActivityThread.java:8679) E/AndroidRuntime(32043): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(32043): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) E/AndroidRuntime(32043): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) I/Process (32043): Sending signal. PID: 32043 SIG: 9 Lost connection to device.