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