5 ms·
Why can't the speech synthesizer detect the language, especially when the language of dynamic content may change on the client-side after the page is loaded? L
by dheera 6y ago
Why can't the speech synthesizer detect the language, especially when the language of dynamic content may change on the client-side after the page is loaded?
Language detection is much easier than synthesis, and one would think that a good synthesizer would devote the 0.1% of their engineering time necessary to have good language detection as well.
- mlang23 6y agoSurprisingly, automatic language detection isn't always reliable. And since the DOM actually has an attribute for this, which can also be placed on individual elements like a p or div, the first choice IMO is to rely on what the site declared.
- harperlee 6y agoYeah in general, explicit declarations should not be overriden by guesswork!
- sswam 6y agoIt seems to me that correctly guessing a natural language is a whole lot easier than speech synthesis. I think it would be more common to have incorrect declarations than detection failures. A bit like how comments describing code are often incorrect because they weren't updated when the code changed.
- harperlee 6y agoI wonder the same about Microsoft Word and Powerpoint. Is it so difficult to guess language in 2021? Particularly, to discern language between spanish and english, if both have already been manually set by the user in the document? It seems so...
- naniwaduni 6y agoPeople routinely manage to have "manually set" the language of documents that are very not English to en-US.
- creatonez 6y ago> especially when the language of dynamic content may change on the client-side after the page is loaded The `lang` attribute can be applied to any element, not just the whole document.