[Qwen3TTS][ServingSpeech] Bugfix/voice upload and add optional ref_text (#2046)
Signed-off-by: JuanPZuluaga <juanz9312@gmail.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
1 parent
3a5483d339
commit
574ec99ef4
7 files changed
+139
-43
No files matched your search
@@ -1046,6 +1046,7 @@ async def upload_voice(
|
||||
speaker_embedding: str | None = Form(None),
|
||||
consent: str = Form(...),
|
||||
name: str = Form(...),
|
||||
ref_text: str = Form(None),
|
||||
):
|
||||
"""Upload a new voice for voice cloning.
|
||||
|
||||
@@ -1081,7 +1082,7 @@ async def upload_voice(
|
||||
if speaker_embedding is not None:
|
||||
result = await handler.upload_voice_embedding(speaker_embedding, consent, name)
|
||||
elif audio_sample is not None:
|
||||
result = await handler.upload_voice(audio_sample, consent, name)
|
||||
result = await handler.upload_voice(audio_sample, consent, name, ref_text=ref_text)
|
||||
else:
|
||||
return base(raw_request).create_error_response(
|
||||
message="Either 'audio_sample' or 'speaker_embedding' must be provided"
|
||||
|
||||
Reference in new issue
Block a user