3

I'm trying to build a little Node script to listen to the microphone and then send the audio to a server and I'm stuck with the mic package.

I get this error:

Received Info: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
arecord: main:788: 
Received Info: erreur à l'ouverture audio: Aucun fichier ou dossier de ce type

I have tried to run arecord -d 5 -f U8 sample.mp3 on my machine (Linux) and it works well (I can then listen to what I said with aplay sample.mp3).

I have seen a similar post but don't really understand how this applies to my case. In case you need, this is the output of arecord -l

**** Liste des Périphériques Matériels CAPTURE ****
carte 0: PCH [HDA Intel PCH], périphérique 0: ALC269VC Analog [ALC269VC Analog]
  Sous-périphériques: 0/1
  Sous-périphérique #0: subdevice #0

And this is the options object I pass to mic

"MIC_CONFIG": {
        "rate": 8000,
        "channels": 1,
        "debug": true,
        "exitOnSilence": 6
    }

Thanks for helping

Valentin Coudert
  • 1,759
  • 3
  • 19
  • 44
  • 1
    doesn't really solve the problem but it worked with `node-record-lpcm16` instead of `mic` (using `rec` as `recordProgram` in the config) – Valentin Coudert Dec 30 '19 at 15:21

0 Answers0