Text to speech script here
#1
i want other devs to be able to try out the text to speech server script. i'm running a new version of my text to speech engine on my xp machine. here is an example of how to use it.

you can use the source below as an example but i see you doesn't like tabs... so here's a link http://ttdev.net/t2s.py

Quote:import xbmc
import urllib2

t2saddy = "lostit1278.no-ip.com"
t2sport = "99"

txheaders = {
'user-agent': 'xbmc t2s client',
'accept-language': 'en-us',
}

def sett2s(textdata):
try:
req = urllib2.request('http://' + t2saddy + ':' + t2sport + '/t2s/set.txt', textdata, txheaders)
response = urllib2.urlopen(req)
html = response.read()
return html
except:
return "0"

def playt2sxb():
xbmc.player().play('http://' + t2saddy + ':' + t2sport + '/t2s/xbplay.mp3')

def playt2spc():
req = urllib2.request('http://' + t2saddy + ':' + t2sport + '/t2s/pcplay.txt', "", txheaders)
response = urllib2.urlopen(req)
html = response.read()
return html

if sett2s("welcome to xbmc. good %mae%. it is %time%.") == '1':
playt2sxb()

i don't have a huge transfer capacity so try not to over load it! thanks guys. hope this is useful and/or entertaining!
Image
Softmodded
XMBC enthusiast since Dec. 2004
Reply

Logout Mark Read Team Forum Stats Members Help
Text to speech script here0