File size: 809 Bytes
fe79d42 23f48d8 0827444 c3afd26 fe79d42 8852f54 533dd7a 0827444 3eab118 1a7150e 23f48d8 fe79d42 0827444 c3afd26 3eab118 0827444 533dd7a c3afd26 8852f54 fe79d42 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import pyarrow as pa
from dora import DoraStatus
from utils import speak
from time import sleep
class Operator:
def __init__(self):
self.location = ["KITCHEN", "OFFICE"]
self.current_location = "KITCHEN"
def speak(self, text: str):
speak(text)
def on_event(self, event, send_output):
if event["type"] == "INPUT":
id = event["id"]
# On initialization
if id == "speech":
text: str = event["value"][0].as_py().lower()
if "stop" in text:
return DoraStatus.STOP
# send_output("go_to", pa.array([""]))
elif id == "reached_office":
pass
elif id == "reached_kitchen":
pass
return DoraStatus.CONTINUE
|