Skip to content

Legilo 0.4.0

Latest

Choose a tag to compare

@asisto asisto released this 02 Oct 07:36

Voice release: better voices, honest behavior when there is no voice, and an opt-in for the browser's online voices. Includes the changes of 0.3.0.

Voices

  • By default read-aloud uses only voices installed on the visitor's device; the text never leaves it.
  • Better automatic choice: quality voices (Natural, Neural, Premium, Enhanced, Siri) first, then the system's default voice, then an exact region match.
  • Voice selector in the panel, stored like the other settings (labels in all 37 languages).
  • New parameter ttscloud=1: read-aloud then prefers the browser's online voices where available (e.g. "Google US English" in Chrome). They usually sound more natural and also cover languages without an installed voice. They are marked as online in the panel, visitors can switch to a local voice at any time. No API key, no server, no costs: the voices come from the browser, which sends the text to its vendor. Without online voices (e.g. Firefox, Safari) the local voices are used.
  • No silent read-aloud anymore: without any usable voice for the page language the read-aloud button is disabled and the panel explains that voices can be added free of charge in the system's speech settings.
  • Read-aloud marking with online voices: Google voices send no word events, so they now speak sentence by sentence and the spoken sentence is marked. Local voices still mark the single word.

JavaScript API

  • Legilo.voices(): voices of the page language, best first (name, lang, online, selected, chosen)
  • Legilo.setVoice(name): choose a voice, null returns to automatic
  • Legilo.values() reports voice and voiceOnline
  • Legilo.features() reports available and cloud for read-aloud; set("tts", ...) and speak() return false without a usable voice
  • legilo:change reports a voice change as key ttsvoice

Fixes

  • Icon detection only by whole class tokens: classes like fancybox-content, favorites or nav-fade were treated as icons, so font size and point-and-read skipped their text.

Configurator and docs

  • "Offer online voices" option with an explanation in all 11 languages
  • API reference: voices, online voices, the no-voice state and a privacy note: https://legilo.eu/api

WordPress

Plugin 0.1.3 attached below (legilo-wordpress.zip): new settings for read-aloud modes and online voices.