node-webrtc-audio-stream-source
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

node-webrtc-audio-stream-source

This library gives you a RTCAudioSource object which gets audio data from a readable stream.

Install

yarn add node-webrtc-audio-stream-source wrtc

How to create sample audio file for testing

macOS

say -o test.wav --data-format=LEI16@48000 hello world

audio file to readable stream

import fs from 'fs'

const readable = fs.createReadStream('test.wav')

Stream requirements

The stream must be valid PCM audio meeting the following criteria:

  • Bits per sample: 16
  • Little endian
  • encoding: signed integer

Usage

import RTCAudioSource from 'node-webrtc-audio-stream-source'

const rtcAudioSource  = new RTCAudioSource()
rtcAudioSource.addStream(fs.createReadStream('test.wav', 16, 48000, 1))

Readme

Keywords

none

Package Sidebar

Install

npm i node-webrtc-audio-stream-source

Weekly Downloads

30

Version

0.3.0

License

MIT

Unpacked Size

14.8 kB

Total Files

20

Last publish

Collaborators

  • tylerlong