From 72dca99288a5790b7253996e5e7eb62d8ce5f6af Mon Sep 17 00:00:00 2001 From: YongKang Zhou Date: Wed, 31 Jan 2024 08:56:56 +0000 Subject: [PATCH] fixed `feature_extractor` issue --- api.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 9d5edb0..b8d584e 100644 --- a/api.py +++ b/api.py @@ -104,8 +104,13 @@ RESP: 无 import argparse import os -import signal import sys + +now_dir = os.getcwd() +sys.path.append(now_dir) +sys.path.append("%s/GPT_SoVITS" % (now_dir)) + +import signal from time import time as ttime import torch import librosa @@ -440,6 +445,7 @@ def handle(refer_wav_path, prompt_text, prompt_language, text, text_language): torch.cuda.empty_cache() if device == "mps": + print('executed torch.mps.empty_cache()') torch.mps.empty_cache() return StreamingResponse(wav, media_type="audio/wav")