From 7a7ead00bccc3de7b542332f7dcdf84086ab74a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E5=8C=80?= Date: Fri, 21 Apr 2023 21:40:11 +0800 Subject: [PATCH 1/2] vad bug fix --- funasr/bin/vad_inference.py | 4 ++-- funasr/models/frontend/wav_frontend.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/funasr/bin/vad_inference.py b/funasr/bin/vad_inference.py index 1e19f5fc0..387b6228a 100644 --- a/funasr/bin/vad_inference.py +++ b/funasr/bin/vad_inference.py @@ -109,7 +109,7 @@ class Speech2VadSegment: fbanks, fbanks_len = self.frontend.forward_fbank(speech, speech_lengths) feats, feats_len = self.frontend.forward_lfr_cmvn(fbanks, fbanks_len) fbanks = to_device(fbanks, device=self.device) - # feats = to_device(feats, device=self.device) + feats = to_device(feats, device=self.device) feats_len = feats_len.int() else: raise Exception("Need to extract feats first, please configure frontend configuration") @@ -131,7 +131,7 @@ class Speech2VadSegment: "in_cache": in_cache } # a. To device - batch = to_device(batch, device=self.device) + #batch = to_device(batch, device=self.device) segments_part, in_cache = self.vad_model(**batch) if segments_part: for batch_num in range(0, self.batch_size): diff --git a/funasr/models/frontend/wav_frontend.py b/funasr/models/frontend/wav_frontend.py index 3661f6b11..1dbf49017 100644 --- a/funasr/models/frontend/wav_frontend.py +++ b/funasr/models/frontend/wav_frontend.py @@ -34,7 +34,7 @@ def load_cmvn(cmvn_file): means = np.array(means_list).astype(np.float) vars = np.array(vars_list).astype(np.float) cmvn = np.array([means, vars]) - cmvn = torch.as_tensor(cmvn, dype=torch.float32) + cmvn = torch.as_tensor(cmvn, dtype=torch.float32) return cmvn From dee9bd8e31859ff679bf1fe39f51f43b7f3f702f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Fri, 21 Apr 2023 23:42:33 +0800 Subject: [PATCH 2/2] funasr==0.4.3 --- funasr/runtime/python/benchmark_onnx.md | 2 +- funasr/version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/funasr/runtime/python/benchmark_onnx.md b/funasr/runtime/python/benchmark_onnx.md index 9f920942f..ffae8f90d 100644 --- a/funasr/runtime/python/benchmark_onnx.md +++ b/funasr/runtime/python/benchmark_onnx.md @@ -1,4 +1,4 @@ -# CPU Benchmark (ONNX) +# CPU Benchmark (ONNX-python) ## Configuration ### Data set: diff --git a/funasr/version.txt b/funasr/version.txt index 2b7c5ae01..17b2ccd9b 100644 --- a/funasr/version.txt +++ b/funasr/version.txt @@ -1 +1 @@ -0.4.2 +0.4.3