using System; /// /// 语音工具 /// public class ZXKWakeup : Sensor { //唤醒词:小智小智 public Action callBack;//唤醒回调 public override void ReceiveData(string datas, string portName) { base.ReceiveData(datas, portName); if (datas.TrimEnd('\n', '\r') == "hello") { callBack?.Invoke(); } } }