pa-opus-audio
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@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

Package Sidebar

Install

npm i pa-opus-audio

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

464 kB

Total Files

108

Last publish

Collaborators

  • japj