From b5d3df75cf6462aa3bf42fd3c86fa2aa7f1c8a15 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期五, 24 十一月 2023 00:54:44 +0800
Subject: [PATCH] setup jamo
---
funasr/fileio/sound_scp.py | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/funasr/fileio/sound_scp.py b/funasr/fileio/sound_scp.py
index 9b25fe5..b9364c6 100644
--- a/funasr/fileio/sound_scp.py
+++ b/funasr/fileio/sound_scp.py
@@ -4,9 +4,8 @@
import random
import numpy as np
-import soundfile
import librosa
-from typeguard import check_argument_types
+import librosa
import torch
import torchaudio
@@ -106,7 +105,6 @@
dest_sample_rate: int = 16000,
speed_perturb: Union[list, tuple] = None,
):
- assert check_argument_types()
self.fname = fname
self.dtype = dtype
self.always_2d = always_2d
@@ -118,7 +116,7 @@
def __getitem__(self, key):
wav = self.data[key]
if self.normalize:
- # soundfile.read normalizes data to [-1,1] if dtype is not given
+ # librosa.load normalizes data to [-1,1] if dtype is not given
array, rate = librosa.load(
wav, sr=self.dest_sample_rate, mono=self.always_2d
)
@@ -179,7 +177,6 @@
format="wav",
dtype=None,
):
- assert check_argument_types()
self.dir = Path(outdir)
self.dir.mkdir(parents=True, exist_ok=True)
scpfile = Path(scpfile)
--
Gitblit v1.9.1