ixsans / text_to_speech

A Flutter plugin provides TTS (Text-To-Speech) Service
BSD 3-Clause "New" or "Revised" License
18 stars 24 forks source link

.then() and whenComplete() not work #6

Closed usescrt closed 2 years ago

usescrt commented 2 years ago
Screen Shot 2021-11-23 at 15 04 40

tts.speak("test").then((value) => print("-------"));

ts.speak("test").whenComplete(() => print("------"));

not working please help

abayomiAkanji commented 2 years ago

Hi @usescrt do you mean the text isn't playing? Are you able to log the error?

usescrt commented 2 years ago

Hi @abayomiAkanji Play is fine. But print codes not work.

abayomiAkanji commented 2 years ago

Hi @usescrt Apparently, you wanted to perform an operation when the speech is over, right?

usescrt commented 2 years ago

Hi @abayomiAkanji

Right.

abayomiAkanji commented 2 years ago

@usescrt you might want to try this:

await ts.speak("test") // actual implementation
// Any code here (after the await) should be executed after the speech is over.
usescrt commented 2 years ago

@abayomiAkanji thanks

silasrm commented 1 year ago

Hi,

I'm trying await and then(), but no one executing on MacOS.

@usescrt in your code, is ok?

Thks!

iliosana commented 1 year ago

Hi @silasrm

I am facing the same problem, did you get it to work?

Thanks!