bookworm icon indicating copy to clipboard operation
bookworm copied to clipboard

Reading aloud takes a long time to start

Open DraganRatkovich opened this issue 3 years ago • 2 comments

When a document is open and F5 is pressed to start reading aloud, Bookworm takes a little longer to start reading the document.

To reproduce:

  1. Open any type and size of document;
  2. Press F5 to start reading aloud and see the results.

Expected Behavior

The bookworm should start reading the document without delay.

Also, it should be noted that when the document is paused and then resumed, reading starts immediately, but when F7 is pressed and the document has been completely stopped, again, pressing F5 still delays the start of reading the document.

Desktop information:

  • OS: Windows 10 X64-bit;
  • Bookworm version: latest, downloaded from AppVeyor both X32 and X64-bits;
  • Last changed settings: none.

Additional info

This issue affects both 32-bit and 64-bit versions.

DraganRatkovich avatar May 08 '22 08:05 DraganRatkovich

Yeah, this is because Bookworm doesn't chunk text-to-speech, it tries to speak the hole string, which naturally takes time to process. QRead does this too. There's honestly no real good way to handle this, because you have to decide:

  • How big a chunk should be.
  • If you choose too big of a chunk size, there could be, at least to the user, seemingly random pauses in the text.
  • This is less of a problem now, but back when Bookworm would render pages in their own text fields, and not load the entire document at once, you would've had to have accounted for that, too @mush42, any thoughts?

trypsynth avatar Jun 12 '22 03:06 trypsynth

@TheQuinbox I've some ideas to improve text processing, the least of which is to use a regex to determine the starting position of paragraphs. Alternatively, we can use a speech generator; which tokenizes the text piece by piece, yielding specified text segments on demand.

mush42 avatar Jun 12 '22 10:06 mush42