Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Audio AlertsNew to Visual Studio Code? Get it now.
Audio Alerts

Audio Alerts

Pavitar Singh

|
3 installs
| (0) | Free
Configurable sound triggers for VS Code events
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Audio-alerts

Configurable sound triggers for VS Code development events.

Features

  • Built-in event sounds:
    • Syntax Error
    • Build Failed
    • Runtime Error
    • Test Failed
    • Line Too Long
    • Line Increased
  • Terminal failure classification (syntax/test/build/runtime) based on command + output patterns.
  • Per-event enable/disable.
  • Global controls:
    • Master switch
    • Global volume
    • Global cooldown
  • Assign sounds from:
    • Local audio files (.mp3, .wav, .ogg, .m4a)
    • Myinstants search + fetch (downloaded to local extension storage automatically)
  • Preview assigned sounds.
  • Import/export JSON config.
  • Custom events:
    • Create
    • Rename
    • Toggle
    • Upload/Preview/Clear
    • Delete

Requirements

  • VS Code ^1.88.0
  • Node.js + npm

Setup

  1. Install dependencies:
    npm install
    
  2. Build extension:
    npm run build
    
  3. Open this folder in VS Code.
  4. Press F5 to launch Extension Development Host.

Open The Panel

  • Run command: Open Sound Manager
  • Command ID: soundExtension.openPanel

How To Use

1. Assign Sound For Built-in Events

For each built-in event card:

  • Upload: choose local audio file.
  • Fetch: search Myinstants by term, pick a result, and it is downloaded + assigned.
  • Preview: play assigned sound.
  • Clear: remove assigned sound.

2. Custom Events

In the Custom Events section:

  1. Enter event name.
  2. Click Create Event.
  3. Upload a sound and preview it.
  4. Rename/toggle/delete as needed.

Custom events are connected to real triggers. You can choose one trigger per custom event from:

  • Syntax Error
  • Build Failed
  • Runtime Error
  • Test Failed
  • Line Too Long
  • Line Increased

Custom Event Example

Example: create a custom event called Deploy Success.

  1. In Custom Events, enter Deploy Success.
  2. Select trigger (for example Build Failed).
  3. Click Create Event.
  4. Click Upload and choose a file like deploy-success.mp3.
  5. Click Preview to verify audio.
  6. Keep toggle enabled.
  7. Click Save Changes.

Exported config will include an item like:

{
  "customEvents": [
    {
      "id": "custom-1700000000000-ab12cd",
      "name": "Deploy Success",
      "trigger": "buildFailed",
      "enabled": true,
      "sound": "/home/you/.config/Code/User/globalStorage/local.sound-extension/downloaded-sounds/deploy-success.mp3"
    }
  ]
}

3. Cooldown

  • Cooldown unit is milliseconds.
  • Example: 2000 = 2 seconds.
  • During cooldown, repeated triggers are ignored.

4. Save / Import / Export

  • Save Changes: persists current state.
  • Export: writes JSON config.
  • Import: loads JSON config.
  • Reset to Defaults: clears sounds and resets toggles/settings.

Trigger Behavior

Editor/Diagnostics

  • New diagnostics with severity Error (active document): Syntax Error.
  • Any line exceeding configured max length: Line Too Long.
  • On save, if line count increases: Line Increased.

Terminal

On non-zero exit code, output is classified to:

  • Syntax Error if syntax/parse patterns match.
  • Test Failed if test command or failure patterns match.
  • Build Failed if build command or build error patterns match.
  • Runtime Error fallback for other failures.

Audio Playback Notes

  • Local file sources are played through:
    • Webview audio
    • Plus system player fallback (afplay / paplay / aplay / ffplay / PowerShell)
  • URL sources are treated as valid, but Myinstants fetch flow downloads to local files for reliability.

Project Scripts

  • npm run build - compile TypeScript to out/
  • npm run watch - watch mode build
  • npm run lint - placeholder (no lint rules configured)

Files

  • Extension entry: src/extension.ts
  • Event engine: src/event-engine.ts
  • Terminal watcher: src/terminal-watcher.ts
  • Sound manager/state: src/sound-manager.ts, src/state.ts
  • Webview UI: src/webview/*

Troubleshooting

  • No sound plays:
    • Ensure master switch is enabled.
    • Ensure event toggle is enabled.
    • Ensure sound source is assigned.
    • Check cooldown is not too high.
    • Try Preview first.
  • Myinstants fetch returns nothing:
    • Verify internet access.
    • Try a different search term.
    • Myinstants HTML structure may have changed.
  • After code changes, old UI behavior persists:
    • Rebuild with npm run build.
    • Reload VS Code window / restart extension host.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft