0.3.0 • Published 3 years ago

node-webrtc-audio-stream-source v0.3.0

Weekly downloads
132
License
MIT
Repository
-
Last release
3 years ago

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))
0.3.0

3 years ago

0.2.6

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago