Socket
Book a DemoInstallSign in
Socket

audio-cmd-stream

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-cmd-stream

Allows getting an input or output audio stream to a specific device.

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
150
7.91%
Maintainers
1
Weekly downloads
 
Created
Source

Audio-CMD-Stream

Allows getting an input or output audio stream to a specific device.

Pre-Requirements

Windows

Python and PyAudio to be installed

Linux

Aplay and arecord to be installed, should come with linux by default

Installation

npm i audio-cmd-stream -S

API

AudioStream.Input

// @device - The device id for PyAudio or the device string for arecord
// @args - Additional arguments passed to the spawn command
let inputStream = new AudioStream.Input(device, args);

AudioStream.Output

// @device - The device id for PyAudio or the device string for aplay
// @args - Additional arguments passed to the spawn command
let outputStream = new AudioStream.Output(device, args);

Code Example

var AudioStream = require('audio-cmd-stream');

// Create a new input stream for the specified device using the specified additional arguments that are passed to arecord
let inputStream = new AudioStream.Input(device, ['-f', 'cd', '-t', 'raw']);

// Create a new output stream for the specified device
let outputStream = new AudioStream.Output(device);

// Pipe the input stream straight to the output stream
inputStream.pipe(outputStream);

Keywords

audio

FAQs

Package last updated on 03 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts