{"id":27140433,"url":"https://github.com/leaguetavern/node-windows-audio-visualisation","last_synced_at":"2025-07-22T04:04:41.947Z","repository":{"id":285465061,"uuid":"958234585","full_name":"LeagueTavern/node-windows-audio-visualisation","owner":"LeagueTavern","description":"A library for visualizing audio data from Windows speaker devices in Node.js.","archived":false,"fork":false,"pushed_at":"2025-04-07T10:35:57.000Z","size":1759,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-08T15:16:29.649Z","etag":null,"topics":["audio","audio-visualisation","speaker","spectrum","spectrum-analyzer","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/LeagueTavern.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,"zenodo":null}},"created_at":"2025-03-31T21:36:09.000Z","updated_at":"2025-04-07T10:31:12.000Z","dependencies_parsed_at":"2025-07-22T04:04:32.283Z","dependency_job_id":null,"html_url":"https://github.com/LeagueTavern/node-windows-audio-visualisation","commit_stats":null,"previous_names":["leaguetavern/node-window-audio-visualisation","leaguetavern/node-windows-audio-visualisation"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/LeagueTavern/node-windows-audio-visualisation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeagueTavern%2Fnode-windows-audio-visualisation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeagueTavern%2Fnode-windows-audio-visualisation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeagueTavern%2Fnode-windows-audio-visualisation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeagueTavern%2Fnode-windows-audio-visualisation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeagueTavern","download_url":"https://codeload.github.com/LeagueTavern/node-windows-audio-visualisation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeagueTavern%2Fnode-windows-audio-visualisation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266424026,"owners_count":23926124,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["audio","audio-visualisation","speaker","spectrum","spectrum-analyzer","windows"],"created_at":"2025-04-08T05:52:08.213Z","updated_at":"2025-07-22T04:04:41.917Z","avatar_url":"https://github.com/LeagueTavern.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-Windows-Audio-Visualisation\n\n\u003ca href=\"https://github.com/LeagueTavern/node-windows-audio-visualisation/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/LeagueTavern/node-windows-audio-visualisation?style=for-the-badge\" alt=\"@coooookies/windows-audio-visualisation downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/LeagueTavern/node-windows-audio-visualisation/actions\"\u003e\u003cimg alt=\"GitHub CI Status\" src=\"https://img.shields.io/github/actions/workflow/status/LeagueTavern/node-windows-audio-visualisation/CI.yml?style=for-the-badge\"\u003e\u003c/a\u003e\n\u003ca href=\"https://nodejs.org/en/about/releases/\"\u003e\u003cimg src=\"https://img.shields.io/node/v/%40coooookies%2Fwindows-audio-visualisation?style=for-the-badge\" alt=\"Node.js version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@coooookies/windows-audio-visualisation\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@coooookies/windows-audio-visualisation.svg?style=for-the-badge\u0026sanitize=true\" alt=\"@coooookies/windows-audio-visualisation npm version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://npmcharts.com/compare/@coooookies/windows-audio-visualisation?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@coooookies/windows-audio-visualisation.svg?style=for-the-badge\u0026sanitize=true\" alt=\"@coooookies/windows-audio-visualisation downloads\"\u003e\u003c/a\u003e\n\n![Screenshot](docs/shot1.gif)\n\n\u003e This library allows developers to access audio visualisation data from the Windows using [Node.js](https://nodejs.org/), providing a simple API to access this data. It is written in [Rust](https://www.rust-lang.org/) and utilizes [napi-rs](https://napi.rs/) to implement bindings with Node.js.\n\nEnglish | [简体中文](./README_CN.md)\n\n## ⚠️ Warning\n\n`node-windows-audio-visualisation` only supports Windows.\n\n## 🚀 Features\n\n- Access to the Windows audio visualisation data.\n- Support for both JavaScript and TypeScript.\n- Easy to use and integrate into existing Node.js applications.\n\n## Installation\n\n```shell\nnpm i @coooookies/windows-audio-visualisation\n```\n\n## 🍊 Example\n\n[CommonJS Example](example/index.js) \u003cbr /\u003e\n[ESModule Example](example/index.mjs) \u003cbr /\u003e\n[TypeScript Example](example/index.ts) \u003cbr /\u003e\n\n## Usage\n\n#### Importing the library\n\n```Typescript\n// Typescript \u0026 ESModule\nimport { AudioMonitor, getDefaultOutputDevice, getAllOutputDevices } from '@coooookies/windows-audio-visualisation';\n\n// CommonJS\nconst { AudioMonitor, getDefaultOutputDevice, getAllOutputDevices } = require('@coooookies/windows-audio-visualisation');\n```\n\n#### Gets all output devices\n\nGets all output devices on the system.\n\n```Typescript\nconst devices = getAllOutputDevices(); // AudioDevice[]\n// [\n//   {\n//     id: \"{0.0.0.00000000}.{00000000-0000-0000-0000-000000000000}\",\n//     name: \"Speakers (Realtek High Definition Audio)\",\n//     isDefault: true\n//   },\n//   {\n//     ...\n//   }\n// ]\n```\n\n#### Gets the default output device\n\nGets the default output device on the system.\n\n```Typescript\nconst device = getDefaultOutputDevice(); // AudioDevice | null\n// {\n//   id: \"{0.0.0.00000000}.{00000000-0000-0000-0000-000000000000}\",\n//   name: \"Speakers (Realtek High Definition Audio)\",\n//   isDefault: true\n// },\n```\n\n#### Gets the spectrum data\n\nGet the spectrum data, the spectrum data is composed of an array, the length of the array is the number of spectra, and each element in the array represents the loudness of the spectrum unit, with a value range of 0 to 1.\n\n```Typescript\nconst audio = new AudioMonitor()\n\naudio.setDevice(\"{0.0.0.00000000}.{00000000-0000-0000-0000-000000000000}\") // Set the device id\naudio.start(2048) // start monitoring with 2048 chunk size\n\n// audio.stop() // stop monitoring\n\nconst bands = 8 // Number of bands\nconst spectrum = audio.getSpectrum(bands)\n// [0.521, 0.821, 0.123, 0.456, 0.789, 0.234, 0.567, 0.890, ...]\n\nsetInterval(() =\u003e {\n  console.log(audio.getSpectrum(bands))\n}, 1e3 / 20)\n// [0.521, 0.821, 0.123, 0.456, 0.789, 0.234, 0.567, 0.890, ...]\n// [0.123, 0.456, 0.789, 0.234, 0.567, 0.890, 0.123, 0.456, ...]\n// [0.789, 0.234, 0.567, 0.890, 0.123, 0.456, 0.789, 0.234, ...]\n// ...\n```\n\n## License\n\nThis project is licensed under the [MIT](LICENSE) License.\n\n- [@RustAudio/cpal (Apache-2.0 license)](https://github.com/RustAudio/cpal)\n- [@Ricky12Awesome/safav (Apache-2.0 license)](https://github.com/Ricky12Awesome/safav)\n- [@HEnquist/wasapi-rs (MIT license)](https://github.com/HEnquist/wasapi-rs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaguetavern%2Fnode-windows-audio-visualisation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleaguetavern%2Fnode-windows-audio-visualisation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleaguetavern%2Fnode-windows-audio-visualisation/lists"}