fix(tts): make stepfun preset pick case-stable and per-character

- Hash the lowercased description (matching the case-insensitive scoring)
  so the same archetype text picks the same preset regardless of case.
- Thread the character name through provisionVoice -> stepfunProvision as
  the hash salt, so two characters that share archetype keywords spread
  across the top-N candidate presets instead of collapsing on one voice.

Xiaomi path is unaffected (voicedesign mints a unique clip per call).
This commit is contained in:
DESKTOP-I1T6TF3\Q
2026-06-09 09:14:44 +08:00
parent 19bbee16fe
commit 04f22249c9
4 changed files with 16 additions and 6 deletions
+1 -1
View File
@@ -525,7 +525,7 @@ async function resolveByoVoice(
return ready;
}
if (!speaker.voiceDescription) return null;
const p = provisionVoice(cfg, speaker.voiceDescription);
const p = provisionVoice(cfg, speaker.voiceDescription, speaker.name);
cache.set(speaker.name, p);
try {
return await p;