feat: add qwen tts voice preferences

This commit is contained in:
2026-07-23 22:37:12 +08:00
parent 39ff6f6ceb
commit 4902830e6d
7 changed files with 273 additions and 11 deletions
@@ -39,10 +39,10 @@ test('全局选择只覆盖 voice,保留场景角色、情绪、语速和方
const profile = { role: 'customer', emotion: 'intense', speed: 1.12, dialect: 'sichuanese' };
assert.deepEqual(
runtime.applyTtsVoicePreference(profile, 'longanhuan_v3.6'),
JSON.parse(JSON.stringify(runtime.applyTtsVoicePreference(profile, 'longanhuan_v3.6'))),
{ ...profile, voice: 'longanhuan_v3.6' }
);
assert.deepEqual(runtime.applyTtsVoicePreference(profile, ''), profile);
assert.deepEqual(JSON.parse(JSON.stringify(runtime.applyTtsVoicePreference(profile, ''))), profile);
});
test('语音播放链路在合成前统一注入全局音色,且缓存键包含处理后的 profile', async () => {