mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-08 16:00:01 +08:00
Merge branch 'fast_inference_dev' into fast_inference_own
This commit is contained in:
commit
b8b273ad0c
@ -421,7 +421,8 @@ async def tts_post_endpoint(request: TTS_Request):
|
|||||||
@APP.get("/set_refer_audio")
|
@APP.get("/set_refer_audio")
|
||||||
async def set_refer_audio(refer_audio_path: str = None, tts_infer_yaml_path: str = "GPT_SoVITS/configs/tts_infer.yaml"):
|
async def set_refer_audio(refer_audio_path: str = None, tts_infer_yaml_path: str = "GPT_SoVITS/configs/tts_infer.yaml"):
|
||||||
try:
|
try:
|
||||||
tts_instance = get_tts_instance(tts_infer_yaml_path)
|
tts_config = TTS_Config(tts_infer_yaml_path)
|
||||||
|
tts_instance = get_tts_instance(tts_config)
|
||||||
tts_instance.set_ref_audio(refer_audio_path)
|
tts_instance.set_ref_audio(refer_audio_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return JSONResponse(status_code=400, content={"message": f"set refer audio failed", "Exception": str(e)})
|
return JSONResponse(status_code=400, content={"message": f"set refer audio failed", "Exception": str(e)})
|
||||||
@ -434,7 +435,8 @@ async def set_gpt_weights(weights_path: str = None, tts_infer_yaml_path: str = "
|
|||||||
if weights_path in ["", None]:
|
if weights_path in ["", None]:
|
||||||
return JSONResponse(status_code=400, content={"message": "gpt weight path is required"})
|
return JSONResponse(status_code=400, content={"message": "gpt weight path is required"})
|
||||||
|
|
||||||
tts_instance = get_tts_instance(tts_infer_yaml_path)
|
tts_config = TTS_Config(tts_infer_yaml_path)
|
||||||
|
tts_instance = get_tts_instance(tts_config)
|
||||||
tts_instance.init_t2s_weights(weights_path)
|
tts_instance.init_t2s_weights(weights_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return JSONResponse(status_code=400, content={"message": f"change gpt weight failed", "Exception": str(e)})
|
return JSONResponse(status_code=400, content={"message": f"change gpt weight failed", "Exception": str(e)})
|
||||||
@ -448,7 +450,8 @@ async def set_sovits_weights(weights_path: str = None, tts_infer_yaml_path: str
|
|||||||
if weights_path in ["", None]:
|
if weights_path in ["", None]:
|
||||||
return JSONResponse(status_code=400, content={"message": "sovits weight path is required"})
|
return JSONResponse(status_code=400, content={"message": "sovits weight path is required"})
|
||||||
|
|
||||||
tts_instance = get_tts_instance(tts_infer_yaml_path)
|
tts_config = TTS_Config(tts_infer_yaml_path)
|
||||||
|
tts_instance = get_tts_instance(tts_config)
|
||||||
tts_instance.init_vits_weights(weights_path)
|
tts_instance.init_vits_weights(weights_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return JSONResponse(status_code=400, content={"message": f"change sovits weight failed", "Exception": str(e)})
|
return JSONResponse(status_code=400, content={"message": f"change sovits weight failed", "Exception": str(e)})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user