bookworm
bookworm copied to clipboard
Reading aloud takes a long time to start
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:
- Open any type and size of document;
- 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.
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?
@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.