Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ thresholdStart: null // silence threshold to start recording, overrides thresh
thresholdEnd : null // silence threshold to end recording, overrides threshold (rec only)
silence : '1.0' // seconds of silence before ending
verbose : false // log info to the console
recordProgram : 'rec' // Defaults to 'rec' - also supports 'arecord' and 'sox'
recordProgram : 'rec' // Defaults to 'rec' - also supports 'arecord', 'sox' and 'parec'
device : null // recording device (e.g.: 'plughw:1')
```

Expand Down
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ exports.start = function (options) {
cmdArgs.unshift('-D', options.device)
}
break
// PulseAudio
case 'parec':
cmd = 'parec'
cmdArgs = [
'--rate', options.sampleRate, // sample rate
'--channels', options.channels, // channels
'--format', 's16le', // sample format
]
if (options.device) {
cmdArgs.unshift('--device', options.device)
}
break
}

// Spawn audio capture command
Expand Down