Example #1
0
def main():
	messageBox = multiprocessing.Queue()
	#窗口进程
	wController = windowController.QWindowsController(messageBox)
	wController.start()
	#策略主进程
	controller.main(messageBox)
#coding=utf-8
#中文编码必备否则编译时即出错
import controller

controller.main()
Example #3
0
#!/usr/bin/env python3
#This script is originally by Maxwell Budd (TechBotBuilder).
#Please credit me as one or the other if you find this work helpful or derive code from it.

#this script should be setup to run in /etc/rc.local right before exit(0)
#with the line "python3 {path_to_avc_dir}/startup.py &"
#but don't do that unless you have a switch going from https://pinout.xyz/pinout/pin16_gpio23 to gnd
#or else you won't be able to boot up normally.

import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)
startswitchpin = 16
GPIO.setup(startswitchpin, GPIO.IN, pull_up_down=GPIO.PUD_UP)#normally connected to +3 v
if GPIO.input(startswitchpin) == 1:
    #if the switch is not closed do the program launch sequence
    #run the pi-blaster daemon
    from subprocess import call
    call("sudo /home/pi/piblaster/pi-blaster-master/pi-blaster", shell=True)
    from time import sleep
    sleep(10) #give the pi a moment to let other daemons start (like pi-blaster)
    from controller import main
    main()#run the program
#otherwise, if someone has closed the switch->0v, just do nothing
Example #4
0
import os
import controller

def audio(path,filename):
	#audio fomat wav
	file=filename

	#audio file name's
	filename=filename.split(".")
	os.system("ffmpeg -i '"+path+"/"+file+"' -acodec pcm_s16le -ac 1 -ar 16000 '"+path+"/"+filename[0]+"_features.wav"+"'")
	#os.system("rm '"+path+archivo+"'")
	destino=path+"/"+filename[0]+"_features.wav"

	#ingreso a bd
<<<<<<< HEAD
	controller.main(destino,duration,date)
=======
	controller.main(destino)
>>>>>>> master

	return(filename[0]+"_features.wav")


	
Example #5
0
import controller

controller.main()
Example #6
0
'''This is the vitrual assistant for the system. It takes the input from the user both in the from of voice or keyboard.
It can search file both in the system and on web and provide the result in the form of audio or text.'''

#Here are some instructions for how to use the assistant
#1. To quit chat bot say search and wait for 5 seconds
#2. To start using keyboard say Keyboard
#3. To stop the voice command speak cut
#4. To start the voice command say start

import controller as ctrl
ctrl.main()
Example #7
0
 def goAgain():
     root2.destroy()
     controller.main()
Example #8
0
def main():
	controller.main()
 def test_main():
     """main should not crash."""
     controller.main()