A Moodle filter to provide speech synthesis (text-to-speech/ TTS) services for
arbitrary text. Text such as
[Speak] Hello world! [/Speak] is replaced with
a button with the text as a label. Press the button, and the text is spoken!
This is beneficial, for example, when teaching younger children. And for accessibility to those with disabilities.
Uses: jQuery (v1.3.2).
- Download and unzip the code files. Copy to the directory on the server,
- Log in to Moodle as admin, visit
Site Administration | Modules | Filters | Manage Filters. Scroll down and click on the icon for Simplespeak to enable it.
Choose SimpleSpeak under Filters, and add a TTS service. Or set in
$CFG->simplespeak_service_url = 'http://example.org/cgi-bin/espeak/getsound.pl?lang=!LANG&text=!TEXT';
The string can contain two placeholders,
!LANG(language). This service can be local, or third-party - see Links below.
Ensure that the directory
$CFG->datarootis writeable by the Apache user, or create a writeable cache directory,
- Wiki, including notes on services: http://docs.moodle.org/en/User:Nick_Freear/SimpleSpeak_filter
- Moodle plugin page: http://moodle.org/mod/data/view.php?rid=4778
- Discussion: http://moodle.org/mod/forum/discuss.php?d=174762
- Code, Git: https://github.com/nfreear/moodle-filter_simplespeak
- Code, Hg: https://bitbucket.org/nfreear/simplespeak
- Demo: http://freear.org.uk/moodle
Simple example. Enable the filter (admin). Then, type the following in a Moodle resource:
[Speak] Hello world! [/Speak]
Alphabet quiz example. Type the following in the rich-editor, for example for a question/quiz (note, line-breaks, which can be represented by
[Speak] ;; Just a comment. letter = A sound = ah image = "http://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Red_Delicious.jpg/240px-Red_Delicious.jpg" image_source = http://commons.wikimedia.org/wiki/File:Red_Delicious.jpg alt = "Red delicious apple, from Bangin/Wikimedia Commons, Creative Commons Attribution-ShareAlike License" word = apple phrase = Which of the words below start with the letter [em]a[/em]? [/Speak]
- TTS services - see Links above.
- Roadmap: improve TTS language support, improve caching.
- Text strings are internationalized for Moodle 1.9.x and 2.0.x.
SimpleSpeak filter. Copyright © 2010 Nicholas Freear.
- License: http://gnu.org/copyleft/gpl.html GNU GPL v2 or later.