Package: collective.texttospeech
Text-to-SpeechTable of ContentsText-to-SpeechLife, the Universe, and EverythingMostly HarmlessKnown IssuesDon’t PanicInstallationHow does it workUsageShare and EnjoyChangelog1.0rc1 (2016-07-11)1.0b2 (2016-07-08)1.0b1 (2016-06-14)1.0a2 (2016-03-28)1.0a1 (2016-03-28)Life, the Universe, and EverythingThis package enablesspeech synthesisin thePlone CMS.It is currently based onResponsiveVoice,
an HTML5-based Text-To-Speech library designed to add voice features to web sites across multiple plataforms.ResponsiveVoicesupports 51 languages through 168 voicesand isfree for non-commercial use.Mostly HarmlessGot an idea? Found a bug? Let us know byopening a support.Known IssuesVoice playback rate is slow on Android native browserVoice is cut off in shorter text on Android native browserAudio doesn’t play on Firefox AndroidFor more information, seeResponsiveVoice FAQ.Some browser add-ons (e.g.,Privacy Badger), could block ResponsiveVoice library disabling the Text-to-Speech feature.
In those cases the ‘Listen’ button will not be available,
neither the Text-to-Speech control panel configlet will work.Don’t PanicInstallationTo enable this package in a buildout-based installation:Edit your buildout.cfg and add add the following to it:[buildout]...eggs=collective.texttospeechAfter updating the configuration you need to run ‘’bin/buildout’’, which will take care of updating your system.Go to the ‘Site Setup’ page in a Plone site and click on the ‘Add-ons’ link.Check the box next tocollective.texttospeechand click the ‘Activate’ button.How does it workWe use JavaScript to extract all text inside an element withid="content"in the page.
The text extraction will ignore any <iframe> elements present.
Currently, <img> elements are neither processed but that could change in the future.It is possible to avoid reading some text that,
regardless being present on the text flow,
make little sense on the reading flow.
Examples of this are image captions and side quotes.We have included a list of CSS classes that can be blacklisted to implement this feature.
The list is configurable via an option in the control panel configlet.
Any text inside an element with one of those CSS classes applied will be ignored.The blacklist defaults to some CSS classes used in Plone 4:image-caption: used for image captionspullquote: used for side quotesUsageAfter installing the package, go to the Text-to-Speech configlet on Site Setup.Select which content types will have the feature enabled and select which voice will be used.The Text-to-Speech control panel configlet.A viewlet with a ‘Listen’ button will be displayed on objects with the feature enabled.The speech synthesis feature enabled.You can pause/resume the reader at any time by selecting ‘Pause’/’Resume’.Share and EnjoyThis package would not have been possible without the contribution of the following people:Héctor VelardeRodrigo Ferreira de SouzaYou can find an updated list of package contributors onGitHub.Changelog1.0rc1 (2016-07-11)Ignore<iframe>tags explicitly and fix button visibility.
[rodfersou]Show the ‘Listen’ button to anonymous users only.
[hvelarde]1.0b2 (2016-07-08)Review text extraction logic;
it is now possible to ignore parts of the text via a blacklist of CSS classes accessible in the control panel configlet.
[rodfersou, hvelarde]To avoid displaying the ‘Listen’ button with an incorrect voice,
the feature is now globally disabled by default at installation time.
[hvelarde]ResponsiveVoice library is now only loaded when needed.
[hvelarde]The ‘Listen’ button is now shown only after ResponsiveVoice library has been loaded.
[rodfersou]1.0b1 (2016-06-14)Use version 1.4 of the ResponsiveVoice API.
[hvelarde]Package is now compatible with Plone 5.0 and Plone 5.1.
[rodfersou, hvelarde]Implement i18n on the widget and update translations.
[rodfersou, hvelarde]Simplify static files stack.
[rodfersou]1.0a2 (2016-03-28)Add Brazilian Portuguese and Spanish translations.
[hvelarde]Fix an issue with package JavaScript.
[rodfersou]1.0a1 (2016-03-28)Initial release.