[Bugfix] [AURA] Correct aura results when use qwen3-tts in custom voice mode (#4650)
Signed-off-by: R2-Y <ruiruyang2@gmail.com>
This commit is contained in:
1 parent
fb3abb38fb
commit
bb973cb10c
3 files changed
+9
-8
No files matched your search
@@ -95,7 +95,7 @@ def test_aura2tts_builds_qwen3_tts_prompt_information():
|
||||
|
||||
[tts_input] = aura2tts([_source_output("Hello.")], prompt=[prompt])
|
||||
|
||||
assert len(tts_input["prompt_token_ids"]) >= 32
|
||||
assert len(tts_input["prompt_token_ids"]) > 0
|
||||
assert tts_input["additional_information"]["text"] == ["Hello."]
|
||||
assert PRECOMPUTED_TEXT_IDS_KEY not in tts_input["additional_information"]
|
||||
assert tts_input["additional_information"]["task_type"] == ["Base"]
|
||||
@@ -166,6 +166,7 @@ def test_aura2tts_supports_custom_voice_mode():
|
||||
assert tts_input["additional_information"]["task_type"] == ["CustomVoice"]
|
||||
assert tts_input["additional_information"]["speaker"] == ["Vivian"]
|
||||
assert "ref_audio" not in tts_input["additional_information"]
|
||||
assert len(tts_input["prompt_token_ids"]) == 14
|
||||
|
||||
|
||||
def test_aura2tts_passes_token_ids_to_qwen3_tts_when_enabled():
|
||||
|
||||
@@ -67,8 +67,8 @@ stages:
|
||||
devices: "0"
|
||||
output_connectors:
|
||||
to_stage_3: connector_of_shared_memory
|
||||
# model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||||
model: Qwen/Qwen3-TTS-12Hz-1.7B-Base
|
||||
model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||||
# model: Qwen/Qwen3-TTS-12Hz-1.7B-Base
|
||||
default_sampling_params:
|
||||
temperature: 0.9
|
||||
top_k: 50
|
||||
@@ -93,8 +93,8 @@ stages:
|
||||
devices: "0"
|
||||
input_connectors:
|
||||
from_stage_2: connector_of_shared_memory
|
||||
# model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||||
model: Qwen/Qwen3-TTS-12Hz-1.7B-Base
|
||||
model: Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
|
||||
# model: Qwen/Qwen3-TTS-12Hz-1.7B-Base
|
||||
default_sampling_params:
|
||||
temperature: 0.0
|
||||
top_p: 1.0
|
||||
|
||||
@@ -287,7 +287,7 @@ def _estimate_tts_prompt_len_from_token_ids(
|
||||
prompt_len = base_len + max(0, assistant_len - 6)
|
||||
else:
|
||||
prompt_len = base_len + 1
|
||||
return max(32, min(4096, int(prompt_len)))
|
||||
return int(prompt_len)
|
||||
|
||||
if task_type == "Base":
|
||||
in_context_mode = not bool(x_vector_only_mode)
|
||||
@@ -306,10 +306,10 @@ def _estimate_tts_prompt_len_from_token_ids(
|
||||
prompt_len = base_len + max(0, assistant_len - 6)
|
||||
else:
|
||||
prompt_len = base_len + 1
|
||||
return max(32, min(4096, int(prompt_len)))
|
||||
return int(prompt_len)
|
||||
|
||||
# Defensive fallback for unknown task types.
|
||||
return max(32, min(4096, int(base_len + max(assistant_len, 1))))
|
||||
return int(base_len + max(assistant_len, 1))
|
||||
|
||||
|
||||
def aura2tts(
|
||||
|
||||
Reference in new issue
Block a user