Closed AndrewKralovec closed 7 years ago
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
@ashishbajaj99 Yes, i have th libs installed.
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
});
Hello, so i download the package and added your example, but i get the following error. Any idea on how to reslove this. I'm unable to figure the arecord command that is getting launched in this package.