{"id":31747666,"url":"https://github.com/audiojs/audio-decode","last_synced_at":"2026-04-02T14:32:16.264Z","repository":{"id":49717237,"uuid":"66737591","full_name":"audiojs/audio-decode","owner":"audiojs","description":"Minimal audio decoders layer","archived":false,"fork":false,"pushed_at":"2025-05-21T12:30:06.000Z","size":207,"stargazers_count":184,"open_issues_count":2,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-30T01:51:27.522Z","etag":null,"topics":["audio","codec","decoder","wav","webassembly"],"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/audiojs.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":"2016-08-27T22:06:19.000Z","updated_at":"2025-09-03T08:22:34.000Z","dependencies_parsed_at":"2024-06-18T13:37:27.401Z","dependency_job_id":"8ecbe72d-5d9a-4edc-b0ad-21d2d772155c","html_url":"https://github.com/audiojs/audio-decode","commit_stats":{"total_commits":112,"total_committers":7,"mean_commits":16.0,"dds":0.0803571428571429,"last_synced_commit":"87618eab4c059afea0bafc2c1a355b25c07a8fab"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/audiojs/audio-decode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audiojs%2Faudio-decode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audiojs%2Faudio-decode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audiojs%2Faudio-decode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audiojs%2Faudio-decode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/audiojs","download_url":"https://codeload.github.com/audiojs/audio-decode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/audiojs%2Faudio-decode/sbom","scorecard":{"id":216097,"data":{"date":"2025-08-11","repo":{"name":"github.com/audiojs/audio-decode","commit":"90b36f1988ca16b295ae935d84a0316ee35e2fb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/28 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":"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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.js.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/audiojs/audio-decode/test.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.js.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/audiojs/audio-decode/test.js.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.js.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 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-17T01:40:11.331Z","repository_id":49717237,"created_at":"2025-08-17T01:40:11.331Z","updated_at":"2025-08-17T01:40:11.331Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001461,"owners_count":26083102,"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-10-09T02:00:07.460Z","response_time":59,"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","codec","decoder","wav","webassembly"],"created_at":"2025-10-09T13:44:09.647Z","updated_at":"2026-04-02T14:32:16.250Z","avatar_url":"https://github.com/audiojs.png","language":"JavaScript","readme":"# audio-decode [![test](https://github.com/audiojs/audio-decode/actions/workflows/test.js.yml/badge.svg)](https://github.com/audiojs/audio-decode/actions/workflows/test.js.yml)\n\nDecode any audio format to raw samples.\u003cbr\u003e\nJS / WASM – no ffmpeg, no native bindings, works in both node and browser.\u003cbr\u003e\nSmall API, minimal size, near-native performance, lazy-loading, chunked decoding.\n\n[![npm install audio-decode](https://nodei.co/npm/audio-decode.png?mini=true)](https://npmjs.org/package/audio-decode/)\n\n```js\nimport decode from 'audio-decode';\n\nconst { channelData, sampleRate } = await decode(anyAudioBuffer);\n```\n\n#### Supported formats:\n\n| Format | Package | Engine |\n|--------|---------|--------|\n| MP3 | [mpg123-decoder](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/mpg123-decoder) | WASM |\n| WAV | [node-wav](https://www.npmjs.com/package/node-wav) | JS |\n| OGG Vorbis | [@wasm-audio-decoders/ogg-vorbis](https://github.com/eshaz/wasm-audio-decoders) | WASM |\n| FLAC | [@wasm-audio-decoders/flac](https://github.com/eshaz/wasm-audio-decoders) | WASM |\n| Opus | [ogg-opus-decoder](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/ogg-opus-decoder) | WASM |\n| M4A / AAC | [@audio/aac-decode](https://github.com/audiojs/aac-decode) | WASM |\n| QOA | [qoa-format](https://github.com/phoboslab/qoa) | JS |\n| AIFF | [@audio/aiff-decode](https://github.com/audiojs/aiff-decode) | JS |\n| CAF | [@audio/caf-decode](https://github.com/audiojs/caf-decode) | JS |\n| WebM | [@audio/webm-decode](https://github.com/audiojs/webm-decode) | JS + WASM |\n| AMR | [@audio/amr-decode](https://github.com/audiojs/amr-decode) | WASM |\n| WMA | [@audio/wma-decode](https://github.com/audiojs/wma-decode) | WASM |\n\n### Whole-file\n\nAuto-detects format. Input can be _ArrayBuffer_, _Uint8Array_, or _Buffer_.\n\n```js\nimport decode from 'audio-decode'\n\nlet { channelData, sampleRate } = await decode(buf)\n```\n\n### Chunked\n\n```js\nlet dec = await decode.mp3()\nlet a = await dec(chunk1)    // { channelData, sampleRate }\nlet b = await dec(chunk2)\nawait dec()                  // close\n```\n\n## Streaming\n\nWith `ReadableStream`, `fetch`, or Node stream:\n\n```js\nimport decodeStream from 'audio-decode/stream'\n\nfor await (let { channelData, sampleRate } of decodeStream(response.body, 'mp3')) {\n  // process chunks\n}\n```\n\nFormats: `mp3`, `flac`, `opus`, `oga`, `m4a`, `wav`, `qoa`, `aac`, `aiff`, `caf`, `webm`, `amr`, `wma`.\n\n## See also\n\n* [audio-type](https://github.com/audiojs/audio-type) – detect audio format from buffer.\n* [wasm-audio-decoders](https://github.com/eshaz/wasm-audio-decoders) – compact \u0026 fast WASM audio decoders.\n* [AudioDecoder](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder) – native WebCodecs decoder API.\n* [decodeAudioData](https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/decodeAudioData) – built-in browser decoding method.\n* [ffmpeg.wasm](https://github.com/ffmpegwasm/ffmpeg.wasm) – full encoding/decoding library.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"./LICENSE\"\u003eMIT\u003c/a\u003e • \u003ca href=\"https://github.com/krishnized/license/\"\u003eॐ\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudiojs%2Faudio-decode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faudiojs%2Faudio-decode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faudiojs%2Faudio-decode/lists"}