Răsfoiți Sursa

export model

游雁 3 ani în urmă
părinte
comite
adb43c14b8

+ 1 - 1
funasr/runtime/python/onnxruntime/rapid_paraformer/kaldifeat/feature.py

@@ -270,7 +270,7 @@ def compute_fbank_feats(
         waveform,
         blackman_coeff=0.42,
         dither=1.0,
-        energy_floor=0.0,
+        energy_floor=1.0,
         frame_length=25,
         frame_shift=10,
         high_freq=0,

+ 1 - 1
funasr/runtime/python/onnxruntime/rapid_paraformer/rapid_paraformer.py

@@ -55,7 +55,7 @@ class RapidParaformer():
     def load_data(self,
                   wav_content: Union[str, np.ndarray, List[str]]) -> List:
         def load_wav(path: str) -> np.ndarray:
-            waveform, _ = librosa.load(path)
+            waveform, _ = librosa.load(path, sr=None)
             return waveform[None, ...]
 
         if isinstance(wav_content, np.ndarray):

+ 2 - 1
funasr/runtime/python/onnxruntime/rapid_paraformer/utils.py

@@ -165,7 +165,8 @@ class WavFrontend():
                                   frame_shift=self.frame_shift,
                                   dither=self.dither,
                                   energy_floor=0.0,
-                                  sample_frequency=self.fs)
+                                  sample_frequency=self.fs,
+                                  window_type=self.window)
         feat = mat.astype(np.float32)
         feat_len = np.array(mat.shape[0]).astype(np.int32)
         return feat, feat_len