You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
795 B
34 lines
795 B
import yuyin as yy
|
|
import renlian as rl
|
|
import time
|
|
import jiqiren as jqr
|
|
import ganying as gy
|
|
import RPi.GPIO as GPIO # 引入GPIO模块
|
|
|
|
|
|
if __name__ == '__main__':
|
|
while True:
|
|
gy.check_env()
|
|
text = yy.record_text()
|
|
gy.check_env()
|
|
# text = '小爱'
|
|
if('小溪' in text):
|
|
jqr.Key("来了,来了!")
|
|
while True:
|
|
gy.check_env()
|
|
text = jqr.Say()
|
|
gy.check_env()
|
|
if('退出' in text):
|
|
break
|
|
|
|
elif ("退出" in text):
|
|
GPIO.cleanup()
|
|
break
|
|
|
|
elif(text not in ''):
|
|
jqr.Key("请尝试呼喊我的名字:小溪。")
|
|
|
|
else:
|
|
time.sleep(0.5)
|
|
continue
|