feat: Migrate voice capture to composable with floating push-to-talk
Extract voice recording logic from FloatingVoice.vue into useVoiceCapture composable. TranscriptCard now does real recording instead of mock typing. InputSettings allows voice mode toggle (WebSpeech/Whisper GPU), mic selection, and debug audio playback. ChatInput gets a settings gear button. Long-press on FloatBubble shows a floating TranscriptCard (push-to-talk) instead of opening the full PromptBar. Release stops recording after a 500ms buffer. Click still opens PromptBar normally. Parallel MediaRecorder captures raw audio in WebSpeech mode for DB save and debug playback. Transient errors (no-speech) no longer kill sessions. Touch selection prevention on FloatBubble for tablets.
This commit is contained in:
@@ -20,8 +20,10 @@ function handleStop() {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
props.voice.clearTranscript()
|
||||
props.voice.startRecording()
|
||||
if (!props.voice.isRecording.value) {
|
||||
props.voice.clearTranscript()
|
||||
props.voice.startRecording()
|
||||
}
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
|
||||
Reference in New Issue
Block a user