Open morismoris opened 1 year ago
The Readium TTS allows to override the publication language, except if it's explicitly set in the HTML document. Unfortunately this book is badly authored as the HTML documents have xml:lang="en"
despite the content being in Italian:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE html>
<html xml:lang="en">
<p>Di là andarono alla festa dello Spirito Santo. Il cieco sapeva bene il tempo d’ogni festa e l’itinerario da seguirsi ed era lui che guidava il compagno.
We plan to improve the TTS navigator by adding a preference to force override the content language, but I have no ETA for this change.
In the meantime, I think that if you switch the utterance.language
and config.defaultLanguage
precedence here it should work:
Note that this means that multilingual books won't behave correctly if you set config.defaultLanguage
, as the elements languages will be ignored.
Ok, it's works... but how can I preselect the right Language in TTSSettings? It seems that it doesn't work anycase also in Epub with the right lang.
I don't understand what you mean?
I open the book
I start the TTS
I open the TTS Settings, no language is preselected
Bug Report
It looks like the system only gives the possibility to listen to the ebook in the language set in the file's LANG metatag: if I try to change the language, the ebook is still read in the language set by the LANG meta tag.
Unfortunately, we don't know which and how many ebooks in our catalog could have this problem, so we need to know how to work around the problem and provide an acceptable quality text-to-speech to our iOS readers.
What happened?
The text-to-speech allows me to listen to it only in English: if I set Italian, this change is not accepted.
Expected behavior
I'd like to set Italian.
How to reproduce?
I attach an epub, a classic of Italian literature in which the metatag is set on EN. Canne_al_vento test lingua.zip
Environment
I can't test with the TestApp ('main' or 'develop' branch), because the TestApp fails with the error:
Missing file: "/META-INF/container.xml"
Development environment
macOS: 13.2.1 platform: x86_64 carthage: 0.38.0 Xcode 14.2 Build version 14C18
Testing device
Additional context