dlutton / flutter_tts

Flutter Text to Speech package
MIT License
600 stars 249 forks source link

Progress Handler not working on web #525

Open Robert01101101 opened 1 week ago

Robert01101101 commented 1 week ago

🐛 Bug Report

Progress handler does not work (fire progress events) on Web, and is tested and confirmed to be working on Android. A simple test with just logs shows logs printing on Android as text is spoken, whereas on Web it is not printing logs.

Expected behavior

Progress handler behaves the same across platforms, or is documented to only work on certain platforms (I tried looking in the docs, maybe I missed something).

Reproduction steps

Add a progress handler, and log its progress. I see the logs print on Android, but not on Web.

flutterTts.setProgressHandler((String text, int startOffset, int endOffset, String word) {
  logger.t("Progress: $text, $startOffset, $endOffset, $word");
});

Configuration

Version: 4.0.2

Platform:

Robert01101101 commented 1 week ago

I've opened a PR with a proposed fix

526