refine decoding process, merge flow and vocoder

This commit is contained in:
志浩 2024-07-10 16:45:49 +08:00
parent 4f2ca562e9
commit 158c22ca4c

View File

@ -2305,7 +2305,7 @@ class LLMASR5(nn.Module):
if wav is not None:
path = os.path.join(out_dir, f"{key}.wav")
torchaudio.save(
path, wav[0], sample_rate=self.vocoder.sample_rate,
path, wav.cpu(), sample_rate=self.vocoder.sample_rate,
encoding='PCM_S', bits_per_sample=16
)