REALbasic offers a Speak Method that allows us to use the computer’s speech synthesizer to pronounce the passed text string (Windows and Macintosh only). It’s very easy to use so lets look how Speak Method work.
Speak takes a string (or any variant that can be expressed as a string) and uses the Windows or Macintosh text-to-speech engine to speak the text. The speech is asynchronous, allowing normal program flow to continue. By default, subsequent calls to Speak before the first call has finished will queue up and speak after the completion of the previous call. If the optional interrupt flag is used and set to True, the previous Speak calls will be stopped immediately. Speak is not supported on Linux.
We can for example read the text available in TextArea Control. I hope this example is clear to understand. If you like you can change some settings (like system voice, reading speed etc.) in System Preferences -> Speech. I think that Windows offers also this kind of options somewhere.
1 2 3 4 5 | if TextArea1.Text < > "" then speak TextArea1.Text else speak "Please insert some text in TextArea because it's empty" end if |
thanks
your tutorials are really helpful…i’m just starting realbasic and it can get really fustrating!