private void PartBMsgCallback(bool ok, string mid, ClassBaiDuAsrCallback cbac) { if (!ok) { if (cbac == null) { PBError = "网络错误!"; } else { PBError = cbac.err_msg; } okB = false; return; } string str = ""; string tempB = ""; for (int i = 0; i < cbac.result.Length; i++) { str += cbac.result[i] + " "; } str = str.Substring(0, str.Length - 1); if (tempB != "") { tempB += " "; } // KeyValuePair<List<string>, List<string>> CODE= GetListFromTwoText(PAsourceText,str); }
private void AsrCallBack(bool ok, int mid, ClassBaiDuAsrCallback cbac) { if (ok) { string tempStr = ""; for (int i = 0; i < cbac.result.Length; i++) { tempStr += cbac.result[i] + " "; } resultsStr.Add(mid, tempStr); List <int> order = FindOrderList(mid); string all = ""; bool reFlag = false; for (int i = 0; i < order.Count; i++) { if (!resultsStr.ContainsKey(order[i])) { reFlag = true; return; } all += resultsStr[order[i]]; } if (reFlag) { return; } tempActions[order]?.Invoke(true, all); } else { List <int> order = FindOrderList(mid); if (failInts.Contains(order)) { return; } failInts.Add(order); tempActions[order]?.Invoke(false, "语音服务器异常!请稍后再试..."); // GlobalUIManager.guim.CreateNewDialogBox("评卷服务器连接失败!"); } }