feat(tts): switch free voices to EdgeTTS worker mapping

This commit is contained in:
2026-02-24 17:25:11 +08:00
parent 6805308737
commit 3a82f7b7f5
3 changed files with 42 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
// ============ 导入 ============
// ============ 导入 ============
import { event_types } from "../../../../../../script.js";
import { extension_settings, getContext } from "../../../../../extensions.js";
@@ -43,7 +43,9 @@ const TTS_DIRECTIVE_REGEX = /\[tts:([^\]]*)\]/gi;
const FREE_VOICE_KEYS = new Set([
'female_1', 'female_2', 'female_3', 'female_4', 'female_5', 'female_6', 'female_7',
'male_1', 'male_2', 'male_3', 'male_4'
'male_1', 'male_2', 'male_3', 'male_4',
'en_female_1', 'en_female_2', 'en_male_1',
'ja_female_1', 'ja_male_1',
]);
// ============ NovelDraw 兼容 ============
@@ -1472,3 +1474,4 @@ export function cleanupTts() {
cacheCounters.misses = 0;
delete window.xiaobaixTts;
}