{"id":21648209,"url":"https://github.com/sapphi-red/web-noise-suppressor","last_synced_at":"2025-04-07T06:05:25.889Z","repository":{"id":42552421,"uuid":"451443966","full_name":"sapphi-red/web-noise-suppressor","owner":"sapphi-red","description":"Noise suppressor nodes for Web Audio API.","archived":false,"fork":false,"pushed_at":"2024-09-03T02:51:35.000Z","size":270,"stargazers_count":48,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T05:04:06.533Z","etag":null,"topics":["noise-cancellation","noise-reduction","noise-suppression","webaudio","webaudio-api","webaudioapi"],"latest_commit_sha":null,"homepage":"https://web-noise-suppressor.sapphi.red/","language":"TypeScript","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/sapphi-red.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":"2022-01-24T11:51:48.000Z","updated_at":"2025-03-13T02:41:42.000Z","dependencies_parsed_at":"2024-06-18T20:09:52.962Z","dependency_job_id":"2194450c-615f-4b6b-b957-ab5a1e9bce1a","html_url":"https://github.com/sapphi-red/web-noise-suppressor","commit_stats":{"total_commits":100,"total_committers":1,"mean_commits":100.0,"dds":0.0,"last_synced_commit":"3e9805744322e5181ee4c1a994846f1bc4c9dcb6"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fweb-noise-suppressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fweb-noise-suppressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fweb-noise-suppressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapphi-red%2Fweb-noise-suppressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapphi-red","download_url":"https://codeload.github.com/sapphi-red/web-noise-suppressor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601447,"owners_count":20964864,"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":["noise-cancellation","noise-reduction","noise-suppression","webaudio","webaudio-api","webaudioapi"],"created_at":"2024-11-25T06:54:02.810Z","updated_at":"2025-04-07T06:05:25.854Z","avatar_url":"https://github.com/sapphi-red.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @sapphi-red/web-noise-suppressor\n\n[![npm version](https://badge.fury.io/js/@sapphi-red%2Fweb-noise-suppressor.svg)](https://badge.fury.io/js/@sapphi-red%2Fweb-noise-suppressor) ![CI](https://github.com/sapphi-red/web-noise-suppressor/workflows/CI/badge.svg)\n\nNoise suppressor nodes for Web Audio API.\n\n[Demo](https://web-noise-suppressor.sapphi.red)\n\nThis package provides three noise suppression nodes.\n\n- NoiseGateWorkletNode: A simple noise gate implementation\n- RnnoiseWorkletNode: Based on [xiph/rnnoise](https://github.com/xiph/rnnoise)\n  - Using [shiguredo/rnnoise-wasm](https://github.com/shiguredo/rnnoise-wasm)\n- SpeexWorkletNode: Based on [xiph/speexdsp](https://github.com/xiph/speexdsp)'s `preprocess` function\n  - Using [sapphi-red/speex-preprocess-wasm](https://github.com/sapphi-red/speex-preprocess-wasm)\n\n**This package requires AudioWorklet to work.**\n\n## Install\n\n```shell\nnpm i @sapphi-red/web-noise-suppressor # yarn add @sapphi-red/web-noise-suppressor\n```\n\n## Usage\n\nThis section is written only for vite users.\n\n```ts\nimport { SpeexWorkletNode, loadSpeex } from '@sapphi-red/web-noise-suppressor'\nimport speexWorkletPath from '@sapphi-red/web-noise-suppressor/speexWorklet.js?url'\nimport speexWasmPath from '@sapphi-red/web-noise-suppressor/speex.wasm?url' // you can use `vite-plugin-static-copy` instead of this\n\nconst ctx = new AudioContext()\n\nconst speexWasmBinary = await loadSpeex({ url: speexWasmPath })\nawait ctx.audioWorklet.addModule(speexWorkletPath)\n\nconst stream = await navigator.mediaDevices.getUserMedia({\n  audio: true\n})\n\nconst source = ctx.createMediaStreamSource(stream)\nconst speex = new SpeexWorkletNode(ctx, {\n  wasmBinary: speexWasmBinary,\n  maxChannels: 2\n})\n\nsource.connect(speex)\nspeex.connect(ctx.destination)\n```\n\nFor more details, see [demo source code](https://github.com/sapphi-red/web-noise-suppressor/blob/main/demo/src/index.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphi-red%2Fweb-noise-suppressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapphi-red%2Fweb-noise-suppressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapphi-red%2Fweb-noise-suppressor/lists"}