From 1a45b647a858b72c711c64bfe6b2e5333df6fd86 Mon Sep 17 00:00:00 2001
From: Truco <22969604+truc0@users.noreply.github.com>
Date: 星期一, 28 十月 2024 13:41:38 +0800
Subject: [PATCH] perf(models/FsmnVADStreaming): optimize GetFrameState and PopDataToOutputBuf (#2177)
---
funasr/frontends/wav_frontend.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/funasr/frontends/wav_frontend.py b/funasr/frontends/wav_frontend.py
index a4002df..3324208 100644
--- a/funasr/frontends/wav_frontend.py
+++ b/funasr/frontends/wav_frontend.py
@@ -134,7 +134,7 @@
mat = kaldi.fbank(
waveform,
num_mel_bins=self.n_mels,
- frame_length=self.frame_length,
+ frame_length=min(self.frame_length,waveform_length/self.fs*1000),
frame_shift=self.frame_shift,
dither=self.dither,
energy_floor=0.0,
--
Gitblit v1.9.1