Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Simple STTNew to Visual Studio Code? Get it now.
Simple STT

Simple STT

xvaldetaro

| (0) | Free
Simple speech-to-text extension for VS Code using AssemblyAI
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Simple STT

A simple speech-to-text extension for VS Code that uses AssemblyAI's real-time streaming API to transcribe your speech directly into the editor.

Features

  • Real-time transcription: Speak and see your words appear in the editor as you talk
  • Live updates: Partial transcripts are shown in real-time and replaced with properly formatted, punctuated versions when complete
  • Smart punctuation: Automatically adds missing periods between sentences when AssemblyAI doesn't provide them
  • Auto-stop functionality:
    • Stops after configurable seconds of voice inactivity (default: 20 seconds)
    • Stops on keyboard input (manual typing)
    • Stops when you switch tabs or windows
    • Stops when you lose window focus
  • Status bar indicator: Visual feedback showing when recording is active
  • Keyboard shortcut: Quick toggle with Cmd+Shift+V (Mac) or Ctrl+Shift+V (Windows/Linux)

Requirements

  1. AssemblyAI API Key: Get a free API key at https://www.assemblyai.com/
  2. sox (macOS only): Install with brew install sox
  3. Internet connection: Required for streaming to AssemblyAI

Setup

1. Install the extension

Install from the VS Code marketplace or package it locally:

npm install
npm run package
code --install-extension simple-stt-0.0.1.vsix

2. Configure your API key

You have two options:

Option A: Environment Variable (Recommended)

Set the ASSEMBLYAI_API_KEY environment variable before launching VS Code:

export ASSEMBLYAI_API_KEY="your-api-key-here"
code

To make it permanent, add it to your shell profile (~/.bashrc, ~/.zshrc, etc.):

echo 'export ASSEMBLYAI_API_KEY="your-api-key-here"' >> ~/.zshrc

Option B: VS Code Settings

  1. Open VS Code settings (Cmd+, on Mac, Ctrl+, on Windows/Linux)
  2. Search for "Simple STT"
  3. Enter your API key in the "Assembly Ai Api Key" field

Note: The VS Code setting takes precedence over the environment variable.

3. Configure inactivity timeout (Optional)

By default, recording stops after 20 seconds of silence. You can change this:

  1. Open VS Code settings
  2. Search for "Simple STT: Inactivity Timeout"
  3. Set your preferred timeout in seconds

Usage

  1. Open a file in VS Code
  2. Press Cmd+Shift+V (Mac) or Ctrl+Shift+V (Windows/Linux) to start recording
  3. Speak into your microphone
  4. Your speech will be transcribed in real-time at the cursor position
  5. Press the hotkey again to stop, or recording will stop automatically when you:
    • Stop speaking for the configured timeout period
    • Start typing manually
    • Switch to another tab or window
    • Lose window focus

Alternatively, use the command palette (Cmd+Shift+P or Ctrl+Shift+P) and search for "Simple STT: Start/Stop Recording".

How It Works

Real-time Transcription

The extension uses AssemblyAI's v3 Streaming API with turn detection:

  1. Audio is captured from your microphone using the mic package and sox
  2. Audio is streamed to AssemblyAI via WebSocket connection
  3. Partial transcripts are shown in real-time as you speak
  4. When you finish a sentence (turn), the partial text is replaced with a properly formatted and punctuated version

Smart Punctuation

AssemblyAI sometimes doesn't add punctuation at the end of a turn. This extension automatically detects this and adds a period when:

  • A new turn starts with an uppercase letter
  • The previous turn didn't end with punctuation (., !, or ?)

This ensures your transcribed text flows naturally without manual editing.

Auto-stop Triggers

Recording automatically stops when:

  • Voice inactivity: No speech detected for the configured timeout (default: 20 seconds)
  • Keyboard input: You start typing manually (the extension distinguishes between your typing and its own text insertion)
  • Tab/window switch: You switch to another file or application
  • Focus loss: VS Code loses focus

Troubleshooting

"Microphone Error" or "Failed to start microphone"

On macOS, make sure sox is installed:

brew install sox

"AssemblyAI API key not configured"

Make sure you've set up your API key either as an environment variable or in VS Code settings (see Setup section above).

Recording doesn't stop automatically on inactivity

Check that your inactivity timeout is set appropriately in the settings. The default is 20 seconds.

Text not appearing

  1. Make sure you have an active editor open
  2. Check the VS Code developer console (Help → Toggle Developer Tools) for error messages
  3. Verify your API key is correct
  4. Check your internet connection

Privacy

Your audio is streamed to AssemblyAI's servers for transcription. Please review AssemblyAI's privacy policy at https://www.assemblyai.com/legal/privacy-policy.

License

MIT

Contributing

Found a bug or have a feature request? Please open an issue on the GitHub repository.

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