Code for Text to Speech

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Post Reply
zappy
*
Posts: 22
Joined: 28 Nov 2010, 19:23

Code for Text to Speech

Post by zappy »

Text to speech would open lots of scenarios. Different voices can be selected. For more advanced, there are animations that can speak to text, with matching lips. Use of a counter and random function would always make it a mystery as what would be said next. A database could be used, or a simple If/Then.

If/Then can be used for up to 100 commands/responses, after that it gets unwieldy. This is an idea that can be quite simple that spruces up the software with about 30 lines of code, or quite complex.

The code for Visual Basic for text to speech would be as shown below.
Dim SAPI
SAPI = CreateObject("SAPI.spvoice")
SAPI.Speak(txtOrder.Text)
End

See this link, this is what I am talking about, but have a bondage theme.
http://www.youtube.com/watch?v=WnzlbyTZsQY

Image
User avatar
Dark_Lizerd
*****
Posts: 2418
Joined: 22 Oct 2006, 11:30
Location: New Mexico

Re: Code for Text to Speech

Post by Dark_Lizerd »

Yea, if/then works for some, but...
Select/case works very well for long chains...
IE: for those that don't know:

Select case WordToSay
case 1: say "1"
case 2: say "2"
...
case else: Say "What??"
end select

But unlike if/then, select will stop looking (read case lines) when there is a match...

... now to check out the text to speech...
All advice is checked, re-checked and verified to be questionable...
Don't ask, we both wont understand the answer...
http://www.mediafire.com/download/09dtr ... e_V2_2.exe Not just for nubies any more...
Post Reply