|
|
|
@@ -78,18 +78,18 @@ public class DuiMessageObserver implements MessageObserver { |
|
|
|
String readText = nlg; |
|
|
|
// if(FaceManager.getInstance(DuiApplication.getContext()).hasPerson()) { |
|
|
|
if (JSONUtils.isJson(display)) { |
|
|
|
// readText = MessageUtils.sendSkill(display); |
|
|
|
readText = MessageUtils.sendSkill(display); |
|
|
|
try { |
|
|
|
jsonObject.put("nlg", ""); |
|
|
|
jsonObject.put("display", ""); |
|
|
|
|
|
|
|
// if (!TextUtils.isEmpty(readText)) { |
|
|
|
// JSONObject jo = new JSONObject(); |
|
|
|
// jo.put("type", "djTtsNlpText"); |
|
|
|
// jo.put("data", readText); |
|
|
|
// Logger.e("思必驰NLP结果发给叠境tts:" + readText); |
|
|
|
// WebSocketManager.getInstance(MainActivity.instance).sendMsg(jo.toString()); |
|
|
|
// } |
|
|
|
if (!TextUtils.isEmpty(readText)) { |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("type", "djTtsNlpText"); |
|
|
|
jo.put("data", readText); |
|
|
|
Logger.e("思必驰NLP结果发给叠境tts:" + readText); |
|
|
|
WebSocketManager.getInstance(MainActivity.instance).sendMsg(jo.toString()); |
|
|
|
} |
|
|
|
} catch (JSONException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
@@ -98,11 +98,11 @@ public class DuiMessageObserver implements MessageObserver { |
|
|
|
jsonObject.put("nlg", ""); |
|
|
|
jsonObject.put("display", ""); |
|
|
|
|
|
|
|
// JSONObject jo = new JSONObject(); |
|
|
|
// jo.put("type", "djTtsNlpText"); |
|
|
|
// jo.put("data", readText); |
|
|
|
// Logger.e("思必驰NLP结果发给叠境tts:" + readText); |
|
|
|
// WebSocketManager.getInstance(MainActivity.instance).sendMsg(jo.toString()); |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("type", "djTtsNlpText"); |
|
|
|
jo.put("data", readText); |
|
|
|
Logger.e("思必驰NLP结果发给叠境tts:" + readText); |
|
|
|
WebSocketManager.getInstance(MainActivity.instance).sendMsg(jo.toString()); |
|
|
|
|
|
|
|
} catch (JSONException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
@@ -157,7 +157,7 @@ public class DuiMessageObserver implements MessageObserver { |
|
|
|
Log.d(Tag, "message : " + message + " data : " + data); |
|
|
|
switch (message) { |
|
|
|
case "context.output.text": |
|
|
|
// MessageUtils.sendChatMessage(data); |
|
|
|
MessageUtils.sendChatMessage(data); |
|
|
|
break; |
|
|
|
case "context.input.text": |
|
|
|
//判断有人的时候才发送给大模型 |
|
|
|
|