Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Speech To CursorNew to Visual Studio Code? Get it now.
Speech To Cursor

Speech To Cursor

Kadir Yapar

|
4 installs
| (0) | Free
A powerful VS Code extension that enables voice-to-text functionality and seamlessly integrates with Cursor AI chat. Record your voice, convert it to text, and send it directly to Cursor's AI chat interface with multiple recognition engines and output options.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Speech to Cursor

A powerful VS Code extension that enables voice-to-text functionality and seamlessly integrates with Cursor AI chat. Record your voice, convert it to text, and send it directly to Cursor's AI chat interface with multiple recognition engines and output options.

Features

🎤 Multiple Speech Recognition Engines

  • Webview Engine: Uses VS Code's webview panel with Web Speech API for seamless integration
  • Browser Fallback: Opens a browser window for speech recognition when webview isn't available
  • macOS Dictation: Leverages native macOS dictation (Control key double-press) for optimal performance
  • Auto Mode: Intelligently chooses the best available engine based on your system and preferences
  • API Engine: Placeholder for future API-based recognition services

📝 Flexible Output Options

  • Chat Mode: Send recognized text directly to Cursor AI chat (default)
  • Editor Mode: Insert text into the active text editor
  • Clipboard Mode: Copy text to clipboard for manual pasting

⚙️ Comprehensive Configuration

  • Language Selection: Support for multiple languages (default: en-US)
  • Recognition Settings: Toggle interim results and continuous recognition
  • Engine Preferences: Fine-tune behavior for each recognition engine
  • Browser Integration: Configure auto-start and fallback behavior

Installation

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Press F5 in VS Code to launch the extension in development mode
  4. Or package the extension using vsce package for distribution

Usage

Quick Start

  1. Open the Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux)
  2. Type "Speech to Cursor" to see available commands
  3. Select "Start Recording" to begin voice recognition
  4. Speak clearly into your microphone
  5. The recognized text will be sent to Cursor AI chat automatically

Available Commands

  • Start Recording: Begin voice recognition
  • Stop Recording: Stop voice recognition
  • Toggle Recording: Start/stop recording with a single command
  • Open Speech Panel: Open the webview speech recognition panel
  • Open Browser Fallback: Open browser-based speech recognition
  • Open Control Panel: Access the main control interface

Status Bar Integration

The extension adds a status bar item showing the current recording state:

  • $(mic) Speech - Ready to record
  • $(record) Listening… - Currently recording

Configuration

Extension Settings

This extension contributes the following settings:

  • speechToCursor.engine: Choose the speech engine

    • auto (default): Try webview then fallback to browser
    • webview: VS Code panel
    • browser: Chrome/Edge/Safari
    • os-dictation: macOS native dictation
    • api: Future API-based recognition
  • speechToCursor.useBrowserFallback: Always use browser fallback (default: false)

  • speechToCursor.useMacDictation: Use macOS Dictation instead of Web Speech (macOS only, default: true)

  • speechToCursor.language: Recognition language tag (e.g., en-US, tr-TR, default: en-US)

  • speechToCursor.interimResults: Emit interim results for browser/webview engines (default: false)

  • speechToCursor.continuous: Continuous recognition until stopped (default: true)

  • speechToCursor.browserAutoStart: Auto-start recognition when browser page opens (default: true)

  • speechToCursor.outputMode: Where to send recognized text

    • chat (default): Cursor AI chat
    • editor: Active text editor
    • clipboard: System clipboard

Requirements

  • VS Code: Version 1.75.0 or higher
  • Microphone: Working microphone with proper permissions
  • Browser: For browser fallback mode (Chrome, Edge, or Safari recommended)
  • macOS: For native dictation support (macOS only)

Known Issues

  • Browser fallback requires user interaction on first use due to browser security policies
  • Some browsers may require HTTPS for microphone access in production environments
  • macOS dictation requires system-level permissions to be enabled

Troubleshooting

Microphone Not Working

  1. Check microphone permissions in your browser/system
  2. Try the browser fallback mode if webview isn't working
  3. On macOS, ensure dictation is enabled in System Preferences

Text Not Sending to Cursor

  1. Verify Cursor is running and the chat panel is open
  2. Check the output mode setting (should be "chat" for Cursor integration)
  3. Try clipboard mode as a fallback

Recognition Quality Issues

  1. Ensure you're in a quiet environment
  2. Speak clearly and at a normal pace
  3. Try adjusting the language setting to match your speech
  4. Consider using macOS dictation for better accuracy on Mac

Development

Project Structure

speech-to-cursor/
├── extension.js          # Main extension logic
├── package.json          # Extension manifest
├── media/
│   ├── recognizer.js    # Webview speech recognition
│   └── recognizer.css   # Webview styling
└── test/
    └── extension.test.js # Test files

Building and Testing

npm install          # Install dependencies
npm run lint         # Run ESLint
npm test            # Run tests

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Release Notes

0.0.1

  • Initial release with multiple speech recognition engines
  • Webview, browser fallback, and macOS dictation support
  • Integration with Cursor AI chat
  • Comprehensive configuration options
  • Status bar integration

License

This extension is provided as-is for educational and development purposes.

Support

For issues, feature requests, or contributions, please open an issue on the project repository.


Enjoy voice-powered coding with Cursor! 🎤✨

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft