aryo100 commited on
Commit
29c7647
·
1 Parent(s): 033e0f5

update api

Browse files
Files changed (1) hide show
  1. api.py +2 -1
api.py CHANGED
@@ -137,12 +137,13 @@ async def tts_api(req: TTSRequest):
137
  )
138
 
139
  # Cek apakah result tuple atau string error
 
140
  if not (isinstance(result, tuple) and isinstance(result[1], tuple)):
141
  raise HTTPException(status_code=500, detail=f"RVC error: {result}")
142
  info, (tgt_sr, audio_opt) = result
143
  sf.write(output_wav, audio_opt, tgt_sr)
144
  except Exception as e:
145
- raise HTTPException(status_code=500, detail=f"RVC error: {e}")
146
 
147
  # Ambil domain dari environment Hugging Face
148
  space_id = os.environ.get("SPACE_ID")
 
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}")
143
  info, (tgt_sr, audio_opt) = result
144
  sf.write(output_wav, audio_opt, tgt_sr)
145
  except Exception as e:
146
+ raise HTTPException(status_code=500, detail=f"RVC exception error: {e}")
147
 
148
  # Ambil domain dari environment Hugging Face
149
  space_id = os.environ.get("SPACE_ID")