Output an Audio object to the speaker.
Output an Audio
object to the speaker.
var Audio = require('audio');
var out = require('audio-out');
var random = require('crypto').randomBytes;
// Create 5s random audio and output.
var foo = new Audio(random(800 * 5), {rate: 800});
out(foo);
$ npm install --save audio-out
Note: Speaker may have special installation on Debian/Ubuntu.
$ sudo apt-get install libasound2-dev
out(audio)
Output a given audio to the speaker.
audio
(Audio
): Audio to output to the speaker.Returns a Speaker
instance.
Jamen Marzonie |
MIT © Jamen Marzonie