From ecfaa10377f24b10a5a300e9df5497f67a011590 Mon Sep 17 00:00:00 2001 From: Yihui Fu <39218534+felixfuyihui@users.noreply.github.com> Date: Thu, 5 May 2022 11:35:34 +0800 Subject: [PATCH] Update trans.py --- trans.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trans.py b/trans.py index ee12355..836612a 100644 --- a/trans.py +++ b/trans.py @@ -11,6 +11,7 @@ import soundfile as sf import librosa import sys +import os sys.path.append(os.path.dirname(sys.path[0]) + '/model') EPSILON = 1e-5 @@ -81,7 +82,7 @@ def init_kernel(frame_len: int, I = th.stack([th.eye(B), th.zeros(B, B)], dim=-1) # W x B x 2 K = th.fft.fft(I / S, 1) - K = th.stack([K.real, K.imag], -1) + K = th.cat([K.real, K.imag], -1) if mode == "kaldi": K = K[:frame_len] if inverse and not normalized: