feat(tts): switch broadcast generation to s2.1-pro-free

Update the generator and temp broadcast flows to send the new Fish Audio model and reference IDs so Chinese and secondary-language audio use the latest requested voice configuration.
This commit is contained in:
2026-08-01 08:50:13 +08:00
parent 529c871b0e
commit a2408da417
3 changed files with 31 additions and 13 deletions
+8 -5
View File
@@ -719,8 +719,9 @@
<div class="toast-container" id="toast-container"></div>
<script>
const ZH_MODEL = "7b64d954530d490a8c40827e618e55c6";
const EN_MODEL = "fe09163b345448eabfeccb25dc435c43";
const TTS_MODEL = "s2.1-pro-free";
const ZH_REFERENCE_ID = "0aee9f0f5683480d987c9e3c5d2de04c";
const EN_REFERENCE_ID = "38985e545cff41b79c11c32b0196c9a0";
let zhTempFile = null;
let enTempFile = null;
@@ -821,7 +822,7 @@
const res = await fetch('/api/tts/generate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text, reference_id })
body: JSON.stringify({ text, reference_id, model: TTS_MODEL })
});
const data = await res.json();
if (!data.success) throw new Error(data.message);
@@ -1110,7 +1111,8 @@
},
body: JSON.stringify({
text: zhText,
reference_id: ZH_MODEL
reference_id: ZH_REFERENCE_ID,
model: TTS_MODEL
})
});
@@ -1127,7 +1129,8 @@
},
body: JSON.stringify({
text: enText,
reference_id: EN_MODEL
reference_id: EN_REFERENCE_ID,
model: TTS_MODEL
})
});
+8 -2
View File
@@ -235,7 +235,8 @@
</div>
<script>
const ZH_MODEL = "7b64d954530d490a8c40827e618e55c6";
const TTS_MODEL = "s2.1-pro-free";
const ZH_REFERENCE_ID = "0aee9f0f5683480d987c9e3c5d2de04c";
let state = {
broadcastId: null,
broadcastUrl: null
@@ -335,7 +336,12 @@
const resp = await fetch("/api/temp-broadcast/compose", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text, reference_id: ZH_MODEL, prefixName: "lsts" })
body: JSON.stringify({
text,
reference_id: ZH_REFERENCE_ID,
model: TTS_MODEL,
prefixName: "lsts"
})
});
const data = await resp.json();
if (!data || !data.success) throw new Error(data?.message || "合成失败");