{"id":14008495,"url":"https://github.com/chebro/discord-voice-recorder","last_synced_at":"2025-10-29T22:30:19.492Z","repository":{"id":41999632,"uuid":"294177348","full_name":"chebro/discord-voice-recorder","owner":"chebro","description":"A nifty script that can pipe out audio from a discord voice channel to your local storage. A discord voice recorder!","archived":false,"fork":false,"pushed_at":"2022-04-19T14:48:37.000Z","size":182,"stargazers_count":120,"open_issues_count":8,"forks_count":37,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T05:05:11.540Z","etag":null,"topics":["bot","discordjs","hacktoberfest"],"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/chebro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-09T17:05:38.000Z","updated_at":"2025-01-24T13:24:42.000Z","dependencies_parsed_at":"2022-08-12T01:50:58.618Z","dependency_job_id":null,"html_url":"https://github.com/chebro/discord-voice-recorder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chebro%2Fdiscord-voice-recorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chebro%2Fdiscord-voice-recorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chebro%2Fdiscord-voice-recorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chebro%2Fdiscord-voice-recorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chebro","download_url":"https://codeload.github.com/chebro/discord-voice-recorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238900174,"owners_count":19549462,"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":["bot","discordjs","hacktoberfest"],"created_at":"2024-08-10T11:01:44.141Z","updated_at":"2025-10-29T22:30:14.175Z","avatar_url":"https://github.com/chebro.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Discord Voice Recorder\n\nA [Discord.js](https://discord.js.org/#/) script which can record voice calls. Summon the bot to a voice channel, and voilà! the audio is piped right into your local machine. Jump to [Installation \u0026 Usage](https://github.com/chebro/discord-voice-recorder#installation-and-usage) to get started.\n\n\u003cimg src=\"https://i.imgur.com/faOjepH.png\" width=\"500\" align=\"right\"\u003e\n\n### Index\n-    [Installation and Usage](#installation-and-usage)\n     -    [Run Locally](#run-locally)     \n\t -\t  [Run in Container](#run-in-container)\n\t -\t  [Bot Commands](#bot-commands)\n-    [Managing the Output](#managing-the-output)\n     -    [Merge Recording](#merge-recording)\n     -    [Convert the Merged File to MP3](#convert-the-merged-file-to-mp3)\n\n_**Note:** Recording voice calls without prior consent violates privacy. Do not use this bot without approval. I'm not responsible for your insanity._\n\n_Also, multi user recording is currently out of discord.js's scope, currently a unique stream is created for every user, but the end result is a very bad audio output, [more info](https://discordjs.guide/voice/receiving-audio.html#what-if-i-want-to-listen-to-multiple-users)._\n\n## Installation and Usage\n\nClone the repository : \n```\ngit clone https://github.com/chebro/discord-voice-recorder/\n```\n\n[Create a discord bot](https://discordpy.readthedocs.io/en/latest/discord.html) if you don't have one already and invite the bot to your server, then:\n\n1. Create `config.json` file and a `/recordings` directory at the root folder.\n2. Paste the bot token (from [developer window](https://discord.com/developers/applications)) and any bot prefix into `config.json`, like so:\n\n```yaml\n{\n    \"BOT_TOKEN\": \"\u003cYOUR_BOT_TOKEN\u003e\",\n    \"PREFIX\": \"\u003cBOT_PREFIX\u003e\"\n}\n```\n\nYou can run the script in any of the following two ways:\n\n### Run Locally\n\n1. Run `npm i` to download necessary `node_modules`.\n\n2. Run `npm start`.\n\nThe bot should be online.\n\n### Run in Container\n\n1. Build the docker image: \n\n```\ndocker build -t dvr .\n```\n\n2. Bind `/recordings` directory on host to container and start the container with a custom name:\n\n```\ndocker run \\          \n  --name \u003cCONTAINER_NAME\u003e \\     \n  --mount type=bind,source=\"$(pwd)\"/recordings,target=/usr/src/bot/recordings \\\n  dvr\n```\n\nThe bot should be online.\n\n### Bot Commands\n\n+ Start Recording : `\u003cPREFIX\u003eenter \u003cVOICE_CHANNEL_NAME\u003e`\n\n+ Stop Recording  : `\u003cPREFIX\u003eexit`\n\n## Managing the Output\n\nThe output for each piece of audio stream is written to a unique file in [PCM format](https://en.wikipedia.org/wiki/Pulse-code_modulation) (48000 Hz, signed 16-bit little-endian, 2 channel (stereo)) and saved to the `/recordings` directory.\n\n### Merge Recording\n\nTo merge all output files to `/recordings/merge.pcm`, run:\n\n```\nnode /bin/merge.js\n``` \n\n**Note:** Empty your `recordings` folder (and remove `merge.pcm`) after each session. Running `./bin/merge.js` otherwise will dump large merge files.\n\n### Convert the Merged File to MP3\n\nHead over to [FFmpeg.org](https://ffmpeg.org/download.html), and download executables for your OS; If you're on Windows, double-check if the FFmpeg bin is on your path. As discussed in issue [#3](https://github.com/chebro/discord-voice-recorder/issues/3), to convert pcm to mp3, run:\n\n```\nffmpeg -f s16le -ar 48000 -ac 2 -i merge.pcm out.mp3\n```\n## Thanks\n\nSpecial thanks to [@eslachance](https://github.com/eslachance) for the [gist](https://gist.github.com/eslachance/fb70fc036183b7974d3b9191601846ba). It is what inspired me to make this repo.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchebro%2Fdiscord-voice-recorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchebro%2Fdiscord-voice-recorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchebro%2Fdiscord-voice-recorder/lists"}