Skip to content

Commit

Permalink
fixed feature_extractor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokang00010 committed Jan 31, 2024
1 parent 956ae58 commit 72dca99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@

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
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 72dca99

Please sign in to comment.