mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
export model
This commit is contained in:
parent
7114c13aa3
commit
adb43c14b8
@ -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,
|
||||
|
||||
@ -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):
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user