From 6d6c6e3c79216896c45ff87b4bdfd8226a24924e Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期二, 14 十一月 2023 19:22:17 +0800
Subject: [PATCH] update docs; update run_server.sh; fix initlm

---
 runtime/html5/static/main.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/runtime/html5/static/main.js b/runtime/html5/static/main.js
index 52a8d96..20aa220 100644
--- a/runtime/html5/static/main.js
+++ b/runtime/html5/static/main.js
@@ -262,7 +262,7 @@
 	var obj = document.getElementById("varHot");
 
 	if(typeof(obj) == 'undefined' || obj==null || obj.value.length<=0){
-	  return "";
+	  return null;
 	}
 	let val = obj.value.toString();
   
@@ -279,11 +279,11 @@
 			for(var i=0;i<result.length-1;i++)
 				wordstr=wordstr+result[i]+" ";
   
-			jsonresult[wordstr.trim()]=result[result.length-1];
+			jsonresult[wordstr.trim()]= parseInt(result[result.length-1]);
 		}
 	}
 	console.log("jsonresult="+JSON.stringify(jsonresult));
-	return jsonresult;
+	return  JSON.stringify(jsonresult);
 
 }
 function getAsrMode(){
@@ -315,7 +315,7 @@
 	{
 		return tmptext;
 	}
-	tmptext=tmptext.replace(/銆�/g, ","); // in case there are a lot of "銆�"
+	tmptext=tmptext.replace(/銆倈锛焲锛寍銆亅\?|\./g, ","); // replace all punc for parse
 	var words=tmptext.split(",");
 	var jsontime=JSON.parse(tmptime); //JSON.parse(tmptime.replace(/\]\]\[\[/g, "],[")); // in case there are a lot segments by VAD
 	var char_index=0;

--
Gitblit v1.9.1