1.3.7 • Published 7 months ago

node-audio-mixer v1.3.7

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Node.js Audio Mixer

Npm packet

About

Audio mixer that allows mixing PCM audio streams with customizable parameters.

Installation

Node.js 12.2.0 or newer is required.

npm:

npm install node-audio-mixer

pnpm:

pnpm install node-audio-mixer

yarn:

yarn install node-audio-mixer

Example usage

import { createReadStream, createWriteStream } from "fs";
import { AudioMixer } from "node-audio-mixer";

const mixer = new AudioMixer({ sampleRate: 48000, bitDepth: 16, channels: 2, autoClose: true });

const outputAudio = createWriteStream("mixed.pcm");

const audio1 = createReadStream("audio1.pcm");
const audio2 = createReadStream("audio2.pcm");

const input1 = mixer.createAudioInput({ sampleRate: 44100, bitDepth: 16, channels: 1 });
const input2 = mixer.createAudioInput({ sampleRate: 44100, bitDepth: 16, channels: 1 });

mixer.pipe(outputAudio);

audio1.pipe(input1);
audio2.pipe(input2);

More examples you can find in examples

API Documentation

You can find in /docs/API.md

Changelog

You can view the changelogs on GitHub releases

License

MIT

1.3.7

7 months ago

1.3.6

7 months ago

1.3.5

7 months ago

1.2.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.0.1

8 months ago

1.0.0

8 months ago