Browse Source

Updated TTS.py to run standalone

Jezra 11 years ago
parent
commit
9efaa1b700
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      TTS.py

+ 3
- 4
TTS.py View File

@@ -44,6 +44,7 @@ class TTS(gobject.GObject):
44 44
 		self.pipeline.set_state(gst.STATE_PAUSED)
45 45
 
46 46
 	def result(self, asr, text, uttid):
47
+		#emit finished
47 48
 		self.emit("finished", True)
48 49
 		print text
49 50
 		#is there a matching command?
@@ -53,8 +54,6 @@ class TTS(gobject.GObject):
53 54
 			subprocess.call(cmd, shell=True)
54 55
 		else:
55 56
 			print "no matching command"
56
-		#emit finished
57
-		
58 57
 		
59 58
 	def read_commands(self):
60 59
 		#read the.commands file
@@ -74,8 +73,8 @@ class TTS(gobject.GObject):
74 73
 		strings.close()
75 74
 
76 75
 if __name__ == "__main__":
77
-	b = Blather()
78
-	b.listen()
76
+	tts = TTS()
77
+	tts.listen()
79 78
 	main_loop = gobject.MainLoop()
80 79
 	#start the main loop
81 80
 	try:

Loading…
Cancel
Save