ashishbajaj99 / mic

A simple stream wrapper for arecord (Linux (including Raspbian)) and sox (Mac, Windows). Returns a Passthrough stream object so that stream control like pause(), resume(), pipe(), etc. are all available.
MIT License
103 stars 61 forks source link

Invalid value for card error #42

Closed alexribeirodesa closed 2 years ago

alexribeirodesa commented 2 years ago

hello, I'm running the test code and just didn't work, I'm with ubuntu Ubuntu 21.10...

Received Info: ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card arecord: main:852: Received Info: audio open error: No such file or directory

alexribeirodesa commented 2 years ago

found the solution, just set the correct device in the initialization options like this: device: "plughw:0,0"

device: hw:0,0 OR plughw:1, 0 OR anything valid supported by arecord. Ignored for sox on macOS.