Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tts] Manage a speaking state on the state changed callback #140

Merged
merged 2 commits into from Jul 5, 2021

Conversation

bbrto21
Copy link
Contributor

@bbrto21 bbrto21 commented Jun 30, 2021

* Fix flutter-tizen#87

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21 bbrto21 requested a review from swift-kim June 30, 2021 06:27
@swift-kim

This comment has been minimized.

@swift-kim
Copy link
Member

Another warning on TM1 and R800:

I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel
E/ConsoleMessage(23522): Warning: Failed to respond to a message. This is a memory leak.
I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel
E/ConsoleMessage(23522): Warning: Failed to respond to a message. This is a memory leak.
E/ConsoleMessage(23522):
I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel

@bbrto21 bbrto21 closed this Jul 1, 2021
@bbrto21 bbrto21 reopened this Jul 1, 2021
@bbrto21
Copy link
Contributor Author

bbrto21 commented Jul 1, 2021

Probably not caused by this commit but I'm getting this error when trying to play any text on wearable 5.5 emulator:

E/ConsoleMessage(30784): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(-49348607, Failed to speak(tts_add_text)., null, null)
E/ConsoleMessage(30784): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7)
E/ConsoleMessage(30784): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
E/ConsoleMessage(30784): <asynchronous suspension>
E/ConsoleMessage(30784): #2      _MyAppState._speak (package:flutter_tts_tizen_example/main.dart:90:9)
E/ConsoleMessage(30784): <asynchronous suspension>
E/ConsoleMessage(30784):

I was only getting this error when I pressed the play button while speaking, and I thought this error is reasonable.

@bbrto21
Copy link
Contributor Author

bbrto21 commented Jul 1, 2021

Another warning on TM1 and R800:

I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel
E/ConsoleMessage(23522): Warning: Failed to respond to a message. This is a memory leak.
I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel
E/ConsoleMessage(23522): Warning: Failed to respond to a message. This is a memory leak.
E/ConsoleMessage(23522):
I/ConsoleMessage(23522): flutter: Playing
I/ConsoleMessage(23522): flutter: Cancel

I can't reproduce, please tell me how to reproduce.

Co-authored-by: Swift Kim <swift.kim@samsung.com>
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
plugin->channel_->InvokeMethod("speak.onPause", std::move(args));
} else if (current == TTS_STATE_READY) {
if (previous == TTS_STATE_PLAYING || previous == TTS_STATE_PAUSED) {
plugin->EndSpeaking();
plugin->channel_->InvokeMethod("speak.onCancel", std::move(args));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Known issue: The "speak.onCancel" method is always called even when the utterance completes successfully.

Copy link
Member

@bwikbs bwikbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your working! 😄

@bwikbs bwikbs merged commit 77b30f8 into flutter-tizen:master Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[flutter_tts] PlatformException (Invalid Operation) when play has been canceled
3 participants