fix(stage-web,stage-tamagotchi): Microsoft Speech not loading voices correctly

Co-authored-by: SuJiurong <92735869+sujiurong@users.noreply.github.com>
This commit is contained in:
Neko Ayaka
2025-07-18 02:05:33 +08:00
co-authored by SuJiurong
parent e9a82388b6
commit e956af00a8
5 changed files with 12 additions and 3 deletions
@@ -52,6 +52,10 @@ const availableVoices = computed(() => {
})
onMounted(async () => {
if (!region.value) {
region.value = 'eastasia' // Default region
}
await speechStore.loadVoicesForProvider(providerId)
})
@@ -34,7 +34,7 @@ const volume = ref(0)
// Additional settings specific to Microsoft Speech (region)
const region = computed({
get: () => providers.value[providerId]?.region as string | undefined || 'eastasia',
get: () => providers.value[providerId]?.region as string | undefined,
set: (value) => {
if (!providers.value[providerId])
providers.value[providerId] = { region: 'eastasia' }
@@ -52,6 +52,10 @@ const availableVoices = computed(() => {
})
onMounted(async () => {
if (!region.value) {
region.value = 'eastasia' // Default region
}
await speechStore.loadVoicesForProvider(providerId)
})
+1
View File
@@ -76,6 +76,7 @@ words:
- DuckDBWASM
- DuckDBWASMQ
- DuckDBWASMQuery
- eastasia
- elevenlabs
- esaxx
- Factorio
@@ -13,7 +13,7 @@ const props = withDefaults(defineProps<{
singleLine: true,
})
const modelValue = defineModel<string>({ required: true })
const modelValue = defineModel<string>({ required: false })
</script>
<template>
@@ -3,7 +3,7 @@ const props = defineProps<{
type?: string
}>()
const modelValue = defineModel<string>({ required: true })
const modelValue = defineModel<string>({ required: false })
</script>
<template>