语帆
2024-02-28 ab4a31201c218b212ac52cbd529024c5858a9f87
test
1个文件已修改
6 ■■■■ 已修改文件
funasr/frontends/default.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
funasr/frontends/default.py
@@ -85,8 +85,12 @@
        return self.n_mels
    def forward(
            self, input: torch.Tensor, input_lengths: torch.Tensor
            self, input: torch.Tensor, input_lengths:  Union[torch.Tensor, list]
    ) -> Tuple[torch.Tensor, torch.Tensor]:
        if isinstance(input_lengths, list):
            input_lengths = torch.tensor(input_lengths)
        if  input.dtype == torch.float64:
            input = input.float()
        # 1. Domain-conversion: e.g. Stft: time -> time-freq
        if self.stft is not None:
            input_stft, feats_lens = self._compute_stft(input, input_lengths)