Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(chat): add voice input to message composer with dual-mode recognition - #732

Open
louwetmarc657-cmd wants to merge 5 commits into
xintaofei:mainfrom
louwetmarc657-cmd:feat/voice-input
Open

feat(chat): add voice input to message composer with dual-mode recognition#732
louwetmarc657-cmd wants to merge 5 commits into
xintaofei:mainfrom
louwetmarc657-cmd:feat/voice-input

Conversation

@louwetmarc657-cmd

Copy link
Copy Markdown

Summary

Adds a native voice input button (ComposerVoiceButton) to the chat message composer, enabling streaming speech-to-text input directly into the editor.

Key Features

  • Dual-Mode Recognition:
    • Primary: Standard Web Speech API (webkitSpeechRecognition / SpeechRecognition) for instant, zero-latency streaming transcription.
    • Fallback / API: Supports media recording with OpenAI-compatible Whisper ASR endpoint when Web Speech is unavailable.
  • User Experience:
    • Subtle waveform pulse feedback when recording is active.
    • Floating interim transcription preview bubble with keyboard escape (Esc) cancellation.
    • Seamless text insertion synchronized with Tiptap editor cursor and state.
  • Internationalization:
    • Added localization keys in en.json and zh-CN.json.
  • Tests:
    • Includes unit tests covering speech recognition lifecycles, permissions, state transitions, and UI interactions (composer-voice-button.test.tsx, use-voice-input.test.ts).

由社区用户贡献,遵循项目代码风格与规范。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant