+ 1

Text to Speech with Ruby

Is there any way to send strings to "be read by Windows" without installing gems or any other type of library? I am trying to configure this possibility in an game engine that does not allow me to install external libraries in my projects and also blocks commands such as: $ say 'something' %x( say 'something' ) The lock allows me to use other functions like this: Beep = Win32API.new("kernel32", "Beep", ["I", "I"], 'v') Beep.call(freq, duration) Maybe there is some way that I can not identify. Anyway, the engine is RPG Maker VX Ace.

13th May 2018, 7:00 PM
rfPeixoto
rfPeixoto - avatar
4 Answers
+ 4
Unfortunately I do not have a Windows PC at the moment, although access to an API like that is not optimal (for me)
14th May 2018, 2:04 AM
Mickel
Mickel - avatar
+ 3
As far as I know Ruby's standard library does not include something like that. And unfortunately I do not know enough about the Windows API to tell you if any function you can use (if Windows has an API for accessibility maybe you could use it, but I doubt it).
13th May 2018, 7:26 PM
Mickel
Mickel - avatar
+ 2
Thank you, it seems better to find another way to implement this. o/
14th May 2018, 7:47 PM
rfPeixoto
rfPeixoto - avatar
0
Thanks for the answer. I'm trying to access SAPI5 ( https://msdn.microsoft.com/en-us/library/ms720151(v=vs.85).aspx ), I think it might help, but I can not find the correct command (I'm a beginner). I tried using the same one used for Beep function with several different combinations (sapi5, Sapi5, SAPI5), but none worked. I always get the same error: GetProcAdress: used_name or used_nameA
13th May 2018, 8:59 PM
rfPeixoto
rfPeixoto - avatar