{"_id":"@audio/webm-decode","_rev":"2-e4de441c8cf511fa31dc6c9f94251a0f","name":"@audio/webm-decode","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@audio/webm-decode","version":"1.0.0","keywords":["webm","matroska","ebml","opus","vorbis","audio","decode","decoder","pcm"],"author":{"name":"audiojs"},"license":"MIT","_id":"@audio/webm-decode@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/webm-decode#readme","bugs":{"url":"https://github.com/audiojs/webm-decode/issues"},"dist":{"shasum":"666408de80ca671729e666ad28e217372e671b2f","tarball":"https://registry.npmjs.org/@audio/webm-decode/-/webm-decode-1.0.0.tgz","fileCount":5,"integrity":"sha512-gie0sXNwbi7H5zVfdeKmAsARIqesXC9iVuPY77tkHA+iemOEbs+Q+pnYK/38YaDPNhByPdP47Ao90FHLlMJ6xg==","signatures":[{"sig":"MEQCIEw8MMB58IEwpSGzqLc4m9xk9AotiNau/MhATsLrDAs+AiB0ZnZqww6sm/rm9+i/Y25gGzx8HuFyEc32yqPutZq6QQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17988},"main":"webm-decode.js","type":"module","types":"webm-decode.d.ts","engines":{"node":">=16"},"exports":{".":"./webm-decode.js","./package.json":"./package.json"},"gitHead":"889d6e0b5b495d93cb9317563c10236b2e25b3d0","scripts":{"test":"node test.js"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/webm-decode.git","type":"git"},"_npmVersion":"11.11.0","description":"Decode WebM audio (Opus, Vorbis) to PCM samples","directories":{},"_nodeVersion":"25.8.1","dependencies":{"opus-decoder":"^0.7.6","@wasm-audio-decoders/ogg-vorbis":"^0.1.20"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/webm-decode_1.0.0_1773602966587_0.9993426391530924","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-03-15T19:29:26.515Z","modified":"2026-04-04T03:30:33.335Z","1.0.0":"2026-03-15T19:29:26.730Z"},"bugs":{"url":"https://github.com/audiojs/webm-decode/issues"},"author":{"name":"audiojs"},"license":"MIT","homepage":"https://github.com/audiojs/webm-decode#readme","keywords":["webm","matroska","ebml","opus","vorbis","audio","decode","decoder","pcm"],"repository":{"url":"git+https://github.com/audiojs/webm-decode.git","type":"git"},"description":"Decode WebM audio (Opus, Vorbis) to PCM samples","maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"},{"name":"jamen","email":"jamenmarz@gmail.com"}],"readme":"# webm-decode\n\nDecode WebM audio (Opus and Vorbis) to PCM float samples. EBML demuxer in pure JS, codec decoding via WASM.\n\nPart of [audio-decode](https://github.com/audiojs/audio-decode).\n\n## Install\n\n```\nnpm i @audio/webm-decode\n```\n\n## Usage\n\n```js\nimport decode from '@audio/webm-decode'\n\nlet { channelData, sampleRate } = await decode(webmBuffer)\n```\n\n### Streaming\n\n```js\nimport { decoder } from '@audio/webm-decode'\n\nlet dec = await decoder()\nlet result = await dec.decode(chunk)\nlet flushed = await dec.flush()\ndec.free()\n```\n\n## API\n\n### `decode(src): Promise<AudioData>`\n\nWhole-file decode. Accepts `Uint8Array` or `ArrayBuffer`.\n\n### `decoder(): Promise<WebmDecoder>`\n\nCreates a decoder instance.\n\n- **`dec.decode(data)`** — decode chunk, returns `Promise<AudioData>`\n- **`dec.flush()`** — flush remaining data\n- **`dec.free()`** — release resources\n\nNote: `decode()` and `flush()` are async (unlike the sync PCM decoders) because Opus decoding happens in WASM.\n\n## Codecs\n\n- **Opus** — via [opus-decoder](https://github.com/eshaz/wasm-audio-decoders)\n- **Vorbis** — via [@wasm-audio-decoders/ogg-vorbis](https://github.com/eshaz/wasm-audio-decoders) (raw frames wrapped in OGG pages)\n\n## License\n\nMIT\n\n<a href=\"https://github.com/krishnized/license/\">ॐ</a>\n","readmeFilename":"README.md"}