From d60306e7a435053a1ed626213f9fa6fe12af2b3e Mon Sep 17 00:00:00 2001
From: 语帆 <yf352572@alibaba-inc.com>
Date: 星期五, 23 二月 2024 16:47:15 +0800
Subject: [PATCH] test
---
funasr/frontends/default.py | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/funasr/frontends/default.py b/funasr/frontends/default.py
index 70638e2..66d42f7 100644
--- a/funasr/frontends/default.py
+++ b/funasr/frontends/default.py
@@ -3,7 +3,6 @@
from typing import Tuple
from typing import Union
import logging
-import humanfriendly
import numpy as np
import torch
import torch.nn as nn
@@ -27,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,
@@ -45,8 +44,6 @@
**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)
@@ -148,7 +145,7 @@
def __init__(
self,
- fs: Union[int, str] = 16000,
+ fs: int = 16000,
n_fft: int = 512,
win_length: int = None,
hop_length: int = None,
@@ -171,9 +168,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