Пример #1
0
def do():
    synthesize.say("Let's make things a little bit more cozy in here.  I'll be here if you need anything.  But I must warn you.  My camera is always on.")
    #dim the lights
    #play romantic music
    pygame.mixer.init()
    channel1 = pygame.mixer.Channel(1)
    channel1.play(pygame.mixer.Sound('./music/romantic.wav'))
Пример #2
0
def get_joke_text():
	url = "http://api.icndb.com/jokes/random"

	resp = urllib2.urlopen(url = url).read()
	decoded_resp = json.JSONDecoder().decode(resp)
	joke = decoded_resp['value']['joke']

	synthesize.say(joke)
Пример #3
0
def selfie():
	synthesize.say("Selfie Time!")
	time.sleep(1.2)
	synthesize.say('Say Cheese!')
	time.sleep(1.5)
	filename = ('image{}.jpg'.format(time.time()))
	take_picture('./selfies/' + filename)
	synthesize.say('Snip!')
	emailio.send_mail('*****@*****.**', '*****@*****.**', '', '', ['./selfies/' + filename])
Пример #4
0
def do():
    synthesize.say('It was a dark and stormy day, when Trevor Edwards first conceived the idea of me.  He formed a mighty team consisting of Jerry Jia and Elizabeth Yam, and on that day on January 16, 2016, I was born to serve this household.')
Пример #5
0
def do():
    synthesize.say('My name is Jauffree.')
Пример #6
0
import numpy as np
import synthesize
import cv2
import speech
import inputs
import time
import interpreter
import camera_util, light, shutil, emailio
from PIL import Image
#import face

in_normal_mode = True
check_email_count = 0
pic_count = 0

synthesize.say('Hello. I am Jauffre: Your friendly neighborhood house bot!')
time.sleep(3)
#Here we begin the command waiting loop.


def compare_photos(path1, path2, in_alarm):
    imga = Image.open(path1)
    imgb = Image.open(path2)
    error_thresh = 2300
    return mse(imga, imgb) > error_thresh


#Source: http://www.pyimagesearch.com/2014/09/15/python-compare-two-images/
def mse(imageA, imageB):
    h1 = imageA.histogram()
    h2 = imageB.histogram()