From 5ecd13bd0460c4317e9a585e4204731791e5e9db Mon Sep 17 00:00:00 2001
From: 语帆 <yf352572@alibaba-inc.com>
Date: 星期三, 28 二月 2024 11:23:51 +0800
Subject: [PATCH] test
---
funasr/frontends/default.py | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/funasr/frontends/default.py b/funasr/frontends/default.py
index ab5b731..364c8bb 100644
--- a/funasr/frontends/default.py
+++ b/funasr/frontends/default.py
@@ -26,7 +26,7 @@
def __init__(
self,
- fs: Union[int, str] = 16000,
+ fs: int = 16000,
n_fft: int = 512,
win_length: int = None,
hop_length: int = 128,
@@ -44,12 +44,11 @@
**kwargs,
):
super().__init__()
- if isinstance(fs, str):
- fs = humanfriendly.parse_size(fs)
# Deepcopy (In general, dict shouldn't be used as default arg)
frontend_conf = copy.deepcopy(frontend_conf)
self.hop_length = hop_length
+ self.fs = fs
if apply_stft:
self.stft = Stft(
@@ -147,7 +146,7 @@
def __init__(
self,
- fs: Union[int, str] = 16000,
+ fs: int = 16000,
n_fft: int = 512,
win_length: int = None,
hop_length: int = None,
@@ -170,9 +169,6 @@
mc: bool = True
):
super().__init__()
- if isinstance(fs, str):
- fs = humanfriendly.parse_size(fs)
-
# Deepcopy (In general, dict shouldn't be used as default arg)
frontend_conf = copy.deepcopy(frontend_conf)
if win_length is None and hop_length is None:
--
Gitblit v1.9.1