Skip to content

Commit 894b715

Browse files
committed
Fix saving when using CUDA
1 parent d16088d commit 894b715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xtts_api_server/tts_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ async def stream_generation(self,text,speaker_name,speaker_wav,language,output_f
382382

383383
if len(file_chunks) > 0:
384384
wav = torch.cat(file_chunks, dim=0)
385-
torchaudio.save(output_file, wav.squeeze().unsqueeze(0), 24000)
385+
torchaudio.save(output_file, wav.cpu().squeeze().unsqueeze(0), 24000)
386386
else:
387387
logger.warning("No audio generated.")
388388

0 commit comments

Comments
 (0)