Package Exports
- node-audio-mixer
- node-audio-mixer/dist/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-audio-mixer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node.js Audio Mixer
About
Audio mixer that allows mixing PCM audio streams with customizable parameters.
Installation
Node.js 18.0.0 or newer is required.
npm:
npm install node-audio-mixerpnpm:
pnpm install node-audio-mixeryarn:
yarn install node-audio-mixerExample usage
import {createReadStream, createWriteStream} from "fs";
import {AudioMixer} from "node-audio-mixer";
const mixer = new AudioMixer({
sampleRate: 48000,
bitDepth: 16,
channels: 1,
autoClose: true,
});
const firstInput = mixer.createAudioInput({
sampleRate: 48000,
bitDepth: 16,
channels: 1,
});
const secondInput = mixer.createAudioInput({
sampleRate: 48000,
bitDepth: 16,
channels: 1,
});
const outputAudio = createWriteStream("mixed.pcm");
const firstAudio = createReadStream("firstAudio.pcm");
const secondAudio = createReadStream("secondAudio.pcm");
mixer.pipe(outputAudio);
firstAudio.pipe(firstInput);
secondAudio.pipe(secondInput);More examples you can find here
API Documentation
You can find it here
Changelog
You can view the changelogs on GitHub releases