摘要:
1 from win32com.client import Dispatch 2 speaker = Dispatch('SAPI.SpVoice') 3 speaker.Speak('大家好,我是小怪兽') 4 del speaker 阅读全文
摘要:
1 import pyttsx3 as pyttsx 2 engine = pyttsx.init() 3 engine.say('小怪兽') 4 engine.runAndWait() 阅读全文
摘要:
1 import cv2 2 import numpy as np 3 import os 4 # 加载训练数据集文件 5 recognizer = cv2.face.LBPHFaceRecognizer_create() 6 recognizer.read('D:/trainer/trainer. 阅读全文
摘要:
1 import os #遍历路径 2 import cv2 3 import sys 4 import numpy as np 5 from PIL import Image 6 def getImageAndLabels(path): 7 facesSamples = [] 8 ids = [] 阅读全文
摘要:
1 import cv2 as cv 2 def face_detect_demo(img): 3 #将图片灰度 4 gray=cv.cvtColor(img,cv.COLOR_BGR2GRAY) 5 #加载特征数据 6 face_detector = cv.CascadeClassifier( 7 阅读全文