Ejemplo n.º 1
0
def on_mouse_press(x, y, button, modifiers):
    if globalVars.listening == False:
        thread1 = thinkThread(1, "Thread-1")
        try:
            thread1.start()
        except:
            print("Error: unable to start thread")

    elif globalVars.listening == True:
        try:
            thread1.stop()
            globalVars.listening = False
            window.set_caption('Steve - Not Listening')
            extras.speak('"Not Listening"')
        except:
            print("Error Stopping Thread")
Ejemplo n.º 2
0
 def run(self):
     globalVars.listening = True
     text = extras.recognize()
     commands.doCommand(text)
     globalVars.listening = False
     window.set_caption('Steve - Not Listening')
     return ()
Ejemplo n.º 3
0
def on_mouse_press(x, y, button, modifiers):
	if globalVars.listening == False:
		thread1 = thinkThread(1, "Thread-1")
		try:
			thread1.start()
		except:
			print("Error: unable to start thread")
				
	elif globalVars.listening == True:
		try:
			thread1.stop()
			globalVars.listening = False
			window.set_caption('Steve - Not Listening')
			extras.speak('"Not Listening"')
		except:
			print("Error Stopping Thread")
Ejemplo n.º 4
0
	def run(self):
		globalVars.listening = True
		text = extras.recognize()
		commands.doCommand(text)
		globalVars.listening = False
		window.set_caption('Steve - Not Listening')
		return()
Ejemplo n.º 5
0
import crabGLShapes as shape
import SteveExtras as extras
import SteveCommands as commands
import threading
import platform

#key = pyglet.window.key
#if symbol == key.SPACE:
#	glClearColor(0.0, 0.0, 0.0, 0.0)

window = pyglet.window.Window(200,
                              60,
                              style=pyglet.window.Window.WINDOW_STYLE_DIALOG)
window.set_location(0, 30)
window.set_caption('Steve - Not Listening')
extras.speak('"Ready"')


class thinkThread(threading.Thread):
    def __init__(self, threadID, name):
        threading.Thread.__init__(self)
        self.threadID = threadID
        self.name = name

    def run(self):
        globalVars.listening = True
        text = extras.recognize()
        commands.doCommand(text)
        globalVars.listening = False
        window.set_caption('Steve - Not Listening')
        return ()
Ejemplo n.º 6
0
import pyglet
from pyglet.gl import *
import crabGLShapes as shape
import SteveExtras as extras
import SteveCommands as commands
import threading
import platform

#key = pyglet.window.key
#if symbol == key.SPACE:
#	glClearColor(0.0, 0.0, 0.0, 0.0)

window = pyglet.window.Window(200, 60, style=pyglet.window.Window.WINDOW_STYLE_DIALOG)
window.set_location(0, 30)
window.set_caption('Steve - Not Listening')
extras.speak('"Ready"')

class thinkThread(threading.Thread):
	def __init__(self, threadID, name):
		threading.Thread.__init__(self)
		self.threadID = threadID
		self.name = name
	def run(self):
		globalVars.listening = True
		text = extras.recognize()
		commands.doCommand(text)
		globalVars.listening = False
		window.set_caption('Steve - Not Listening')
		return()

class crap():