UIFlow Guide
Before using the function, you need to use M5Burner to flash the STT firmware onto the Atom Echo and obtain the Token (this field is required to initialize the Echo STT remote feature in UIFlow).
from m5stack import *
from m5ui import *
from uiflow import *
from echo import Echo
import wifiCfg
setScreenColor(0x222222)
stt_data = None
wifiCfg.autoConnect(lcdShow=False)
def echo_callback(*args):
global stt_data
stt_data = args[0]
print(stt_data)
pass
echo = Echo(str('500291857fbc58d4336dbe4e30d49797'))
echo.set_callback(echo_callback)
from echo import Echo
echo = Echo(str('500291857fbc58d4336dbe4e30d49797'))
echo.set_callback(echo_callback)
echo.recv_text
def echo_callback(*args):
global stt_data
stt_data = args[0]
print(stt_data)
pass