Gdevelop Text To Speech "extension"

Hi there,

lodijoe requested a text to speech function for Gdevelop here. I think this is a great idea, and if you do also, please leave your supporting comment. More comments, more chances for the developer to see it and get it implemented.

In the mean time, before we get a real official extension, here’s a quick “extension” which allows you to perform text to speech in Gdevelop HTML5. It is only tested in Firefox browser so far, and has no special options (voice, volume, speed, etc).

How to use:


  1. Download this file:!mtoh0LQB!eTlj9cVcVLrE … F68gPqyNYE
  2. Open the file in Gdevelop alongside your project (it may tell you it was made in newer version, no problem, just open anyway)
  3. Copy the external event “Speak” with right click > copy, and then paste it in your project.
  4. To use text to speech in any of your scenes, you just need to set the speech variable (what to say), and then call the external event “Speak”, which will speak the words you mentioned. Use “trigger once”, and/or other conditions to ensure it doesn’t call the speech function all the time. Example here:


Finally, this is not a polished extension, I just used (and credited) available source code for HTML 5 speech synthesis. If you want to improve the ‘extension’, you can work with the code in the “Speak” event.

Wow!, that’s pretty cool, I didn’t know web apis had that! :smiley:

Actually, they seem to have everything these days. Some people build… HTML 5 guitar amplifiers with distortion effects! Must be that browsers are more centralized (working as operating systems), so if they simply have everything built-in, that will attract a lot of young developers. If Gdevelop can take advantage from these API functionalities, it could have an incredible set of features without too much hassle (the codes are very simple). That’s why I’m counting on the new version having a good extension system, so that we can easily contribute with extensions. Otherwise, well… functionality will suffer unfortunately. Functionality is the main barrier between Gdevelop and some “more fancy (or expensive)” alternatives.

That and/or a function-like functionality in HTML 5 (so we don’t have to simulate functions with linking, or better say simulate go-to in basic as it’s closer to that) would be awesome for better organization of project code and extensions.

Right on point. ^^

Hi. How can I put speak to my new scene? Next to this scene for example. Because if I add a new scene, the speak is not working like the first scene :(( please help me with my project. Thanks

This is a 3 years old topic. The examples given are outdated and the users probably not active anymore. Look at the text to speech example to see an up to date way of doing that.

1 Like