{"id":44923147,"url":"https://github.com/aolsenjazz/feeder-node","last_synced_at":"2026-02-18T04:00:40.305Z","repository":{"id":37024838,"uuid":"329352574","full_name":"aolsenjazz/feeder-node","owner":"aolsenjazz","description":"Feed mono or stereo audio data for playback. Ideal for real-time audio.","archived":false,"fork":false,"pushed_at":"2025-12-15T19:25:09.000Z","size":3759,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T22:28:32.167Z","etag":null,"topics":["audio","feeder","realtime","resampler","stream","wasm","webaudio","webrtc","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aolsenjazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-01-13T15:36:37.000Z","updated_at":"2025-04-26T20:13:01.000Z","dependencies_parsed_at":"2025-07-23T07:11:01.084Z","dependency_job_id":"dab6dce8-bb30-4b6c-8d40-dd74fb73350f","html_url":"https://github.com/aolsenjazz/feeder-node","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.3783783783783784,"last_synced_commit":"185feeb45d4f99d6d37d2442774a90774f976ebd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aolsenjazz/feeder-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aolsenjazz%2Ffeeder-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aolsenjazz%2Ffeeder-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aolsenjazz%2Ffeeder-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aolsenjazz%2Ffeeder-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aolsenjazz","download_url":"https://codeload.github.com/aolsenjazz/feeder-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aolsenjazz%2Ffeeder-node/sbom","scorecard":{"id":200939,"data":{"date":"2025-08-11","repo":{"name":"github.com/aolsenjazz/feeder-node","commit":"8589750d4e388a62c162946f665fb036317e25bb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: dist/libsamplerate.wasm:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T22:49:46.742Z","repository_id":37024838,"created_at":"2025-08-16T22:49:46.742Z","updated_at":"2025-08-16T22:49:46.742Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29567616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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","feeder","realtime","resampler","stream","wasm","webaudio","webrtc","websocket"],"created_at":"2026-02-18T04:00:25.045Z","updated_at":"2026-02-18T04:00:40.289Z","avatar_url":"https://github.com/aolsenjazz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FeederNode\n\n![AppVeyor](https://img.shields.io/appveyor/build/aolsenjazz/feeder-node)   [![Coverage Status](https://coveralls.io/repos/github/aolsenjazz/feeder-node/badge.svg?branch=master)](https://coveralls.io/github/aolsenjazz/feeder-node?branch=master)   [![Maintainability](https://api.codeclimate.com/v1/badges/b032545e996af9dbc61b/maintainability)](https://codeclimate.com/github/aolsenjazz/feeder-node/maintainability)   ![Depfu](https://img.shields.io/depfu/aolsenjazz/feeder-node)\n\nFeederNode is a [pseudo](https://github.com/WebAudio/web-audio-api/issues/251)-[AudioNode](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode) which can be fed audio data for instant playback. This library is ideal for consuming real-time audio data, e.g. data received from WebRTC or Websocket connections. Uses modern technologies such as WebAssembly, AudioWorklet, and Web Workers if they're available, falling back to more older systems if not.\n\n#### Features:\n- [AudioNode](https://developer.mozilla.org/en-US/docs/Web/API/AudioNode)-like API\n- Super-fast, async resampling using [Web Assembly](https://webassembly.org/) and [Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)\n- [AudioWorklet](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorklet) by default, [ScriptProcessorNode](https://developer.mozilla.org/en-US/docs/Web/API/ScriptProcessorNode) when needed\n- Highly configurable\n\n## Installation\n\nInstall using NPM:\n```bash\nnpm i @alexanderolsen/feeder-node\n```\n## Setup\nTo utilize Web Worker, WebAssembly, and AudioWorklet functionality, you **must** copy the helper files in */node_modules/@alexanderolsen/feeder-node/dist/* to where feeder-node can find them. The default location for these files is at the server root. This location can be changed using the following variables in the options dict passed into `createFeederNode()`:\n\n```javascript\ncreateFeederNode(context, nChannels, { \n    pathToWasm:    '/some/path/to/libsamplerate.wasm',     // default '/libsamplerate.wasm'\n    pathToWorklet: '/some/path/to/feeder-node.worklet.js', // default '/feeder-node.worklet.js'\n    pathToWorker:  '/some/path/to/feeder-node.worker.js'   // default '/feeder-node.worker.js'\n});\n```\nSee **Configuration** for more instructions on using the `options` dict.\n\n## Usage\n\nFeederNode expects to receive mono or interleaved multi-channel data. Any TypedArray can be used; values will be converted to `Float32`s where -1 \u003c `sample` \u003c 1.\n\n### In modules:\n```javascript\nimport { createFeederNode } from '@alexanderolsen/feeder-node'; \n\nlet context   = new AudioContext();\nlet nChannels = 2;\nlet options = {}; // see **Configuration**\n\ncreateFeederNode(context, nChannels, options)\n    .then((feederNode) =\u003e {\n        feederNode.connect(context.destination);\n        feederNode.feed(new Float32Array(512));\n    });\n```\nor\n```javascript\nconst createFeederNode = require('@alexanderolsen/feeder-node').createfeederNode; \n\n(async function() {\n    let context   = new AudioContext();\n    let nChannels = 2;\n    let options = {}; // see **Configuration**\n\n    let feederNode = await createFeederNode(context, nChannels, options);\n    feederNode.connect(context.destination);\n    feederNode.feed(new Float32Array(512));\n})();\n```\n\n### In HTML:\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@alexanderolsen/feeder-node\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var context   = new AudioContext();\n    var nChannels = 2;\n    var options = {}; // see **Configuration**\n\n    FeederNode.createFeederNode(context, nChannels, options)\n        .then((feederNode) =\u003e {\n            feederNode.connect(context.destination);\n            feederNode.feed(new Float32Array(512));\n        });\n    \n\u003c/script\u003e\n```\nOr use the feeder-node.js file in the *dist* folder:\n```html\n\u003cscript src=\"feeder-node.js\"\u003e\u003c/script\u003e\n```\n\n## Configuration\n\nWhen creating a FeederNode instance, you have number of options available:\n\n```javascript\nlet context   = new AudioContext();\nlet nChannels = 2;\n\n// entries are defaults\nlet options = {\n    inputSampleRate:     context.sampleRate, // Nothing surprising here\n\n    batchSize:           (512 || 128), // Stuck at 128 for `AudioWorklet`s. \n    bufferThreshold:     4096,         // Number of samples to buffer before propagating to dstination\n    bufferLength:        192000,       // Length of RingBuffer. See ring-buffer.js for more\n    resampConverterType: 2,            // See **resampConverterType**\n\n    pathToWorklet:       '/feeder-node.processor.js', // Set to location of your feeder-node.processor.js\n    pathToWorker:        '/feeder-node.worker.js',    // Set to location of your feeder-node.worker.js\n    pathToWasm:          '/libsamplrate.wasm.js'      // set to location of your libsamplerate.wasm\n}\n\ncreateFeederNode(context, nChannels, options).then((feederNode) =\u003e { ... });\n```\n\n#### `batchSize`\nModifies the batch size processed by `ScriptProcessorNode`. This does not affect `AudioWorklet`s as they're stuck at 128. If using ScriptProcessorNode, must be one of the following: `[256, 512, 1024, 2048, 4096, 8192, 16384]`.\n\n#### `bufferThreshold`\nFeederNode buffers this many samples (per channel) before propagating to the next `AudioNode` in the graph. Higher values (16000-32000) can be useful to guarantee seamless audio if playing back in real-time, though lower values result in lower latency. If FeederNode runs out of data, buffer this many sample again before propagating.\n\n#### `bufferLength`\nThe total amount of data which can be buffered at a time. If you try to buffer more data than this, you'll end up overwriting older data.\n\n#### `resampConverterType`\nConverter types are as follows. More information can be found at the [libsamplerate website](http://www.mega-nerd.com/SRC/api_misc.html#Converters).\n```javascript\nconst ConverterType = {\n    SRC_SINC_BEST_QUALITY: 0,   // highest quality, slowest\n    SRC_SINC_MEDIUM_QUALITY: 1, // \n    SRC_SINC_FASTEST: 2,        // in-between\n    SRC_ZERO_ORDER_HOLD: 3,     // poor quality, \"blindingly\" fast\n    SRC_LINEAR: 4               // poor quality, \"blindingly\" fast\n}\n```\n\n#### `inputSampleRate`\nSample rate of incoming data. Will automatically be resampled to AudioContext.sampleRate.\n\n## API Reference\n\nOnce you've created the FeederNode using `createFeederNode()` or `FeederNode.createFeederNode()`, the returned object exposes:\n### `connect`\n```javascript\n/**\n * Connects FeederNode to the specific destination AudioNode\n *\n * @param {AudioNode} destination The node to connect to\n */\nconnect(destination) { ... }\n```\n\n### `disconnect`\n```javascript\n/** Disconnects from the currently-connected AudioNode */\ndisconnect() { ... }\n```\n\n### `feed`\n```javascript\n/**\n * Feeds raw PCM audio data to the underlying node. Any kind of TypedArray can be submitted - FeederNode\n * will automatically convert to Float32 and scale to -1 \u003c n \u003c 1.\n *\n * @param {TypedArray} data Any TypedArray. Conversion will be done automatically\n */\nfeed(data) { ... }\n```\n\n### `getters`\n```javascript\nget bufferLength() { ... }\nget nChannels() { ... }\nget batchSize() { ... }\n\nget numberOfInputs() { ... }\nget numberOfOutputs() { ... }\nget channelCount() { ... }\nget channelCountMode() { ... }\nget channelInterpretation() { ... }\n\n// e.g. let bufferLength = feederNode.bufferlength;\n```\n\n### `setters`\n```javascript\nset channelCount(channelCount) { ... }\nset channelCountMode(channelCountMode) { ... }\nset channelInterpretation(channelInterpretation) { ... }\n\n// e.g. silenceListenerNode.channelInterpretation = 'speakers';\n```\n\n### `overrides`\n\nIt can be useful to get notified when FeederNode runs out of data, or has resumed playing:\n\n```javascript\n/** Overwrite these for Backend state callbacks */\nonBackendReady() {}\nonBackendPlaying() {}\nonBackendStarved() {}\n\n// e.g. feederNode.onBackendStarved = () =\u003e { console.log('feederNode ran out of data!' ) }\n```\n\n## Examples\n\nRun any server ([http-server](https://www.npmjs.com/package/http-server), etc) from the project directory:\n```bash\ncd feeder-node\nhttp-server\n```\nand visit *localhost:8080/examples/continuous* or *localhost:8080/examples/chunk-feeder* in a browser. Examples **must be** hosted from the root directory, as they need to access the files in *dist*.\n\n## Building From Source\n\n```bash\ngit clone https://github.com/aolsenjazz/feeder-node\ncd feeder-node\nnpm run watch\n```\n\nProduction files are placed in the *dist* directory.\n\n## Uncaught (in promise) DOMException: The user aborted a request.\nThis super unhelpful error message occurs when FeederNode is unable to find your feeder-node.worklet.js. To fix this, make sure your `options.pathToWorklet` is set correctly and that the file is actually reachable at that location.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nLicenses are available in `LICENSE.md`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faolsenjazz%2Ffeeder-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faolsenjazz%2Ffeeder-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faolsenjazz%2Ffeeder-node/lists"}