Text to speech

This commit is contained in:
John 2015-08-03 02:48:36 +03:00
parent 61a703e04d
commit 323d181e6f
3 changed files with 6 additions and 1 deletions

View file

@ -17,7 +17,6 @@ from otp.nametag.Nametag import Nametag
from otp.nametag.NametagGroup import NametagGroup
from otp.nametag.NametagConstants import *
teleportNotify = DirectNotifyGlobal.directNotify.newCategory('Teleport')
teleportNotify.showTime = True
if config.GetBool('want-teleport-debug', 1):

View file

@ -2,6 +2,7 @@ from pandac.PandaModules import *
from NametagConstants import *
from Nametag3d import *
from Nametag2d import *
import subprocess
class NametagGroup:
CCNormal = CCNormal
@ -241,6 +242,9 @@ class NametagGroup:
tag.chatFlags = self.chatFlags
tag.avatar = self.avatar
tag.icon = self.icon
if settings['talk2speech']:
subprocess.Popen('espeak "%s"' % tag.chatString)
tag.update()

View file

@ -102,6 +102,8 @@ if 'tpTransition' not in settings:
settings['tpTransition'] = True
if 'fov' not in settings:
settings['fov'] = OTPGlobals.DefaultCameraFov
if 'talk2speech' not in settings:
settings['talk2speech'] = False
loadPrcFileData('Settings: res', 'win-size %d %d' % tuple(settings['res']))
loadPrcFileData('Settings: fullscreen', 'fullscreen %s' % settings['fullscreen'])