Ola
Been looking for this like forever...
Usage:
When this function is called, a robot voice will read out the given string, doing it's best human impression.
Now I just need a way to remove all HTML tags from my text for it to be read properly. The robots are taking over!!


Ta!
Been looking for this like forever...
Usage:
B4X:
MashSpeak(page,"I have been developing A.B.M. web apps for a while now. It's an enjoyable experience.",0.7)
B4X:
Sub MashSpeak(pg As ABMPage, msg As String, rate As Double)
Dim script As String = $"var speech = new SpeechSynthesisUtterance();
// Set the text and voice attributes.
speech.text = "${msg}";
speech.volume = 1;
speech.rate = ${rate};
speech.pitch = 1;
window.speechSynthesis.speak(speech);"$
pg.ws.Eval(script,Null)
pg.ws.flush
End Sub
When this function is called, a robot voice will read out the given string, doing it's best human impression.
Now I just need a way to remove all HTML tags from my text for it to be read properly. The robots are taking over!!
Ta!
Last edited: