From 835a98631522c6ff449310455f76a59e1cb092c7 Mon Sep 17 00:00:00 2001 From: "yanyuxiyangzk@126.com" Date: Sat, 13 Apr 2024 19:11:50 +0800 Subject: [PATCH] =?UTF-8?q?funasr=E5=AE=9E=E6=97=B6=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- funasr/readme.md | 7 ++++ html/readme.md | 1 + html/static/echo.html | 80 +++++++++++++++++++++---------------------- html/static/main.js | 2 ++ 4 files changed, 50 insertions(+), 40 deletions(-) create mode 100644 html/readme.md diff --git a/funasr/readme.md b/funasr/readme.md index 2d4aca2..0b3292e 100644 --- a/funasr/readme.md +++ b/funasr/readme.md @@ -1,3 +1,10 @@ 1、启动语言识别服务端 +创建虚拟环境 +conda create -n funasr +conda activate funasr +安装依赖库 + +python funasr_wss_server.py --port 10095 +或者 python funasr_wss_server.py --host "0.0.0.0" --port 10197 --ngpu 0 diff --git a/html/readme.md b/html/readme.md new file mode 100644 index 0000000..7edded7 --- /dev/null +++ b/html/readme.md @@ -0,0 +1 @@ +在浏览器中打开 samples/html/static/index.html,输入ASR服务器地址,支持麦克风输入,也支持文件输入 \ No newline at end of file diff --git a/html/static/echo.html b/html/static/echo.html index 44eed2e..6abef57 100644 --- a/html/static/echo.html +++ b/html/static/echo.html @@ -17,7 +17,7 @@

input text

- +
@@ -33,9 +33,9 @@
asr服务器地址(必填):
- +
- +

@@ -46,7 +46,7 @@
-
+ -
+
热词设置(一行一个关键字,空格隔开权重,如"阿里巴巴 20"): -
- -
+ + +
- 语音识别结果显示: +
语音识别结果显示:

- +
请点击开始
@@ -82,7 +82,7 @@
- +
@@ -92,37 +92,37 @@ \ No newline at end of file diff --git a/html/static/main.js b/html/static/main.js index 514ce41..ca54ffe 100644 --- a/html/static/main.js +++ b/html/static/main.js @@ -362,8 +362,10 @@ function getJsonMessage( jsonMsg ) { rec_text=rec_text+rectxt; //.replace(/ +/g,""); } var varArea=document.getElementById('varArea'); + var varArea_message=document.getElementById('message'); varArea.value=rec_text; + varArea_message.value=rec_text; console.log( "offline_text: " + asrmodel+","+offline_text); console.log( "rec_text: " + rec_text); if (isfilemode==true && is_final==false){