free runtime text to speech plugin (windows only)

needed a quick tts plugin for a small game thingy, so gobbled this together :
https://github.com/unitycoder/UnityRuntimeTextToSpeech

its not pretty (also editor can silently crash when exit, but works fine otherwise so far),
but its free and standalone (doesnt use windows system voices etc).

there is link to example voice in the readme.

1 Like
NativeDllException: Could not load DLL "libespeak-ng.dll" at path

in Windows 7 Unity 2020 alpha

tested on 2020 win10, works here… not sure what could cause that.
(and you cloned the whole project and have the dll in the root ?)

Yes, just download and open, not change anything. When I press “play” I got this errors:

hmm… i’ll test on another pc tomorrow. (if its related to something i have installed on this pc, i did install the espeak last time)

works on another pc (win10) and just noticed that the espeak page says:
“minimum version : Windows 8”, so it must be that.
https://github.com/espeak-ng/espeak-ng

Too bad. I would like my androids talking…

for android can find other plugins in asset store, or make your own android plugin:

No, no, true androids, robots in my game :slight_smile: Oh well…

how to change the language ? Thanks

not sure, added issue here if someone knows…
https://github.com/unitycoder/UnityRuntimeTextToSpeech/issues/3

i’d probably try with SSML if it allows setting lang, need to enable this,
https://github.com/unitycoder/UnityRuntimeTextToSpeech/blob/master/Assets/Scripts/Speech.cs#L117
and then https://github.com/unitycoder/UnityRuntimeTextToSpeech/wiki/Using-SSML

Been playing with this and it works great on Windows 10 so far. I’m having trouble with SSML tags though. If I pass in a string to Say() with something like for example, it reads out the content of the tag. Do you have any examples handy of how to format the SSML?

ssml is not enabled by default, here:

Hi,
I’m pretty new to Unity. I try to import your plugin with the package manager but nothing happen. Can you tell me how do you import it in a project pls?

I try to check it to test if it work for a small app with WebGL.

Tank you

need to download manually, its not in package format.

but its desktop only, not webgl.
asset store has some TTS plugins that could work, maybe this or others

Im new on unity. it is possible to change the language? How?

this could help
https://github.com/unitycoder/UnityRuntimeTextToSpeech/issues/3

Any chance on getting this to run on Android? I’m looking to add TTS to Quest 2 and Oculus decided to strip Pico TTS from the device. So most of the assets in the Unity store don’t work as they rely on native features. I’ve tested web APIs like goolge to get TTS and they work, but I can’t rely on internet so I want an embedded solution. Thoughts? Also, thanks for the work!

at least i don’t know how…

can check if any of these alternatives would work,
https://github.com/unitycoder/UnityRuntimeTextToSpeech/wiki/Alternative-TTS-plugins