feat(speech): integrate Voice Pack model into speech catalog and update related tests

This commit is contained in:
RainbowBird
2026-07-01 20:18:13 +08:00
parent af7de96042
commit e1a2c51573
3 changed files with 104 additions and 18 deletions
@@ -131,7 +131,7 @@ export const providerOfficialSpeech = defineProvider({
if (!res.ok)
throw new Error(`audio models upstream ${res.status}: ${await res.text().catch(() => '')}`.slice(0, 256))
const data = await res.json() as { models?: { id: string, name: string }[], default?: string | null }
const data = await res.json() as { models?: { id: string, name: string, description?: string }[], default?: string | null }
if (!Array.isArray(data.models))
throw new Error('audio models upstream returned malformed body')
@@ -140,6 +140,7 @@ export const providerOfficialSpeech = defineProvider({
return data.models.map(m => ({
id: m.id,
name: m.name,
description: m.description,
provider: OFFICIAL_SPEECH_PROVIDER_ID,
}))
},