From c8fe32c5bc0d7ec434d4cbce9f38bd0e1617c93a Mon Sep 17 00:00:00 2001
From: zhaomingwork <zhaomingwork@qq.com>
Date: 星期一, 15 五月 2023 15:00:16 +0800
Subject: [PATCH] change readme for more detail
---
funasr/runtime/html5/readme.md | 44 ++++++++++++++++++++++++++++----------------
1 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/funasr/runtime/html5/readme.md b/funasr/runtime/html5/readme.md
index d354f61..92c63d3 100644
--- a/funasr/runtime/html5/readme.md
+++ b/funasr/runtime/html5/readme.md
@@ -9,42 +9,53 @@
```
### javascript
+[html5褰曢煶](https://github.com/xiangyuecn/Recorder)
```shell
-Recorder [html5褰曢煶](https://github.com/xiangyuecn/Recorder)
+Recorder
```
-## html5鏈嶅姟閰嶇疆
-### 鍚姩html5鏈嶅姟
+
+### demo椤甸潰濡備笅
+
+
+## 鍏蜂綋鏁版嵁娴佸悜锛�
+娴忚鍣╤ttps楹﹀厠椋� --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> nginx鏈嶅姟 --> ws asr online srv
+
+## 1.html5 demo鏈嶅姟鍚姩
+### 鍚姩html5鏈嶅姟锛岄渶瑕乻sl璇佷功(鑷繁鐢熸垚璇峰線鍚庣湅)
```shell
usage: h5Server.py [-h] [--host HOST] [--port PORT] [--certfile CERTFILE]
[--keyfile KEYFILE]
python h5Server.py --port 1337
```
-娉�:
-wsconnecter.js閲岄厤缃畂nline asr wss璺緞
+## 2.鍚姩ws asr online srv
+[鍏蜂綋璇风湅online asr](https://github.com/alibaba-damo-academy/FunASR/tree/main/funasr/runtime/python/websocket)
+鐩墠online asr鍙彁渚泈s鎺ュ彛锛岄渶瑕侀�氳繃nginx灏唚ss杞彂鍒拌online asr绔彛涓�
+
+## 3.淇敼wsconnecter.js閲宎sr鎺ュ彛鍦板潃
+wsconnecter.js閲岄厤缃畂nline asr鏈嶅姟鍦板潃璺緞锛岃繖閲岄厤缃殑鏄痭ginx鐨剋ss绔彛)
var Uri = "wss://xxx:xxx/"
-### 娴忚鍣ㄦ墦寮�鍦板潃
+## 4.閰嶇疆nginx骞跺惎鍔�
+
+## 5.娴忚鍣ㄦ墦寮�鍦板潃娴嬭瘯
https://127.0.0.1:1337/static/index.html
-### demo椤甸潰濡備笅
-
-## 鍚庣閰嶇疆
+
+## 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鍗忚鐨勮浆鎹€��
-## 鍏蜂綋杩囩▼濡備笅锛�
-娴忚鍣╤tts --> html5 demo鏈嶅姟 --> js wss鎺ュ彛 --> nginx鏈嶅姟 --> ws asr online srv
-
-## 閰嶇疆nginx wss鍗忚(浜嗚В鐨勫彲浠ヨ烦杩囷級
+## 鑷鐢熸垚璇佷功
鐢熸垚璇佷功(娉ㄦ剰杩欑璇佷功骞朵笉鑳借鎵�鏈夋祻瑙堝櫒璁ゅ彲锛岄儴鍒嗘墜鍔ㄦ巿鏉冨彲浠ヨ闂�,鏈�濂戒娇鐢ㄥ叾浠栬璇佺殑瀹樻柟ssl璇佷功)
-### 鐢熸垚绉侀挜锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
+```shell
+### 1)鐢熸垚绉侀挜锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
openssl genrsa -des3 -out server.key 1024
-### 鐢熸垚csr鏂囦欢 锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
+### 2)鐢熸垚csr鏂囦欢 锛屾寜鐓ф彁绀哄~鍐欏唴瀹�
openssl req -new -key server.key -out server.csr
### 鍘绘帀pass
@@ -53,6 +64,7 @@
### 鐢熸垚crt鏂囦欢锛屾湁鏁堟湡1骞达紙365澶╋級
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
+```
## nginx杞彂閰嶇疆绀轰緥
```shell
@@ -76,7 +88,7 @@
location /wss/ {
- proxy_pass http://127.0.0.1:1111/; # asr online model ws address:port
+ 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";
--
Gitblit v1.9.1