Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / (DBPRO) - Text to Speech - the Ultimate WorkaroundS

Author
Message
Starshyne Emir
2
Years of Service
User Offline
Joined: 27th Nov 2016
Location: Porto Alegre, southern Brazil
Posted: 21st Oct 2018 01:52
Since no one seems to be able to come up with a dll that enables TTS directly into DBPRO, I found a way to make apps speak aloud.

It is kind of a workaround, since it trusts on an external application running altogether with your program - in this case, a free Windows software called Balabolka.

You can downloaded it in here: [link]http://www.cross-plus-a.com/br/balabolka.htm[/link]

You'll also need some SAPI4 or SAPI5 voices installed on your computer. On Balabolka, set up the voice you want to use - I will not give you a clue about how to download voices, but you can buy a lot of them and there are some free (and some pirate, too), go ahead and get whatever you need from Google.

And the magic is done by the shortcut keys CTRL + W inside Balabolka (or the option Watch Clipboard, that you may find in the menus). With this enabled, Balabolka will read aloud anything that is inside the Windows clipboard.

Now, back to the code you are writing, you just need to use the function WRITE TO CLIPBOARD to make any string to be read aloud.

I know it is not good for portability, since the client will need both Balabolka and a SAPI voice to experiment this, but Balabolka has a command-line version (included with the main package on the site) you can configure and add as part of your program. You just need to call it from inside the program you are writing to make it work.

I know it is not a solution, but as long as no one seems to care too much about TTS to bake a dll for us, this might suit your needs.
[size=+2]Forever and one[/size]

Login to post a reply

Server time is: 2019-03-19 16:42:40
Your offset time is: 2019-03-19 16:42:40