Skip to content

Commit e02e8c6

Browse files
fix: cosyvoice SSML support (#576)
1 parent e00ac26 commit e02e8c6

File tree

1 file changed

+5
-1
lines changed
  • packages/stage-ui/src/stores/modules

1 file changed

+5
-1
lines changed

packages/stage-ui/src/stores/modules/speech.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ export const useSpeechStore = defineStore('speech', () => {
6565

6666
const supportsSSML = computed(() => {
6767
// Currently only ElevenLabs and some other providers support SSML
68-
return ['elevenlabs', 'microsoft-speech', 'azure-speech', 'google', 'alibaba-cloud-model-studio', 'volcengine'].includes(activeSpeechProvider.value)
68+
// only part voices are support SSML in cosyvoice-v2 which is provided by alibaba
69+
if (activeSpeechProvider.value === 'alibaba-cloud-model-studio' && activeSpeechModel.value === 'cosyvoice-v2') {
70+
return true
71+
}
72+
return ['elevenlabs', 'microsoft-speech', 'azure-speech', 'google', 'volcengine'].includes(activeSpeechProvider.value)
6973
})
7074

7175
async function loadVoicesForProvider(provider: string) {

0 commit comments

Comments
 (0)