1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2025-07-12 22:50:22 +02:00

play films with kweb for rpi

This commit is contained in:
MarkParker5
2020-10-28 21:02:30 +02:00
parent a8e77bcc6f
commit b17b23c8e7
8 changed files with 59 additions and 15 deletions

View File

@ -1,6 +1,7 @@
import SpeechRecognition
import Text2Speech
import SmallTalk
import Media
from Command import Command
import config
import QA
@ -44,8 +45,12 @@ while True: # main loop
if Command.isRepeat(text):
reply(memory[0]['responce']);
continue
try: cmd, params = memory[0]['cmd'].checkContext(text).values(); params = {**memory[0]['params'], **params}
except: cmd, params = Command.reg_find(text).values()
try:
cmd, params = memory[0]['cmd'].checkContext(text).values()
if memory[0].get('params'):
params = {**memory[0].get('params'), **params}
except:
cmd, params = Command.reg_find(text).values()
responce = cmd.start(params)
reply(responce)
memory.insert(0, {