Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.
/ pa-opus-audio Public archive

pa-opus-audio is a Node.js native addon for low latency PortAudio/Opus Audio Recording and Playback.

License

Notifications You must be signed in to change notification settings

japj/pa-opus-audio

Repository files navigation

@japj/pa-opus-audio Build NPM

pa-opus-audio is a Node.js native addon for low latency PortAudio/Opus Audio Recording and Playback.

NOTE: Work in progress, see also Changelog and Current Issues

This is part of the "rehearse20" project.

Example

import { PoaInput, PoaOutput } from 'pa-opus-audio';

const input = new PoaInput();
const output = new PoaOutput();

input.setEncodedFrameAvailableCallback(function (b: Buffer) {
    if (b) {
        output.decodeAndPlay(b);
    }
});

output.initStartPlayback();
input.initStartRecord();

console.log('Recording and Playback from default OS devices');
setTimeout(function () {
    input.stopRecord();
    output.stopPlayback();
    console.log('... long wait for exiting this program');
    process.exit(0);
}, 5000);

Platform support

  • macOS x64
  • Linux x64
  • Windows x64

About

pa-opus-audio is a Node.js native addon for low latency PortAudio/Opus Audio Recording and Playback.

Resources

License

Stars

Watchers

Forks

Packages

No packages published