{"id":18658366,"url":"https://github.com/shime/play-sound","last_synced_at":"2025-04-04T13:12:01.153Z","repository":{"id":20671761,"uuid":"23954518","full_name":"shime/play-sound","owner":"shime","description":"Play sounds by shelling out to one of the available audio players.","archived":false,"fork":false,"pushed_at":"2023-08-24T07:44:11.000Z","size":224,"stargazers_count":203,"open_issues_count":17,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T07:52:32.486Z","etag":null,"topics":["javascript","node","nodejs","sound"],"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/shime.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-12T09:22:07.000Z","updated_at":"2024-06-18T13:37:34.181Z","dependencies_parsed_at":"2024-06-18T13:37:31.714Z","dependency_job_id":"7af21cac-3794-4858-8071-001585488b20","html_url":"https://github.com/shime/play-sound","commit_stats":{"total_commits":88,"total_committers":14,"mean_commits":6.285714285714286,"dds":0.6022727272727273,"last_synced_commit":"25989f8bcd71665456176174d70c8c75f55bad81"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Fplay-sound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Fplay-sound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Fplay-sound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shime%2Fplay-sound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shime","download_url":"https://codeload.github.com/shime/play-sound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182378,"owners_count":20897380,"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":["javascript","node","nodejs","sound"],"created_at":"2024-11-07T07:32:40.535Z","updated_at":"2025-04-04T13:12:01.132Z","avatar_url":"https://github.com/shime.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# play-sound\n\n[![Downloads](https://img.shields.io/npm/dt/play-sound.svg)](https://npmjs.org/package/play-sound)\n\nPlay sounds by shelling out to one of the available audio players.\n\n## Installation\n\n    npm install play-sound\n\n## Examples\n\n```javascript\nvar player = require('play-sound')(opts = {})\n\n// $ mplayer foo.mp3 \nplayer.play('foo.mp3', function(err){\n  if (err) throw err\n})\n\n// { timeout: 300 } will be passed to child process\nplayer.play('foo.mp3', { timeout: 300 }, function(err){\n  if (err) throw err\n})\n\n// configure arguments for executable if any\nplayer.play('foo.mp3', { afplay: ['-v', 1 ] /* lower volume for afplay on OSX */ }, function(err){\n  if (err) throw err\n})\n\n// access the node child_process in case you need to kill it on demand\nvar audio = player.play('foo.mp3', function(err){\n  if (err \u0026\u0026 !err.killed) throw err\n})\naudio.kill()\n```\n\n## Options\n\n* `players` – List of available audio players to check. Default:\n  * [`mplayer`](https://www.mplayerhq.hu/)\n  * [`afplay`](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/afplay.1.html)\n  * [`mpg123`](http://www.mpg123.de/)\n  * [`mpg321`](http://mpg321.sourceforge.net/)\n  * [`play`](http://sox.sourceforge.net/)\n  * [`omxplayer`](https://github.com/popcornmix/omxplayer)\n  * [`aplay`](https://linux.die.net/man/1/aplay)\n  * [`cmdmp3`](https://github.com/jimlawless/cmdmp3)\n  * [`cvlc`](https://www.commandlinux.com/man-page/man1/cvlc.1.html)\n  * [`powershell`](https://docs.microsoft.com/en-us/powershell/)\n* `player` – Audio player to use (skips availability checks)\n\n## Prior art\n\n* [play.js](https://github.com/Marak/play.js) - play sound files from node.js to your speakers\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshime%2Fplay-sound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshime%2Fplay-sound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshime%2Fplay-sound/lists"}