Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio open error #18

Closed
AndrewKralovec opened this issue Aug 27, 2017 · 3 comments
Closed

audio open error #18

AndrewKralovec opened this issue Aug 27, 2017 · 3 comments

Comments

@AndrewKralovec
Copy link

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.

Got SIGNAL startComplete
Received Info: ALSA lib pcm_hw.c:1700:(_snd_pcm_hw_open) Invalid value for card
arecord: main:722: audio open error: No such file or directory
recording audioProcess has exited with code = 1
@ashishbajaj99
Copy link
Owner

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

@AndrewKralovec
Copy link
Author

@ashishbajaj99 Yes, i have th libs installed.
image

@chandywerks
Copy link

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
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants