From 66cd20ae8cd71c6d760f889fe3a3b6c983e06a79 Mon Sep 17 00:00:00 2001 From: snakers41 Date: Mon, 14 Dec 2020 14:49:04 +0000 Subject: [PATCH] Fx --- utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils.py b/utils.py index 60da2dd..5c9dd25 100644 --- a/utils.py +++ b/utils.py @@ -30,6 +30,12 @@ def read_audio(path: str, return wav.squeeze(0) +def save_audio(path: str, + tensor: torch.Tensor, + sr: int): + torchaudio.save(path, tensor, sr) + + def init_jit_model(model_path: str, device=torch.device('cpu')): torch.set_grad_enabled(False)