csdcorp / speech_to_text

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

If voice is not recognized, the screen will not be updated. #547

Open bemilyswom opened 2 months ago

bemilyswom commented 2 months ago
  1. Initialize speech and listen
  2. I don't make any sound.
  3. A time out occurs and an error occurs in speech.
  4. An error occurs when calling setState on the screen after an error has occurred.

speech_to_text version : 7.0.0

I/flutter (31864): │ ⛔ Received error status: SpeechRecognitionError msg: error_speech_timeout, permanent: true, listening: false

I/flutter (31864): │ ⛔ :: Interceptor Zone Error : setState() called after dispose(): _ChatSpeechToTextInputViewState#ef9bb(lifecycle state: defunct, not mounted) I/flutter (31864): │ ⛔ This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. I/flutter (31864): │ ⛔ The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. I/flutter (31864): │ ⛔ This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose()., StackTrace : #0 State.setState. (package:flutter/src/widgets/framework.dart:1167:9) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/1 State.setState (package:flutter/src/widgets/framework.dart:1202:6) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/2 _ChatSpeechToTextInputViewState.errorListener (package:befamily_app/src/features/chat/message/ui/views/form/talk/chat_speech_to_text_input_view.dart:243:5) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/3 SpeechToText._onNotifyError (package:speech_to_text/speech_to_text.dart:652:21) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/4 MethodChannelSpeechToText._handleCallbacks (package:speech_to_text_platform_interface/method_channel_speech_to_text.dart:138:19) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/5 MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:571:55) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/6 MethodChannel.setMethodCallHandler. (package:flutter/src/services/platform_channel.dart:564:34) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:581:35) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/8 _invoke2. (dart:ui/hooks.dart:347:15) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/9 _rootRun (dart:async/zone.dart:1399:13) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/10 _CustomZone.run (dart:async/zone.dart:1301:19) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/11 _CustomZone.runGuarded (dart:async/zone.dart:1209:7) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/12 _invoke2 (dart:ui/hooks.dart:346:10) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/13 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45:5) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/14 _Channel.push (dart:ui/channel_buffers.dart:135:31) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/15 ChannelBuffers.push (dart:ui/channel_buffers.dart:343:17) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/16 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:750:22) I/flutter (31864): │ ⛔ https://github.com/csdcorp/speech_to_text/issues/17 _dispatchPlatformMessage (dart:ui/hooks.dart:257:31) I/flutter (31864): │ ⛔

[✓] Flutter (Channel stable, 3.22.3, on macOS 14.6.1 23G93 darwin-arm64 (Rosetta), locale ko-KR) • Flutter version 3.22.3 on channel stable at /Users/swom/Flutter/SDK/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b0850beeb2 (5주 전), 2024-07-16 21:43:41 -0700 • Engine revision 235db911ba • Dart version 3.4.4 • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/swom/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/swom/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.92.2) • VS Code at /Users/swom/Flutter/tools/Visual Studio Code.app/Contents • Flutter extension version 3.94.0

[✓] Connected device (5 available) • SM G973N (mobile) • R39M30SMMSF • android-arm64 • Android 11 (API 30) • iPhone 11 PB_22 (mobile) • 00008030-000635A12652802E • ios • iOS 15.4.1 19E258 • macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64 (Rosetta) • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6.1 23G93 darwin-arm64 (Rosetta) • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.120 ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for bemily019의 iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources • All expected network resources are available.

sowens-csd commented 1 month ago

This looks like a Flutter error, not a speech to text error. You'd be better asking on Stack Overflow or other support site than here.