{"id":16007527,"url":"https://github.com/redkenrok/node-audiorecorder","last_synced_at":"2026-03-05T02:32:17.306Z","repository":{"id":27362177,"uuid":"113593494","full_name":"RedKenrok/node-audiorecorder","owner":"RedKenrok","description":"Audio recorder for Node.js, delivers a 16-bit signed-integer linear pulse modulation WAV stream.","archived":false,"fork":false,"pushed_at":"2024-03-30T08:07:14.000Z","size":481,"stargazers_count":95,"open_issues_count":3,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T23:15:18.734Z","etag":null,"topics":["arecord","audio-recording","rec","sox"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RedKenrok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-12-08T16:16:04.000Z","updated_at":"2024-12-08T18:19:39.000Z","dependencies_parsed_at":"2024-04-04T07:46:52.369Z","dependency_job_id":null,"html_url":"https://github.com/RedKenrok/node-audiorecorder","commit_stats":{"total_commits":70,"total_committers":7,"mean_commits":10.0,"dds":0.6,"last_synced_commit":"b9dce1cf7fabb49f05c9e803906f32363c8347d8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedKenrok%2Fnode-audiorecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedKenrok%2Fnode-audiorecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedKenrok%2Fnode-audiorecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedKenrok%2Fnode-audiorecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedKenrok","download_url":"https://codeload.github.com/RedKenrok/node-audiorecorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125591,"owners_count":21051770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arecord","audio-recording","rec","sox"],"created_at":"2024-10-08T12:03:53.118Z","updated_at":"2026-03-05T02:32:17.271Z","avatar_url":"https://github.com/RedKenrok.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![npm package @latest](https://img.shields.io/npm/v/node-audiorecorder.svg?label=npm@latest\u0026style=flat-square\u0026maxAge=3600)](https://npmjs.com/package/node-audiorecorder)\n[![License agreement](https://img.shields.io/github/license/redkenrok/node-audiorecorder.svg?style=flat-square\u0026maxAge=86400)](https://github.com/redkenrok/node-audiorecorder/blob/master/LICENSE)\n[![Open issues on GitHub](https://img.shields.io/github/issues/redkenrok/node-audiorecorder.svg?style=flat-square\u0026maxAge=86400)](https://github.com/redkenrok/node-audiorecorder/issues)\n\n\u003c/div\u003e\n\n# Audio recorder (unmaintained)\n\nAudio recorder for [Node.js](https://nodejs.org/), delivers a 16-bit signed-integer linear pulse modulation WAV stream. Based of [Gilles De Mey](https://github.com/gillesdemey)'s [node-record-lpcm16](https://github.com/gillesdemey/node-record-lpcm16).\n\n## Installation\n\n```\nnpm install node-audiorecorder\n```\n\n## Dependencies\n\nThis module requires you to install [SoX](http://sox.sourceforge.net/) and it must be available in your \\$PATH.\n\n### For Linux\n\n```\nsudo apt-get install sox libsox-fmt-all\n```\n\n### For MacOS\n\n```\nbrew install sox\n```\n\n### For Windows\n\n[Download the binaries](http://sourceforge.net/projects/sox/files/latest/download)\n\n## Usage\n\n### Constructor\n\n```javascript\n// Import module.\nconst AudioRecorder = require('node-audiorecorder')\n\n// Options is an optional parameter for the constructor call.\n// If an option is not given the default value, as seen below, will be used.\nconst options = {\n  program: `rec`, // Which program to use, either `arecord`, `rec`, or `sox`.\n  device: null, // Recording device to use. Null means default.\n  // List available devices with 'arecord -l', 'rec -V6 -n -t coreaudio junk_device_name', or 'sox -V6 -n -t coreaudio junk_device_name'.\n  driver: null, // Recording driver to use. Null means default.\n\n  bits: 16, // Sample size. (only for `rec` and `sox`)\n  channels: 1, // Channel count.\n  encoding: `signed-integer`, // Encoding type. (only for `rec` and `sox`)\n  format: `S16_LE`, // Encoding type. (only for `arecord`)\n  rate: 16000, // Sample rate.\n  type: `wav`, // Format type.\n\n  // Following options only available when using `rec` or `sox`.\n  silence: 2, // Duration of silence in seconds before it stops recording.\n  thresholdStart: 0.5, // Silence threshold to start recording.\n  thresholdStop: 0.5, // Silence threshold to stop recording.\n  keepSilence: true, // Keep the silence in the recording.\n}\n// Optional parameter intended for debugging.\n// The object has to implement a log and warn function.\nconst logger = console\n\n// Create an instance.\nlet audioRecorder = new AudioRecorder(options, logger)\n```\n\n\u003e If you can't capture any sound with 'arecord' try to running 'arecord -l' to which devices are available.\n\n\u003e See the [arecord documentation](https://linux.die.net/man/1/arecord) for more detail on its options.\n\n\u003e See the [sox documentation](http://sox.sourceforge.net/Docs/Documentation) for more detail on the rec and sox options.\n\n### Methods\n\n```javascript\n// Creates and starts the recording process.\naudioRecorder.start()\n// Stops and removes the recording process.\naudioRecorder.stop()\n// Returns the stream of the recording process.\naudioRecorder.stream()\n```\n\n### Examples\n\nSee the [examples directory](https://github.com/RedKenrok/node-audiorecorder/tree/master/examples) for example usage.\n\n\u003e For another example see the [node-hotworddetector](https://github.com/RedKenrok/node-hotworddetector) module, or [Electron-VoiceInterfaceBoilerplate](https://github.com/RedKenrok/Electron-VoiceInterfaceBoilerplate)'s input.js.\n\n## Troubleshooting\n\n### Windows continues recording\n\nIf you have issues with continues recording on Windows 10 with SoX 14.4.2 or later, install version [14.4.1](https://sourceforge.net/projects/sox/files/sox/14.4.1/) instead.\n\n## License\n\n[MIT license](https://github.com/redkenrok/node-audiorecorder/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredkenrok%2Fnode-audiorecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredkenrok%2Fnode-audiorecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredkenrok%2Fnode-audiorecorder/lists"}