Spaces:
Sleeping
Sleeping
update api
Browse files
api.py
CHANGED
|
@@ -129,7 +129,8 @@ async def tts_api(req: TTSRequest):
|
|
| 129 |
embedding_output_layer="auto", # auto detect layer
|
| 130 |
f0_up_key=req.f0_up_key, # pitch shift
|
| 131 |
f0_file="", # f0 curve file (kosong)
|
| 132 |
-
f0_method="
|
|
|
|
| 133 |
auto_load_index=True, # auto load index
|
| 134 |
faiss_index_file=index_path, # index file path
|
| 135 |
index_rate=index_rate, # index rate
|
|
@@ -137,6 +138,7 @@ async def tts_api(req: TTSRequest):
|
|
| 137 |
)
|
| 138 |
|
| 139 |
# Cek apakah result tuple atau string error
|
|
|
|
| 140 |
print("result : ", result)
|
| 141 |
if not (isinstance(result, tuple) and isinstance(result[1], tuple)):
|
| 142 |
raise HTTPException(status_code=500, detail=f"RVC error: {result}")
|
|
|
|
| 129 |
embedding_output_layer="auto", # auto detect layer
|
| 130 |
f0_up_key=req.f0_up_key, # pitch shift
|
| 131 |
f0_file="", # f0 curve file (kosong)
|
| 132 |
+
f0_method="pm", # f0 method
|
| 133 |
+
# f0_method="harvest", # f0 method
|
| 134 |
auto_load_index=True, # auto load index
|
| 135 |
faiss_index_file=index_path, # index file path
|
| 136 |
index_rate=index_rate, # index rate
|
|
|
|
| 138 |
)
|
| 139 |
|
| 140 |
# Cek apakah result tuple atau string error
|
| 141 |
+
print("input_audio : ", tts_wav)
|
| 142 |
print("result : ", result)
|
| 143 |
if not (isinstance(result, tuple) and isinstance(result[1], tuple)):
|
| 144 |
raise HTTPException(status_code=500, detail=f"RVC error: {result}")
|