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

Text to speech is playing dumb. #37

Closed
X-Ryl669 opened this issue Dec 18, 2017 · 8 comments
Closed

Text to speech is playing dumb. #37

X-Ryl669 opened this issue Dec 18, 2017 · 8 comments

Comments

@X-Ryl669
Copy link

X-Ryl669 commented Dec 18, 2017

When using text to speech feature, there are multiple issues:

  1. It does not start from the current displayed page/text/paragraph (except obviously when starting from the beginning of the book)
  2. While speaking, it repeats entire page of text (narration doesn't make any sense anymore, it can repeat something that's 10 page earlier, then some part that are "in the future")
  3. There is no feedback about where it is. Ideally, it should overlay, invert, put a dot, or some visual clues about what's being pronounced. This way, it's easy to figure out when it's "restarting" from, instead of trying to outpace while reading the text.

I've tried to use both advanced mode and simple mode with the same result.
I'm using the latest beta downloaded today.

@X-Ryl669
Copy link
Author

X-Ryl669 commented Dec 18, 2017

This code seems strange to me (in TTSService.java):

        CodecPage page = dc.getPage(pageNumber);

Because this depends on repagination. Are you sure it's not going to repaginate while you ask for a page?
As I understand it, unlike visual reading, speech reading implies dealing with paragraphs, not pages.
You also want to be able to resume reading in a middle of a page, not from the start everytime.

@foobnix
Copy link
Owner

foobnix commented Dec 18, 2017

Please try beta.librera.mobi apk
There is should be fixed TTS, could you please verify?

@foobnix
Copy link
Owner

foobnix commented Dec 18, 2017

Start reading from the middle is also possible in beta, select any words add see >> to read from this place

@foobnix
Copy link
Owner

foobnix commented Dec 18, 2017

Yes, TTS should be improved, I am working on it.

@X-Ryl669
Copy link
Author

I'm selecting some text (for example, the name of the main character), pressing ">>" icon, and it start reading from that name, but not from the paragraph I'm upon (basically, it has found the main character again in some future paragraph and resumes from here).

How can I help ?

@X-Ryl669
Copy link
Author

BTW, I've tried with 7.3.71 and got the same results.

@X-Ryl669
Copy link
Author

I wonder if we can capture this into a file, as I'm almost sure this is wrong:

CodecPage page = dc.getPage(pageNumber);
String pageHTML = page.getPageHTML();
String pageTxt = TxtUtils.replaceHTMLforTTS(pageHTML);

Append something like:

File path = context.getExternalFilesDir(null);
File file = new File(path, String.format("page_%04d.html", pageNumber));
FileOutputStream stream = new FileOutputStream(file);
try { stream.write(pageHTML.getBytes()); } finally { stream.close(); }

That should output what the mupdf's code thinks of page X's html output. Then we can check if it matches correctly for each displayed page and for the text continuity of page X-1 to page X.

We should also to the same for plain text output, since it can also fail here.

@foobnix
Copy link
Owner

foobnix commented Jan 18, 2018

fixed in last beta

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

No branches or pull requests

2 participants