From 42026d100b91fd9314bd6d1c4d60727eb9a49a35 Mon Sep 17 00:00:00 2001 From: Makito Date: Mon, 21 Jul 2025 15:43:56 +0900 Subject: [PATCH] feat(stage-ui): better tts input chunking (#306) * feat(stage-ui): better tts input chunking * chore: remove unused audio analyser * fix: words count * fix: use ctx.data instead --------- Co-authored-by: Neko --- cspell.config.yaml | 1 + packages/stage-ui/package.json | 1 + .../Scenarios/Providers/SpeechPlayground.vue | 8 + .../Providers/SpeechStreamingPlayground.vue | 163 ++++++++++++++++++ packages/stage-ui/src/composables/queues.ts | 16 +- packages/stage-ui/src/utils/tts.ts | 142 +++++++++++++++ pnpm-lock.yaml | 9 + 7 files changed, 327 insertions(+), 13 deletions(-) create mode 100644 packages/stage-ui/src/components/Scenarios/Providers/SpeechStreamingPlayground.vue create mode 100644 packages/stage-ui/src/utils/tts.ts diff --git a/cspell.config.yaml b/cspell.config.yaml index 89cf277c5..d837a4025 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -33,6 +33,7 @@ words: - cientos - cjkfonts - clippy + - clustr - collectblock - colorjs - Comfortaa diff --git a/packages/stage-ui/package.json b/packages/stage-ui/package.json index f59e5ab76..b77cdd9d0 100644 --- a/packages/stage-ui/package.json +++ b/packages/stage-ui/package.json @@ -139,6 +139,7 @@ "@types/three": "^0.178.1", "@unocss/reset": "^66.3.3", "@vitejs/plugin-vue": "^6.0.0", + "clustr": "^0.0.3", "histoire": "1.0.0-alpha.2", "unocss": "^66.3.3", "unplugin-yaml": "^3.0.1", diff --git a/packages/stage-ui/src/components/Scenarios/Providers/SpeechPlayground.vue b/packages/stage-ui/src/components/Scenarios/Providers/SpeechPlayground.vue index eaa8a40dc..3f982bcff 100644 --- a/packages/stage-ui/src/components/Scenarios/Providers/SpeechPlayground.vue +++ b/packages/stage-ui/src/components/Scenarios/Providers/SpeechPlayground.vue @@ -5,6 +5,8 @@ import { FieldCheckbox, FieldSelect } from '@proj-airi/ui' import { computed, onUnmounted, ref, watch } from 'vue' import { useI18n } from 'vue-i18n' +import SpeechStreamingPlayground from './SpeechStreamingPlayground.vue' + import { TestDummyMarker } from '../../Gadgets' const props = defineProps<{ @@ -204,6 +206,12 @@ defineExpose({ {{ errorMessage }}