Skip to content

feat: Add Speech-to-Text voice input for message composer #243

@Makisuo

Description

@Makisuo

Summary

Allow users to dictate messages using voice input, with speech automatically transcribed to text in the message composer.

Feature Description

Users should be able to:

  • Click a microphone button in the message composer to start voice recording
  • Speak their message and have it transcribed to text in real-time
  • See visual feedback while recording (e.g., pulsing indicator, recording state)
  • Cancel or confirm the transcription before sending

UI Location

  • Add a microphone button in the message composer actions (alongside attach and emoji buttons)
  • Show recording state indicator when active
  • Display transcription in the Slate editor as it's processed

Suggested Implementation

  1. Create a useSpeechRecognition hook using the Web Speech API (SpeechRecognition)
  2. Add microphone button to message-composer-actions.tsx
  3. Handle browser compatibility (Web Speech API is primarily Chrome/Edge/Safari)
  4. Provide fallback or error message for unsupported browsers
  5. Request microphone permissions and handle denial gracefully

Technical Considerations

  • Web Speech API (browser-native) vs external API (e.g., OpenAI Whisper)
  • Push-to-talk vs toggle recording UX
  • Accessibility: ensure voice input doesn't exclude keyboard-only users

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions