UIFlow Guide
功能使用前需使用 M5Burner 为Atom Echo烧录STT固件并获取Token(在UIFlow中初始化Echo STT远程功能需使用该字段)
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