Comments (3)
I had a similar issue. In my case I found that I needed to specify the correct device. I'm using a USB audio capture device.
To list available devices run this,
arecord --list-pcm
The value I used was, "plughw:CARD=system,DEV=0" which you can pass to the mic() constructor like so,
var micInstance = mic({
device: "plughw:CARD=system,DEV=0",
rate: '16000',
channels: '1',
debug: true,
exitOnSilence: 6
});
from mic.
If you are on Linux, what is the output of this?
$ arecord temp.wav
Please see the README file carefully:
This module depends on your machine having an installation of sox (Mac/Windows Users) OR ALSA tools for Linux. You can use this library to record from any microphone device. Before installing and experimenting with the mic module, you need to ensure that you are able to capture audio via the command line:
$ arecord temp.wav
To get ALSA tools on Raspberry Pi running raspbian, try the following:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install alsa-base alsa-utils
After the above is tested and validated, you can proceed to install the module using:
$ npm install mic
from mic.
@ashishbajaj99 Yes, i have th libs installed.
from mic.
Related Issues (20)
- WAV header not required
- Write .wav file format with header. HOT 2
- WAV format generates slowed down audio files? HOT 1
- AUDIO INPUT NOT PAUSING ON PAUSECOMPLETE HOT 1
- After some time, "recording audioProcess has exited with code = 0" HOT 7
- Error: write after end HOT 2
- exitOnSilence doesn't work when Audio Gain is set to other than 1 HOT 1
- Error installing on Raspberry Pi Zero - ELOOP: too many symbolic links encountered
- Version Update HOT 1
- 'plughw:1,0' is a bad default for the 'device' option
- Issue on macOS
- Detect sounds HOT 1
- Mic and Azure Speech to Text HOT 2
- After a while, arecord overruns HOT 1
- Mic on windows ignores bitwidth setting HOT 1
- Linux signals not supported on windows HOT 1
- Invalid value for card error HOT 1
- Stream .on('data') always passes Uint8Array to callback
- How to get a valid wav file from micInputStream.on('data') ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mic.