export model

This commit is contained in:
游雁 2023-02-13 12:21:21 +08:00
parent 7114c13aa3
commit adb43c14b8
3 changed files with 4 additions and 3 deletions

View File

@ -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,

View File

@ -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):

View File

@ -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