From cfe1eb132a945848ab7e51ce35dbe3b4a8af0a93 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 24 五月 2023 16:47:36 +0800
Subject: [PATCH] html5 docs

---
 funasr/runtime/html5/readme_cn.md |  128 ++++++++++++++++++++++--------------------
 1 files changed, 67 insertions(+), 61 deletions(-)

diff --git a/funasr/runtime/html5/readme_cn.md b/funasr/runtime/html5/readme_cn.md
index 5249d01..ac95029 100644
--- a/funasr/runtime/html5/readme_cn.md
+++ b/funasr/runtime/html5/readme_cn.md
@@ -17,37 +17,31 @@
 ## demo椤甸潰濡備笅
 <div align="center"><img src="./demo.gif" width="150"/> </div>
 
-## 涓ょws_server杩炴帴妯″紡
-### 1)鐩存帴杩炴帴妯″紡锛屾祻瑙堝櫒https楹﹀厠椋� --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> wss asr online srv(璇佷功鐢熸垚璇峰線鍚庣湅)
+[//]: # (## 涓ょws_server杩炴帴妯″紡)
 
-### 2)nginx涓浆锛屾祻瑙堝櫒https楹﹀厠椋� --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> nginx鏈嶅姟 --> ws asr online srv
+[//]: # (### 1&#41;鐩存帴杩炴帴妯″紡锛屾祻瑙堝櫒https楹﹀厠椋� --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> wss asr online srv&#40;璇佷功鐢熸垚璇峰線鍚庣湅&#41;)
+
+[//]: # (### 2&#41;nginx涓浆锛屾祻瑙堝櫒https楹﹀厠椋� --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> nginx鏈嶅姟 --> ws asr online srv)
 
 ## 鎿嶄綔姝ラ
 ### html5 demo鏈嶅姟鍚姩
-#### 鍚姩html5鏈嶅姟锛岄渶瑕乻sl璇佷功(宸茬敓鎴愶紝濡傞渶瑕佽嚜宸辩敓鎴愯寰�鍚庣湅)
-鐢ㄦ硶濡備笅:
+鍚姩html5鏈嶅姟锛岄渶瑕乻sl璇佷功(宸茬敓鎴愶紝濡傞渶瑕佽嚜宸辩敓鎴愯寰�鍚庣湅)
 ```shell
 h5Server.py [-h] [--host HOST] [--port PORT] [--certfile CERTFILE] [--keyfile KEYFILE]             
 ```
 渚嬪瓙濡備笅锛岄渶瑕佹敞鎰廼p鍦板潃锛屽鏋滀粠鍏朵粬璁惧璁块棶闇�姹傦紙渚嬪鎵嬫満绔級锛岄渶瑕佸皢ip鍦板潃璁句负鐪熷疄ip 
 ```shell
-python h5Server.py --host 0.0.0.0 --port 1337 --keyfile server.key
-# python h5Server.py --host 30.220.136.139 --port 1337 --keyfile server.key
+python h5Server.py --host 0.0.0.0 --port 1337
+# python h5Server.py --host 30.220.136.139 --port 1337
 ```
-### 鍚姩ws or wss asr online srv
+### 鍚姩ASR鏈嶅姟
 [鍏蜂綋璇风湅online asr](../python/websocket)
-online asr鎻愪緵涓ょwss鍜寃s妯″紡锛寃ss妯″紡鍙互鐩存帴鍚姩锛屾棤闇�nginx涓浆銆傚惁鍒欓渶瑕侀�氳繃nginx灏唚ss杞彂鍒拌online asr鐨剋s绔彛涓�
 
 `Tips:` asr 鏈嶅姟闇�瑕佷笌html5鏈嶅姟閮ㄧ讲鍒板悓涓�涓墿鐞嗘満鍣ㄤ笂
 #### wss鏂瑰紡
 ```shell
 cd ../python/websocket
-python ws_server_online.py --certfile ../../html5/server.crt --keyfile ../../html5/server.key  --port 1095
-```
-#### ws鏂瑰紡
-```shell
-cd ../python/websocket
-python ws_server_online.py  --port 1095
+python ws_server_online.py --port 1095
 ```
 
 ### 娴忚鍣ㄦ墦寮�鍦板潃
@@ -61,61 +55,73 @@
 淇敼缃戦〉涓紝asr鏈嶅姟鍣ㄥ湴鍧�锛坵ebsocket srv鐨刬p涓庣鍙o級锛岀偣鍑诲紑濮嬪嵆鍙娇鐢ㄣ�傛敞鎰廻5鏈嶅姟鍜宎sr鏈嶅姟闇�瑕佸湪鍚屼竴涓湇鍔″櫒涓婏紝鍚﹀垯瀛樺湪璺ㄥ煙闂銆�
 
 
-## 鑷鐢熸垚璇佷功
-鐢熸垚璇佷功(娉ㄦ剰杩欑璇佷功骞朵笉鑳借鎵�鏈夋祻瑙堝櫒璁ゅ彲锛岄儴鍒嗘墜鍔ㄦ巿鏉冨彲浠ヨ闂�,鏈�濂戒娇鐢ㄥ叾浠栬璇佺殑瀹樻柟ssl璇佷功)
 
-```shell
-### 1)鐢熸垚绉侀挜锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
-openssl genrsa -des3 -out server.key 1024
- 
-### 2)鐢熸垚csr鏂囦欢 锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
-openssl req -new -key server.key -out server.csr
- 
-### 鍘绘帀pass
-cp server.key server.key.org 
-openssl rsa -in server.key.org -out server.key
- 
-### 鐢熸垚crt鏂囦欢锛屾湁鏁堟湡1骞达紙365澶╋級
-openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
-```
+[//]: # (## nginx閰嶇疆璇存槑&#40;浜嗚В鐨勫彲浠ヨ烦杩�&#41;)
 
-## nginx閰嶇疆璇存槑(浜嗚В鐨勫彲浠ヨ烦杩�)
-h5鎵撳紑楹﹀厠椋庨渶瑕乭ttps鍗忚锛屽悓鏃跺悗绔殑asr websocket涔熷繀椤绘槸wss鍗忚锛屽鏋淸online asr](https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket)浠s鏂瑰紡杩愯锛屾垜浠彲浠ラ�氳繃nginx閰嶇疆瀹炵幇wss鍗忚鍒皐s鍗忚鐨勮浆鎹€��
+[//]: # (h5鎵撳紑楹﹀厠椋庨渶瑕乭ttps鍗忚锛屽悓鏃跺悗绔殑asr websocket涔熷繀椤绘槸wss鍗忚锛屽鏋淸online asr]&#40;https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket&#41;浠s鏂瑰紡杩愯锛屾垜浠彲浠ラ�氳繃nginx閰嶇疆瀹炵幇wss鍗忚鍒皐s鍗忚鐨勮浆鎹€��)
 
-### nginx杞彂閰嶇疆绀轰緥
-```shell
-events {                                                                                                            [0/1548]
-    worker_connections  1024;
-    accept_mutex on;
-  }
-http {
-  error_log  error.log;
-  access_log  access.log;
-  server {
+[//]: # ()
+[//]: # (### nginx杞彂閰嶇疆绀轰緥)
 
-    listen 5921 ssl http2;  # nginx listen port for wss
-    server_name www.test.com;
+[//]: # (```shell)
 
-    ssl_certificate     /funasr/server.crt;
-    ssl_certificate_key /funasr/server.key;
-    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
-    ssl_ciphers         HIGH:!aNULL:!MD5;
+[//]: # (events {                                                                                                            [0/1548])
 
-    location /wss/ {
+[//]: # (    worker_connections  1024;)
 
+[//]: # (    accept_mutex on;)
 
-      proxy_pass http://127.0.0.1:1111/;  # asr online model ws address and port
-      proxy_http_version 1.1;
-      proxy_set_header Upgrade $http_upgrade;
-      proxy_set_header Connection "upgrade";
-      proxy_read_timeout 600s;
+[//]: # (  })
 
-    }
-  }
-```
-### 淇敼wsconnecter.js閲宎sr鎺ュ彛鍦板潃
-wsconnecter.js閲岄厤缃畂nline asr鏈嶅姟鍦板潃璺緞锛岃繖閲岄厤缃殑鏄痺ss绔彛
-var Uri = "wss://xxx:xxx/wss/" 
+[//]: # (http {)
+
+[//]: # (  error_log  error.log;)
+
+[//]: # (  access_log  access.log;)
+
+[//]: # (  server {)
+
+[//]: # ()
+[//]: # (    listen 5921 ssl http2;  # nginx listen port for wss)
+
+[//]: # (    server_name www.test.com;)
+
+[//]: # ()
+[//]: # (    ssl_certificate     /funasr/server.crt;)
+
+[//]: # (    ssl_certificate_key /funasr/server.key;)
+
+[//]: # (    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;)
+
+[//]: # (    ssl_ciphers         HIGH:!aNULL:!MD5;)
+
+[//]: # ()
+[//]: # (    location /wss/ {)
+
+[//]: # ()
+[//]: # ()
+[//]: # (      proxy_pass http://127.0.0.1:1111/;  # asr online model ws address and port)
+
+[//]: # (      proxy_http_version 1.1;)
+
+[//]: # (      proxy_set_header Upgrade $http_upgrade;)
+
+[//]: # (      proxy_set_header Connection "upgrade";)
+
+[//]: # (      proxy_read_timeout 600s;)
+
+[//]: # ()
+[//]: # (    })
+
+[//]: # (  })
+
+[//]: # (```)
+
+[//]: # (### 淇敼wsconnecter.js閲宎sr鎺ュ彛鍦板潃)
+
+[//]: # (wsconnecter.js閲岄厤缃畂nline asr鏈嶅姟鍦板潃璺緞锛岃繖閲岄厤缃殑鏄痺ss绔彛)
+
+[//]: # (var Uri = "wss://xxx:xxx/wss/" )
 ## Acknowledge
 1. This project is maintained by [FunASR community](https://github.com/alibaba-damo-academy/FunASR).
 2. We acknowledge [AiHealthx](http://www.aihealthx.com/) for contributing the html5 demo.
\ No newline at end of file

--
Gitblit v1.9.1