Skip to content

Version 0.16.0

Choose a tag to compare

@JayPanoz JayPanoz released this 16 Oct 12:02
· 37 commits to main since this release
11cf0e3

What's Changed

Added

  • ReadiumSpeechNavigator's loadContent() and loadGndContent() take the content's language as a whole, as { language } (ReadiumSpeechContentOptions). Utterances without a language of their own get it, and languageOverrides applies to it on content loaded via loadGndContent().
  • contentLanguage extraction option: the language of content without lang/xml:lang, and of all content with language: "none". Sentences are segmented in it, and languageOverrides applies to it. loadGndContent()'s { language } is passed as this option.

Fixed

  • With language: "none", utterances keep the content's language when loadGndContent() is given one, instead of having none, so a voice record (e.g. { en: "…" }) still applies instead of the engine's own voice.
  • With segmentation: "sentence", a sentence of content without lang/xml:lang is in the content's language when loadGndContent() is given one, instead of English, and with language: "none", sentences are segmented in it, with its abbreviations.
  • With segmentation: "sentence", a malformed language tag (e.g. en_US) no longer makes extraction throw: it is segmented as its hyphenated form, else in English.
  • With segmentation: "sentence", a closing guillemet spaced after the sentence's last mark, as in French (« Il n’y a rien ! »), stays with its sentence instead of being an utterance of its own or starting the next one.
  • In Safari, changing the rate, pitch, volume or voice while speaking no longer emits "end" for the restarted utterance without speaking it: Safari ends an utterance spoken right after cancel() at once, so WebSpeechEngine speaks it on the next task there, and once more if Safari still ends it without starting it.
  • WebSpeechEngine no longer takes Chrome, Edge or Opera for Safari, whose name their user agents contain: with a Google voice, they get the workaround for long utterances being cut off, and none of Safari's. It only runs for voices that fire no pause events, as it pauses and resumes speech every 5 seconds.
  • In Safari, moving to another utterance while speaking no longer emits "stop" for the one it replaces, which left ReadiumSpeechNavigator idle until the next one started: Safari reports the cancelled utterance's error within cancel().
  • ReadiumSpeechNavigator's word boundaries in substituted text (e.g. 100deg spoken as 100°) locate the source text again when a voice or the content's language applies to the utterance.

by @JayPanoz in #72

Full Changelog: v0.15.0...v0.16.0