mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
chore: updated
This commit is contained in:
Vendored
+6
-1
@@ -57,5 +57,10 @@
|
||||
"appimage",
|
||||
"localforage"
|
||||
],
|
||||
"vitest.disableWorkspaceWarning": true
|
||||
"vitest.disableWorkspaceWarning": true,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "off",
|
||||
"strings": "off",
|
||||
"other": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,11 +328,10 @@ const { activeTranscriptionModel, activeTranscriptionProvider } = storeToRefs(he
|
||||
const hearingPipeline = useHearingSpeechInputPipeline()
|
||||
const { removeStreamingTranscriptionConsumer, transcribeForMediaStream, stopStreamingTranscription } = hearingPipeline
|
||||
const { error: transcriptionError, supportsStreamInput } = storeToRefs(hearingPipeline)
|
||||
const transcriptionConsumerId = 'stage-tamagotchi:voice-input'
|
||||
const chatStore = useChatStore()
|
||||
const chatSession = useChatSessionStore()
|
||||
const streamingTranscriptionUnavailable = ref(false)
|
||||
/** Identifies this page in the shared streaming transcription session. */
|
||||
const transcriptionConsumerId = 'stage-tamagotchi:voice-input'
|
||||
const shouldUseStreamInput = computed(() => supportsStreamInput.value && !!stream.value && !streamingTranscriptionUnavailable.value)
|
||||
const voiceTranscriptBuffer = createTranscriptBuffer({
|
||||
flushDelayMs: 1200,
|
||||
@@ -575,7 +574,7 @@ function handleStreamingSentenceEnd(delta: string) {
|
||||
void sendVoiceInputTextToChat(finalText)
|
||||
}
|
||||
|
||||
/** Replaces the speaker caption with the provider's current volatile transcript. */
|
||||
/** Replaces the caption with the provider's current volatile transcript. */
|
||||
function handleStreamingTranscriptionUpdate(text: string) {
|
||||
if (isVoiceInputSuppressed())
|
||||
return
|
||||
@@ -648,14 +647,12 @@ async function startAudioInteractionConsumers() {
|
||||
})
|
||||
|
||||
if (inspectVoiceInputStreamingRequestGate().skip) {
|
||||
removeStreamingTranscriptionConsumer(transcriptionConsumerId)
|
||||
await stopStreamingTranscription(true)
|
||||
return
|
||||
}
|
||||
|
||||
if (transcriptionError.value) {
|
||||
streamingTranscriptionUnavailable.value = true
|
||||
removeStreamingTranscriptionConsumer(transcriptionConsumerId)
|
||||
await stopStreamingTranscription(true)
|
||||
console.warn('[Main Page] Streaming transcription unavailable; using recorder-backed fallback:', transcriptionError.value)
|
||||
}
|
||||
@@ -674,7 +671,6 @@ async function stopAudioInteractionConsumers(options: StopAudioInteractionOption
|
||||
clearAssistantSpeechResumeTimer()
|
||||
clearHearingInput()
|
||||
voiceInputGeneration += 1
|
||||
removeStreamingTranscriptionConsumer(transcriptionConsumerId)
|
||||
|
||||
await Promise.all([
|
||||
stopStreamingTranscription(true),
|
||||
@@ -742,6 +738,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
removeStreamingTranscriptionConsumer(transcriptionConsumerId)
|
||||
for (const [timer, sourceId] of hearingInputClearTimers) {
|
||||
clearTimeout(timer)
|
||||
clearHearingInput(sourceId)
|
||||
|
||||
Reference in New Issue
Block a user