
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@ericedouard/vad-node-realtime
Advanced tools
Powerful, user-friendly realtime voice activity detector (VAD) for node
Forked from https://github.com/ricky0123/vad which supports web and react. It used to support node, but it wasn't realtime. Here it's based for node and realtime.
See the project home for more details.
npm install @ericedouard/vad-node-realtime
Use RealTimeVAD when you need to process audio chunks in real time, such as receiving audio from a client application:
const { RealTimeVAD } = require('@eric-edouard/vad-node-realtime');
async function example() {
// Create a new RealTimeVAD instance
const vad = await RealTimeVAD.new({
onSpeechStart: () => {
console.log('Speech started');
},
onSpeechEnd: (audio) => {
console.log('Speech ended, received audio of length:', audio.length);
// Process the audio data here
},
// Optional: customize VAD parameters
positiveSpeechThreshold: 0.6,
negativeSpeechThreshold: 0.4,
minSpeechFrames: 4,
});
// Start processing
vad.start();
// When you receive audio chunks from your source:
function onAudioChunkReceived(audioChunk) {
// Process each chunk of audio data
// audioChunk should be a Float32Array with sample rate matching the sampleRate option (default: 16000Hz)
await vad.processAudio(audioChunk);
}
// When you're done with the stream:
await vad.flush(); // Process any remaining audio
vad.destroy(); // Clean up resources
}
example();
For processing entire audio files or pre-recorded chunks:
const { NonRealTimeVAD } = require('@eric-edouard/vad-node-realtime');
async function example() {
const vad = await NonRealTimeVAD.new();
// audioData is a Float32Array of audio samples
// sampleRate is the sample rate of the audio
for await (const { audio, start, end } of vad.run(audioData, sampleRate)) {
console.log(`Speech detected from ${start}ms to ${end}ms`);
// Process detected speech segment
}
}
RealTimeVAD.new(options): Create a new RealTimeVAD instancestart(): Start processing audiopause(): Pause processing audioprocessAudio(audioData): Process a chunk of audio dataflush(): Process any remaining audio and trigger final callbacksreset(): Reset the VAD statedestroy(): Clean up resourcessampleRate: Sample rate of the input audio (default: 16000, inputs with different sample rates will be automatically resampled)onSpeechStart: Callback when speech startsonSpeechEnd: Callback when speech ends, with the audio dataonVADMisfire: Callback when speech was detected but was too shortonFrameProcessed: Callback after each frame is processedpositiveSpeechThreshold: Threshold for detecting speech (0-1)negativeSpeechThreshold: Threshold for detecting silence (0-1)minSpeechFrames: Minimum number of frames to consider as speechISC
FAQs
Powerful, user-friendly realtime voice activity detector (VAD) for node
We found that @ericedouard/vad-node-realtime demonstrated a not healthy version release cadence and project activity because the last version was released 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
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.