node-microphone | simple module that use arecord ALSA tools method | Audio Utils library
kandi X-RAY | node-microphone Summary
kandi X-RAY | node-microphone Summary
microphone is a simple module that use `arecord` ALSA tools method to capture sound from a USB Microphone
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-microphone
node-microphone Key Features
node-microphone Examples and Code Snippets
Community Discussions
Trending Discussions on node-microphone
QUESTION
I'm recording audio from nodejs using node-microphone (which is just a javascript interface for arecord), and want to store the stream chunks in an AudioBuffer
using web-audio-api (which is a nodejs implementation of the Web Audio API).
My audio source has two channels while my AudioBuffer
has only one (in purpose).
This is my working configuration for recording audio with arecord through my USB sound card (I'm using a Raspberry pi 3 running on Raspbian buster):
...ANSWER
Answered 2020-May-15 at 19:43So the input stereo signal is coming as 16 bits signed integers, interleaving left and right channels, meaning that the corresponding buffers (8 bits unsigned integers) have this format for a single stereo sample:
QUESTION
I would like to design a client/server system where the client is recording audio from a microphone and streaming it to a server for further processing. I'm planning on using gRPC, with a NodeJS client (I don't have control over the server).
But I don't really know how to do that. I found the npm package "microphone-stream" that seemed to perfectly fit my needs (https://www.npmjs.com/package/microphone-stream), because I can record from microphone and get each buffer separately in order to send them to the server. Unfortunately, this package use the getUserMedia API, which means I can't use it in plain NodeJS.
So I found other npm packages (node-microphone and mic) which don't use getUserMedia, but they don't allow to retrieve buffers on the stream easily (or I just don't know how to do it). For example, I can see on "mic" page (https://www.npmjs.com/package/mic) :
...ANSWER
Answered 2018-Feb-22 at 09:34Okay, thanks to Michael I manage to achieve what I wanted to do.
First of all, I noticed that if a console.log() my buffer, I got something like this.
QUESTION
I'm making an application that records what a user is saying, and saves it to a file. In order to get the sound from the microphone I'm using the node-microphone package. My application currently is able to get the sound from the microphone. However, when i try to write the stream to a audio file, and play it, i get the following error.
Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file.
Does anyone know how to write audio to a file in node?
...ANSWER
Answered 2017-Sep-02 at 20:50The node-microphone
documentation states :
startRecording()
Start the recording with the given sound options in the class. Creates a new child process. It will return the recording PCM Wave Stream as Node Stream.
I imagine your files are missing the correct headers. One of the following modules might help you :
node-wav
The Writer class accepts raw audio data written to it (only PCM audio data is currently supported), and outputs a WAV file with a valid WAVE header at the beginning specifying the formatting information of the audio stream.
audiobuffer-to-wav
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-microphone
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page