BP Forums
Text to Speech - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: Text to Speech (/showthread.php?tid=474)



Text to Speech - Vinwarez - 03-12-2012

Hello, BP community.

Recently I've found out how to turn text to speech using only Visual Basic. It is very easy and it is useful for some programs such as Speak ABCs program or similar.

Here is the code snippet:
Code:
Dim SAPI
SAPI = CreateObject("SAPI.spvoice")

SAPI.Speak("[message]")

If you want it to speak the text from textbox, change "[message]" to Textbox1.text. This is the easiest and the simplest way.

Regards,
Vinwarez.


Re: Text to Speech - brandonio21 - 03-13-2012

Thanks for the share! This really is easy!


Re: Text to Speech - Vinwarez - 03-13-2012

It is easy! <!-- sWink --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt="Wink" title="Wink" /><!-- sWink -->