Revert "func -> call"

This reverts commit 043fa4d750.
This commit is contained in:
Ftps
2024-06-02 02:34:38 +09:00
parent 790b504ba2
commit e02e00753d
6 changed files with 18 additions and 50 deletions
+1 -5
View File
@@ -11,7 +11,6 @@ from base64 import b64encode
from rvc.modules.vc.modules import VC
import glob
import os
import torch
router = APIRouter()
from dotenv import load_dotenv
@@ -44,6 +43,7 @@ def inference(
rms_mix_rate: float = 0.25,
protect: float = 0.33,
):
print(res_type)
vc = VC()
vc.get_vc(modelpath)
tgt_sr, audio_opt, times, _ = vc.vc_inference(
@@ -61,10 +61,6 @@ def inference(
)
wavfile.write(wv := BytesIO(), tgt_sr, audio_opt)
print(times)
if torch.cuda.is_available():
torch.cuda.empty_cache()
if res_type == "blob":
return responses.StreamingResponse(
wv,