f5tts/wwwroot/api/addvoice/index.dspy
2024-12-25 16:04:39 +08:00

12 lines
334 B
Plaintext

debug(f'{params_kw=}')
try:
speaker = params_kw.speaker
ref_audio = params_kw.ref_voice
ref_text = params_kw.ref_text
await add_voice(speaker, ref_audio, ref_text)
return UiMessage(title='Success', message='add voice success')
except Exception as e:
exception(f'{e=}')
return UiError(title='Error', message='add voice error')