Skip to content

🎙️ speech-to-text integration for prompt-input component #102

@thatbeautifuldream

Description

@thatbeautifuldream

Note

implementation : thatbeautifuldream@dfbd133

Screen.Recording.2025-09-21.at.8.16.10.AM.mov

related post : https://x.com/milindmishra_/status/1969594572843204860

I've implemented a native, zero-dependency speech-to-text solution for the PromptInput component using the browser's built-in Web Speech API. This provides a simple and lightweight way to enable voice input without requiring external dependencies or API keys.

What I've Done ?

Added a new PromptInputSpeechButton component that:

  • Uses the native SpeechRecognition API (with webkitSpeechRecognition fallback)
  • Provides continuous speech recognition with interim results
  • Automatically appends transcribed text to the existing textarea content
  • Includes visual feedback with pulse animation during recording
  • Handles errors gracefully and cleans up resources properly
  • Works seamlessly with the existing PromptInput architecture

Need feedback over this to raise a PR related to the feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions