## Blocks: oohoo - Text to Speech

block_tts
Maintained by Patrick Thibaudeau, Nicolas Bretin
OOHOO Text to Speech is a Moodle block that reads outloud the content of a resource
84
369
4
Moodle 2.2, 2.3, 2.4, 2.5, 2.6

This block adds text to speech functionality to Moodle

It can be configured to use either the Google speech engine or the Microsoft speech engine. When added to a resource such as a page, it reads the contents.

There is also a lexicon to add pronunciations for words that it pronounces improperly. For example, it could possibly say I.V. for the text IV. It should, however, say 4. You could add in the lexicon IV = four and it willpronounce it properly.

A special thank you to Ryan Thomas who is the original author of this block.

### Contributors

Nicolas Bretin: Developer

• Thu, Apr 18, 2013, 11:25 PM
Hi Nicolas. Yes, I'm curious also as I would have thought themes need to adhere to certain standards in order for core and third-party features to function properly. Either way, I've now raised the issue and will drop a reply here when I hear back from them.
• Thu, Apr 18, 2013, 11:36 PM
Thanks Nicolas, The 500 error is an intermittent test server error.If you refresh the page some reason it disappears. I have changed the theme to “afterburner” and I still experience the same problems.

http://sli.perceptiveits.com.au/course/view.php?id=146

Any debugging clues would be appreciated. Thanks
• Thu, Apr 18, 2013, 11:57 PM
I still have the 500 error on the tts test page.
To help me debugging, can you try to activate Firebug in Firefox and tell me if you have javascript error and what is the response of the first GET request (something like http://sli.perceptiveits.com.au/blocks/tts/app/_php/tts_config.php?courseid=146&service=microsoft&voice=en&_=1366300633688) in the console tab ?
Thanks,
• Fri, Apr 19, 2013, 2:33 PM
Hi Nicolas

I think we should ignore the test server as it may be giving us spurious 500 errors.

Please see the live server here http://smartmove.moodle.com.au/course/view.php?id=3
and the TTS test results here
http://smartmove.moodle.com.au/blocks/tts/tts_test.php
Do you still get the 500 errors? It runs clean from this end.

The results of Firebug are here
http://smartmove.moodle.com.au/misc/TTSlog.txt

I have tested as follows
Different servers. Same problem.
Different theme. Same problem.
Different Moodle Versions. Same problem
Different Browsers FireFox, IE and Chrome. Same problem.
Different machines. Same problem

I am running out of ideas and hope that the Firebug log file will provide more clues!

Tim
• Fri, Apr 19, 2013, 10:46 PM
Hi Tim,

Thanks it works better with this server!

And it should return JSON. But if you look at the response it start with a notice:
Strict Standards: Creating default object from empty value in /home/sli/public_html/smartmove/config.php on line 5
It is generally because the config.php missed the $CFG = new stdClass(); It is because your config.php file is from an older version of moodle and of course this file is not updated when you update Moodle. So just add this line to your config file and try again. But I'm not sure why this error doesn't show up on your normal pages... Nicolas • Fri, Apr 19, 2013, 11:44 PM Hi Nicolas. Just a quick note to confirm the developers of Bootstrap will hopefully revert to the original naming of the region-main element under 2.5 (not sure bout the 2.4 version of the theme): "The reason the div id was renamed was to avoid conflicts with Moodle's base theme CSS. The Moodle_25 branch of the bootstrap theme does not rely on base CSS anymore so I guess we could change the names back to region-main." So, fingers crossed you don't need to spend time implementing any changes to the block in order to ensure compatibility. Btw, just to confirm I followed your suggestion and modified the selector definition and the blocks works fine now. Thanks again. • Sat, Apr 20, 2013, 9:20 AM Hi Nicolas, That’s fixed it! The plug-in is now light grey ,the spinning icon has stopped and I can now click “play”. Thank you so much for your help. Just for clarification and reference for anyone else who experiences a problem with the plug-in being greyed out and spinning. The fix is to add$CFG = new stdClass(); to the top of the moodle/config.php file .

I now just have one further small problem. The TTS system works with Microsoft but not with Google. If I click on play with the system set to Microsoft I get some sound but it is fairly slow and stuttered. I understand that the Google TTS is smoother, so I thought that I would try that one. However I get no sound via Google
See the following page
http://smartmove.moodle.com.au/course/view.php?id=3

It highlights the first word but no sound and I cannot get past the first word

I attach the Firebug debug info here. The first part is Microsoft (which works, The second is Google, which produces no sound)
http://smartmove.moodle.com.au/misc/TTSlog2.txt

I hope that we can resolve this and then I can leave you in peace!

Thanks again for your help to date

Regards

Tim

• Mon, Apr 22, 2013, 11:57 PM
Hi Tim,

Apparently the Google service refuse to serve the mp3...
Can you go on github => https://github.com/oohoo/moodle-block_tts/issues/2
And follow my instructions in order to modify a file in your TTS block.
I just don't want to publish something that doesn't work on Moodle!

Nicolas
• Tue, Apr 23, 2013, 10:01 AM
Hi Nicolas

I am able to download the test file from here without any problems

(Note that I could only find this file in _services).

However unfortunately I still have the same problem playing Google TTS

Thanks

Tim
• Wed, Jan 8, 2014, 4:07 PM
Hi,
I wish to know, when you people release plugin for moodle 2.6. I wish to use this plugin and eagerly waiting for it.
• Fri, Mar 7, 2014, 2:36 AM
I have upgraded to 2.5.4 and added the oohoo plugin. I get a grayed out box and the cog wheel spins continuously. I don't have any users on my site at this time since I am testing the site. Any help with this would be great. I have read everything I can find but haven't found any solutions.
• Mon, May 12, 2014, 5:09 PM
James - just to quickly note that the TTS block requires Flash support in the browser, so if you don't have that installed (or are using an iOS device) the player will be exhibit the issues you've described.
• Mon, Sep 1, 2014, 5:08 PM
Hi,
We use Moodle 2.6.4 (Build: 20140714) and the same issue with the gray box and the spinning wheel. Any help will be appreciated.
• Sat, Sep 6, 2014, 5:13 PM
Hi,

This plugin seems to be awesome. Unfortunately my version of Moodle is 2.7. Are there any chances that an update will be released for this version ?
Thank you.
• Thu, Aug 27, 2015, 7:52 PM
Has anyone been successful in getting this plugin to work in Moodle 2.7?