I need to stream the laptop mic into the WSL environment. Install pulseAudio successfully on both windows and WSL - but my program still can't connect to the mic: (node program under WSL):
var record = require('node-record-lpcm16')
let stream = record.start({
sampleRate: 16000,
channels: 1,
compress: false,
threshold: 0.0001,
thresholdStart: null,
thresholdEnd: null,
silence: '1.0',
verbose: false
})
ERROR IS
events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn rec ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn rec',
path: 'rec',
spawnargs: [
'-q', '-r',
16000, '-c',
1, '-e',
'signed-integer', '-b',
'16', '-t',
'wav', '-',
'silence', '1',
'0.1', '0.0001%',
'1', '1.0',
'0.0001%'
]
}