From 0ee33ed14b24bf13ea70197c4b0cc6770e0d1639 Mon Sep 17 00:00:00 2001
From: 彭震东 <zhendong.peng@qq.com>
Date: 星期一, 18 三月 2024 21:56:20 +0800
Subject: [PATCH] fix typo (#1510)
---
funasr/models/paraformer_streaming/model.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/funasr/models/paraformer_streaming/model.py b/funasr/models/paraformer_streaming/model.py
index 33ec976..a53aad5 100644
--- a/funasr/models/paraformer_streaming/model.py
+++ b/funasr/models/paraformer_streaming/model.py
@@ -531,6 +531,8 @@
for i in range(n):
kwargs["is_final"] = _is_final and i == n -1
audio_sample_i = audio_sample[i*chunk_stride_samples:(i+1)*chunk_stride_samples]
+ if kwargs["is_final"] and len(audio_sample_i) < 960:
+ continue
# extract fbank feats
speech, speech_lengths = extract_fbank([audio_sample_i], data_type=kwargs.get("data_type", "sound"),
--
Gitblit v1.9.1