From 74aa12ee4bbef787236bd382b186a17db40866a6 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 18 九月 2023 10:43:27 +0800
Subject: [PATCH] docs
---
funasr/version.txt | 2 +-
funasr/quick_start.md | 2 +-
setup.py | 1 +
funasr/bin/asr_inference_launch.py | 12 +++++++-----
funasr/quick_start_zh.md | 2 +-
5 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/funasr/bin/asr_inference_launch.py b/funasr/bin/asr_inference_launch.py
index cdaaefc..ea0f221 100644
--- a/funasr/bin/asr_inference_launch.py
+++ b/funasr/bin/asr_inference_launch.py
@@ -45,7 +45,7 @@
from funasr.utils.types import str2triple_str
from funasr.utils.types import str_or_none
from funasr.utils.vad_utils import slice_padding_fbank
-
+from tqdm import tqdm
def inference_asr(
maxlenratio: float,
@@ -651,7 +651,8 @@
batch_size_token_ms_cum = 0
beg_idx = 0
- for j, _ in enumerate(range(0, n)):
+ beg_asr_total = time.time()
+ for j, _ in tqdm(enumerate(range(0, n))):
batch_size_token_ms_cum += (sorted_data[j][0][1] - sorted_data[j][0][0])
if j < n - 1 and (batch_size_token_ms_cum + sorted_data[j + 1][0][1] - sorted_data[j + 1][0][0]) < batch_size_token_ms and (sorted_data[j + 1][0][1] - sorted_data[j + 1][0][0]) < batch_size_token_threshold_s:
continue
@@ -661,16 +662,17 @@
beg_idx = end_idx
batch = {"speech": speech_j, "speech_lengths": speech_lengths_j}
batch = to_device(batch, device=device)
- print("batch: ", speech_j.shape[0])
+ # print("batch: ", speech_j.shape[0])
beg_asr = time.time()
results = speech2text(**batch)
end_asr = time.time()
- print("time cost asr: ", end_asr - beg_asr)
+ # print("time cost asr: ", end_asr - beg_asr)
if len(results) < 1:
results = [["", [], [], [], [], [], []]]
results_sorted.extend(results)
-
+ end_asr_total = time.time()
+ print("total time cost asr: ", end_asr_total-beg_asr_total)
restored_data = [0] * n
for j in range(n):
index = sorted_data[j][1]
diff --git a/funasr/quick_start.md b/funasr/quick_start.md
index 5731358..202c709 100644
--- a/funasr/quick_start.md
+++ b/funasr/quick_start.md
@@ -26,7 +26,7 @@
python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "5,10,5"
```
-For more examples, please refer to [docs](https://alibaba-damo-academy.github.io/FunASR/en/runtime/websocket_python.html#id2).
+For more examples, please refer to [docs](runtime/python/websocket/README.md).
### C++ version Example
diff --git a/funasr/quick_start_zh.md b/funasr/quick_start_zh.md
index 9da3cdc..a8d20a2 100644
--- a/funasr/quick_start_zh.md
+++ b/funasr/quick_start_zh.md
@@ -26,7 +26,7 @@
python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "5,10,5"
#python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "8,8,4" --audio_in "./data/wav.scp"
```
-鏇村渚嬪瓙鍙互鍙傝�冿紙[鐐瑰嚮姝ゅ](runtime/websocket_python.html#id2)锛�
+鏇村渚嬪瓙鍙互鍙傝�冿紙[鐐瑰嚮姝ゅ](runtime/python/websocket/README.md)锛�
<a name="cpp鐗堟湰绀轰緥"></a>
#### c++鐗堟湰绀轰緥
diff --git a/funasr/version.txt b/funasr/version.txt
index c006218..879be8a 100644
--- a/funasr/version.txt
+++ b/funasr/version.txt
@@ -1 +1 @@
-0.7.6
+0.7.7
diff --git a/setup.py b/setup.py
index 84f2140..ac2a76c 100644
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,7 @@
"edit-distance",
"textgrid",
"protobuf",
+ "tqdm",
],
# train: The modules invoked when training only.
"train": [
--
Gitblit v1.9.1