Voice mode on Windows: native audio-capture binary missing from npm package

Resolved 💬 4 comments Opened Mar 11, 2026 by SpitOnYourFace Closed Apr 11, 2026

Description

/voice command fails on Windows with:

Voice recording requires the native audio module, which could not be loaded.

Root Cause

The native audio binary is not included in the npm-distributed package. The code at runtime looks for:

<claude-code>/audio-capture/x64-win32/audio-capture.node

But the audio-capture/ directory does not exist at all in the npm installation.

The relevant code path (Rl() function in cli.js) tries:

  1. process.env.AUDIO_CAPTURE_NODE_PATH (not set)
  2. Falls back to path.join(dirname, '..', 'audio-capture', '<arch>-<platform>', 'audio-capture.node')
  3. Returns nullisNativeAudioAvailable() returns false
  4. On win32 there's no SoX/arecord fallback, so voice fails entirely

Environment

  • Claude Code version: 2.1.72 (installed via npm install -g @anthropic-ai/claude-code)
  • OS: Windows 10 (MSYS2/Git Bash)
  • Architecture: x64
  • Node.js: via nvm-windows

Expected Behavior

Voice mode should work on Windows, either by:

  1. Bundling audio-capture/x64-win32/audio-capture.node in the npm package
  2. Or providing a SoX-based fallback on Windows (like Linux/macOS have)

Steps to Reproduce

  1. Install Claude Code via npm on Windows: npm install -g @anthropic-ai/claude-code
  2. Run claude
  3. Type /voice
  4. See error: "Voice recording requires the native audio module, which could not be loaded."

Additional Context

  • On macOS/Linux, a SoX (rec) or arecord fallback exists, but on win32 the code returns false immediately with no fallback
  • The @anthropic-ai/claude-code-native package is not published to npm either (404)

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗