
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
process-audio-capture
Advanced tools
Native process-level audio capture for Node.js and Electron applications
English | 中文
Node.js and Electron native plugin for capturing audio from specific processes
npm install process-audio-capture
1. Main Process Setup
import { setupAudioCaptureIpc } from "process-audio-capture/dist/main";
// Setup IPC handlers
setupAudioCaptureIpc();
2. Preload Script
import { exposeAudioCaptureApi } from "process-audio-capture/dist/preload";
// Expose API to renderer process
exposeAudioCaptureApi();
3. Renderer Process Usage
// Use window.processAudioCapture to access all APIs
// Get process list
const processes = await window.processAudioCapture.getProcessList();
// Listen to audio data
window.processAudioCapture.onAudioData((audioData) => {
console.log("Audio data:", audioData);
});
// Start capturing audio from specified process
const pid = processes[0].pid; // Example: capture from first process
await window.processAudioCapture.startCapture(pid);
// Import audioCapture object or AudioCapture class in main process
// Implement custom IPC handling logic
import { audioCapture, AudioCapture } from "process-audio-capture";
const { audioCapture } = require("process-audio-capture");
// Check platform support
if (audioCapture.isPlatformSupported()) {
// Request permission
const permission = await audioCapture.requestPermission();
if (permission.status === "authorized") {
// Get process list
const processes = audioCapture.getProcessList();
// Start capturing audio
audioCapture.startCapture(processes[0].pid, (audioData) => {
console.log("Audio data:", audioData);
});
}
}
| Method | Description | Return Value |
|---|---|---|
isPlatformSupported() | Check if current platform is supported | boolean |
checkPermission() | Check audio capture permission | PermissionStatus |
requestPermission() | Request audio capture permission | Promise<PermissionStatus> |
getProcessList() | Get list of processes with audio | ProcessInfo[] |
startCapture(pid, callback) | Start capturing audio from process | boolean |
stopCapture() | Stop audio capture | boolean |
No special permission configuration required
Requires NSAudioCaptureUsageDescription permission
⚠️ Development Notes
- Only packaged apps will show permission dialog when calling
requestPermission()- In development, add your IDE or
Electron.appto system permissions:System Settings→Privacy & Security→Screen & System Audio Recording→System Audio Only
Thanks to the following projects for inspiration and reference:
MIT License
FAQs
Native process-level audio capture for Node.js and Electron applications
We found that process-audio-capture demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.