Update api.py

main
YongKang Zhou 2 years ago committed by GitHub
parent 53817b983c
commit 956ae58677
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -439,6 +439,7 @@ def handle(refer_wav_path, prompt_text, prompt_language, text, text_language):
wav.seek(0) wav.seek(0)
torch.cuda.empty_cache() torch.cuda.empty_cache()
if device == "mps":
torch.mps.empty_cache() torch.mps.empty_cache()
return StreamingResponse(wav, media_type="audio/wav") return StreamingResponse(wav, media_type="audio/wav")

Loading…
Cancel
Save