Has anyone any experience with TextToSpeech under FF3 and PB10?
It seemed very simple with PB9 (found a beautiful example by Josè).
LOCAL oSp AS DISPATCH
LET oSp = NEW DISPATCH IN "SAPI.SpVoice"
IF ISFALSE ISOBJECT(oSp) THEN EXIT FUNCTION
LOCAL vRes AS VARIANT
LOCAL vTxt AS VARIANT
LOCAL vTime AS VARIANT
vTxt = "Hello everybody! Are you sitting comfortable? Then please stand up."
OBJECT CALL oSp.Speak(vTxt) TO vRes
vTime = -1 AS LONG
OBJECT CALL oSp.WaitUntilDone(vTime) TO vRes
But I am a little stuck now.
Rolf
Just change:
LET oSp = NEW DISPATCH IN "SAPI.SpVoice"
to:
LET oSp = NEWCOM "SAPI.SpVoice"
and it will run in PB10. : )
Thanks Jim, I had tried that to, but it did not work.
Rolf
I have tried it and it works. Alternatively. you can add #INCLUDE "sapi.inc" and use:
SpSpeak("Hello everybody! Are you sitting comfortable? Then please stand up.")
I must correct myself - It does run in PB10. But I do net get it to run in FF3 with PB10.
Any ideas?
Rolf
Thanks Jim and Jose,
don't know why it won't work with Jim's code correction for me. I'll try to investigage.
SpSpeak (with SAPI.INC) works fine.
Rolf
How do you get it to speak in spanish?
I guess that installing an Spanish voice and selecting it.
It's installed. But how do you select it programatically?
Jose has wrappers for this in his includes for SAPI.
Welcome back, Elias!