Merge pull request #45 from IamSVP94/patch-1

Added dimension to tensor to save audio
This commit is contained in:
Alexander Veysov
2021-03-16 16:42:08 +03:00
committed by GitHub

View File

@@ -41,7 +41,7 @@ def read_audio(path: str,
def save_audio(path: str,
tensor: torch.Tensor,
sr: int = 16000):
torchaudio.save(path, tensor, sr)
torchaudio.save(path, tensor.unsqueeze(0), sr)
def init_jit_model(model_path: str,