@openclaw/whatsapp 2026.9.6 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icon.png +0 -0
- package/dist/.setup/{accounts-D_NGDjCx.mjs → accounts-CtRPAQCL.mjs} +3 -9
- package/dist/.setup/{action-runtime-DZZFamfl.mjs → action-runtime-DeVk5V7r.mjs} +2 -2
- package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs} +6 -26
- package/dist/.setup/{approval-reactions-BnXw-UZI.mjs → approval-reactions-DiOFvb1s.mjs} +8 -14
- package/dist/.setup/{auth-store-Dh8a3cba.mjs → auth-store-BBonwKks.mjs} +9 -33
- package/dist/.setup/{channel-Bg_fS2iF.mjs → channel-CJFE0kD_.mjs} +82 -154
- package/dist/.setup/{channel-react-action-1iBiEnq7.mjs → channel-react-action-2r_hjLZV.mjs} +4 -8
- package/dist/.setup/{channel.runtime-rurG-kbr.mjs → channel.runtime-C94goLw9.mjs} +4 -4
- package/dist/.setup/{channel.setup-C8P5q8uD.mjs → channel.setup-CfN1UfdY.mjs} +1 -1
- package/dist/.setup/{connection-controller-C60mU7j7.mjs → connection-controller-CHo1oRJA.mjs} +13 -63
- package/dist/.setup/{creds-files-Drg3usj1.mjs → creds-files-CDATZWWM.mjs} +5 -11
- package/dist/.setup/{directory-config-BHPoBklt.mjs → directory-config-DUiJ5d8I.mjs} +13 -14
- package/dist/.setup/doctor-iMwg0Vhr.mjs +222 -0
- package/dist/.setup/group-config-path-DZr3ucUO.mjs +40 -0
- package/dist/.setup/{group-session-key-D22hYMdE.mjs → group-session-key-2-mja4OF.mjs} +3 -9
- package/dist/.setup/{login-2dmd1TfE.mjs → login-BFlvSh9h.mjs} +9 -11
- package/dist/.setup/{login-qr-CgKtO_ef.mjs → login-qr-Ayb8i25J.mjs} +29 -77
- package/dist/.setup/{monitor-By82ehLA.mjs → monitor-CGpV2VNN.mjs} +376 -504
- package/dist/.setup/{question-reactions-D3Zq9Gbn.mjs → question-reactions-CPyyi5AY.mjs} +2 -2
- package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
- package/dist/.setup/{send-C6jDmcL9.mjs → send-BGdvf5cC.mjs} +31 -80
- package/dist/.setup/{send-api-B4DOt2RJ.mjs → send-api-H4AkQJjT.mjs} +45 -109
- package/dist/.setup/{session-errors-JuazczrA.mjs → session-errors-B8UcAnZN.mjs} +1 -4
- package/dist/.setup/{session.runtime-DcJuO42v.mjs → session.runtime-st1konFI.mjs} +1 -1
- package/dist/.setup/{setup-finalize-pGqWOiFX.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
- package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
- package/dist/.setup/{setup-surface-B9CYwDPZ.mjs → setup-surface-43fj197P.mjs} +3 -3
- package/dist/.setup/{shared-DVgQ8kRG.mjs → shared-DgOG5Iqr.mjs} +26 -37
- package/dist/.setup/{socket-close-CCVSFufF.mjs → socket-close-CT__V2fz.mjs} +80 -92
- package/dist/.setup/{targets-runtime-RBjx3pg_.mjs → targets-runtime-DmiqXIXO.mjs} +2 -7
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/agent-tools-api.js +5 -12
- package/dist/api.js +10 -10
- package/dist/auth-presence.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +9 -10
- package/dist/light-runtime-api.js +2 -2
- package/dist/login-qr-runtime.js +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/audio-decode/LICENSE +9 -10
- package/node_modules/audio-decode/README.md +16 -0
- package/node_modules/audio-decode/audio-decode.d.ts +2 -14
- package/node_modules/audio-decode/audio-decode.js +4 -92
- package/node_modules/audio-decode/meta.js +1 -0
- package/node_modules/audio-decode/node_modules/{audio-buffer → @audio/decode}/LICENSE +1 -1
- package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.d.ts +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.js +242 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/meta.js +14 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/package.json +114 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/readme.md +191 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/stream.d.ts +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/stream.js +1 -0
- package/node_modules/audio-decode/node_modules/@audio/decode/test.html +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/LICENSE +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/README.md +80 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/alac.js +326 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.d.ts +24 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.js +452 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/meta.js +81 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/package.json +63 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aac/src/aac.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE.liba52 +340 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.js +131 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-ac3/src/ac3.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/README.md +46 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-aiff/package.json +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/LICENSE +191 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/README.md +65 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.js +150 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/package.json +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-amr/src/amr.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/README.md +53 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.js +241 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-avi/package.json +66 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/README.md +48 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.js +238 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-caf/package.json +53 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/README.md +73 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.js +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.d.ts +29 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.js +423 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/meta.js +40 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dsd/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE.libdca +339 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.js +139 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-dts/src/dts.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE.ffmpeg +502 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/README.md +45 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.js +124 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-eac3/src/eac3.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/README.md +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.js +3172 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/meta.js +115 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-flac/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE.libopenmpt +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/README.md +86 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.js +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.d.ts +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.js +148 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mod/src/mod.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/README.md +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.js +793 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/meta.js +143 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp3/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/README.md +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.d.ts +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.js +455 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mp4/package.json +74 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE +31 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE.libmpcdec +31 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/README.md +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.d.ts +20 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.js +158 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/package.json +64 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-mpc/src/mpc.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE.libopus +44 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/README.md +32 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.d.ts +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.js +147 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.js +1 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/meta.js +103 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/package.json +68 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/decode-opus.js +2 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/opus.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/README.md +19 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.js +275 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-qoa/package.json +56 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE.ttadec +39 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/README.md +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.d.ts +17 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.js +302 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-tta/package.json +58 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/LICENSE +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/README.md +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/meta.js +102 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/package.json +60 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/README.md +23 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.d.ts +8 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.js +256 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/meta.js +114 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wav/package.json +52 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE +29 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE.wavpack +25 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/README.md +41 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.js +9 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.js +140 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/package.json +62 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/src/wavpack.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE +21 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE.libopus +44 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/README.md +59 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.d.ts +18 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.js +141 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/package.json +76 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-webm/src/opus.wasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/LICENSE +12 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/README.md +74 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.d.ts +15 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.js +10 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.js +516 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/package.json +57 -0
- package/node_modules/audio-decode/node_modules/@audio/decode-wma/src/wma.wasm.js +0 -0
- package/node_modules/audio-decode/package.json +37 -39
- package/node_modules/audio-decode/stream.d.ts +2 -0
- package/node_modules/audio-decode/stream.js +2 -0
- package/node_modules/baileys/lib/Utils/messages-media.js +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/readme.md +2 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
- package/node_modules/baileys/package.json +1 -1
- package/node_modules/typebox/build/compile/code.mjs +1 -2
- package/node_modules/typebox/build/compile/validator.mjs +5 -1
- package/node_modules/typebox/build/format/iri.mjs +16 -9
- package/node_modules/typebox/build/guard/emit.mjs +2 -2
- package/node_modules/typebox/build/guard/guard.d.mts +7 -5
- package/node_modules/typebox/build/guard/guard.mjs +14 -9
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
- package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
- package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
- package/node_modules/typebox/build/schema/build.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
- package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
- package/node_modules/typebox/build/schema/parse.mjs +3 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
- package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
- package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
- package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
- package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
- package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
- package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +3 -1
- package/package.json +6 -6
- package/dist/.setup/doctor-BPb-SjdE.mjs +0 -65
- package/dist/.setup/group-config-path-BGyzT9Lg.mjs +0 -54
- package/dist/.setup/normalize-DdsROMMa.mjs +0 -2
- package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
- package/dist/.setup/runtime-group-policy-DeSRFXEV.mjs +0 -11
- package/dist/.setup/setup-plugin-api-2wUapweU.mjs +0 -3
- package/dist/.setup/text-runtime-CHl0iPYe.mjs +0 -4
- package/node_modules/audio-decode/.eslintrc.json +0 -43
- package/node_modules/audio-decode/.github/workflows/test.js.yml +0 -31
- package/node_modules/audio-decode/.travis.yml +0 -13
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/README.md +0 -293
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +0 -11646
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/index.js +0 -8
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +0 -58
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoder.js +0 -253
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +0 -77
- package/node_modules/audio-decode/node_modules/audio-buffer/.eslintrc.json +0 -44
- package/node_modules/audio-decode/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
- package/node_modules/audio-decode/node_modules/audio-buffer/.travis.yml +0 -7
- package/node_modules/audio-decode/node_modules/audio-buffer/index.js +0 -76
- package/node_modules/audio-decode/node_modules/audio-buffer/package.json +0 -37
- package/node_modules/audio-decode/node_modules/audio-buffer/readme.md +0 -56
- package/node_modules/audio-decode/node_modules/node-wav/README.md +0 -35
- package/node_modules/audio-decode/node_modules/node-wav/file.wav +0 -0
- package/node_modules/audio-decode/node_modules/node-wav/index.js +0 -291
- package/node_modules/audio-decode/node_modules/node-wav/package.json +0 -29
- package/node_modules/audio-decode/node_modules/node-wav/tests/file1.wav +0 -0
- package/node_modules/audio-decode/node_modules/node-wav/tests/test.js +0 -66
- package/node_modules/audio-decode/node_modules/node-wav/x.js +0 -12
- package/node_modules/audio-decode/node_modules/node-wav/x.json +0 -86702
- package/node_modules/audio-decode/node_modules/node-wav/x.js~ +0 -13
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +0 -320
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +0 -232
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/index.js +0 -8
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +0 -74
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +0 -226
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/ogg-opus-decoder/types.d.ts +0 -37
- package/node_modules/audio-decode/node_modules/opus-decoder/README.md +0 -265
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +0 -232
- package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +0 -1
- package/node_modules/audio-decode/node_modules/opus-decoder/index.js +0 -8
- package/node_modules/audio-decode/node_modules/opus-decoder/package.json +0 -56
- package/node_modules/audio-decode/node_modules/opus-decoder/src/EmscriptenWasm.js +0 -0
- package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoder.js +0 -239
- package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoderWebWorker.js +0 -17
- package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +0 -74
- package/node_modules/audio-decode/readme.md +0 -49
- package/node_modules/audio-decode/tea.yaml +0 -6
- package/node_modules/audio-decode/test-case.js +0 -11
- package/node_modules/audio-decode/test.html +0 -15
- package/node_modules/audio-decode/test.js +0 -107
- /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import OggOpusDecoder from "./src/OggOpusDecoder.js";
|
|
2
|
-
import OggOpusDecoderWebWorker from "./src/OggOpusDecoderWebWorker.js";
|
|
3
|
-
import { assignNames } from "@wasm-audio-decoders/common";
|
|
4
|
-
|
|
5
|
-
assignNames(OggOpusDecoder, "OggOpusDecoder");
|
|
6
|
-
assignNames(OggOpusDecoderWebWorker, "OggOpusDecoderWebWorker");
|
|
7
|
-
|
|
8
|
-
export { OggOpusDecoder, OggOpusDecoderWebWorker };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ogg-opus-decoder",
|
|
3
|
-
"version": "1.7.5",
|
|
4
|
-
"description": "Web Assembly streaming Ogg Opus decoder",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
"types": "./types.d.ts",
|
|
9
|
-
"default": "./index.js"
|
|
10
|
-
},
|
|
11
|
-
"sideEffects": false,
|
|
12
|
-
"types": "types.d.ts",
|
|
13
|
-
"files": [
|
|
14
|
-
"index.js",
|
|
15
|
-
"types.d.ts",
|
|
16
|
-
"src/EmscriptenWasm.js",
|
|
17
|
-
"src/OggOpusDecoder.js",
|
|
18
|
-
"src/OggOpusDecoderWebWorker.js",
|
|
19
|
-
"dist/ogg-opus-decoder.min.js",
|
|
20
|
-
"dist/ogg-opus-decoder.min.js.map",
|
|
21
|
-
"dist/ogg-opus-decoder.opus-ml.min.js",
|
|
22
|
-
"dist/ogg-opus-decoder.opus-ml.min.js.map"
|
|
23
|
-
],
|
|
24
|
-
"keywords": [
|
|
25
|
-
"Opus",
|
|
26
|
-
"audio",
|
|
27
|
-
"decoder",
|
|
28
|
-
"multichannel",
|
|
29
|
-
"surround",
|
|
30
|
-
"stream",
|
|
31
|
-
"streams",
|
|
32
|
-
"libopus",
|
|
33
|
-
"libopusfile",
|
|
34
|
-
"Ogg Opus",
|
|
35
|
-
"Web Assembly",
|
|
36
|
-
"Wasm",
|
|
37
|
-
"Web Worker"
|
|
38
|
-
],
|
|
39
|
-
"author": {
|
|
40
|
-
"name": "Ethan Halsall",
|
|
41
|
-
"email": "ethanhalsall@pm.me"
|
|
42
|
-
},
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/eshaz/wasm-audio-decoders/issues"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/eshaz/wasm-audio-decoders/tree/main/src/ogg-opus-decoder",
|
|
48
|
-
"repository": {
|
|
49
|
-
"type": "git",
|
|
50
|
-
"url": "git+https://github.com/eshaz/wasm-audio-decoders.git",
|
|
51
|
-
"directory": "src/ogg-opus-decoder"
|
|
52
|
-
},
|
|
53
|
-
"funding": {
|
|
54
|
-
"type": "individual",
|
|
55
|
-
"url": "https://github.com/sponsors/eshaz"
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"build": "rm -f ./dist/* && webpack",
|
|
59
|
-
"build:analyze": "rm -f ./dist/* && webpack --profile --json > ./dist/stats.json && webpack-bundle-analyzer ./dist/stats.json"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
63
|
-
"terser-webpack-plugin": "^5.6.1",
|
|
64
|
-
"webpack": "^5.110.1",
|
|
65
|
-
"webpack-bundle-analyzer": "^5.3.2",
|
|
66
|
-
"webpack-cli": "^7.2.2"
|
|
67
|
-
},
|
|
68
|
-
"dependencies": {
|
|
69
|
-
"@wasm-audio-decoders/common": "9.0.7",
|
|
70
|
-
"@wasm-audio-decoders/opus-ml": "0.0.3",
|
|
71
|
-
"codec-parser": "2.5.0",
|
|
72
|
-
"opus-decoder": "0.7.12"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { WASMAudioDecoderCommon } from "@wasm-audio-decoders/common";
|
|
2
|
-
import { OpusDecoder, OpusDecoderWebWorker } from "opus-decoder";
|
|
3
|
-
import CodecParser, {
|
|
4
|
-
codecFrames,
|
|
5
|
-
header,
|
|
6
|
-
channels,
|
|
7
|
-
streamCount,
|
|
8
|
-
coupledStreamCount,
|
|
9
|
-
channelMappingTable,
|
|
10
|
-
preSkip,
|
|
11
|
-
isLastPage,
|
|
12
|
-
absoluteGranulePosition,
|
|
13
|
-
data,
|
|
14
|
-
totalSamples,
|
|
15
|
-
} from "codec-parser";
|
|
16
|
-
|
|
17
|
-
// prettier-ignore
|
|
18
|
-
const simd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));
|
|
19
|
-
|
|
20
|
-
export default class OggOpusDecoder {
|
|
21
|
-
constructor(options = {}) {
|
|
22
|
-
this._sampleRate = options.sampleRate || 48000;
|
|
23
|
-
this._speechQualityEnhancement = options.speechQualityEnhancement;
|
|
24
|
-
this._forceStereo =
|
|
25
|
-
options.forceStereo !== undefined ? options.forceStereo : false;
|
|
26
|
-
|
|
27
|
-
this._onCodec = (codec) => {
|
|
28
|
-
if (codec !== "opus")
|
|
29
|
-
throw new Error(
|
|
30
|
-
"ogg-opus-decoder does not support this codec " + codec,
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// instantiate to create static properties
|
|
35
|
-
new WASMAudioDecoderCommon();
|
|
36
|
-
this._useMLDecoder = ["lace", "nolace"].includes(
|
|
37
|
-
this._speechQualityEnhancement,
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
this._decoderLibraryLoaded = this._loadDecoderLibrary();
|
|
41
|
-
this._ready = this._init();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_initDecoderClass() {
|
|
45
|
-
this._decoderClass = this._useMLDecoder
|
|
46
|
-
? this.OpusMLDecoder
|
|
47
|
-
: this.OpusDecoder;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async _loadDecoderLibrary() {
|
|
51
|
-
if (this._useMLDecoder) {
|
|
52
|
-
const simdSupported = await simd();
|
|
53
|
-
|
|
54
|
-
if (simdSupported) {
|
|
55
|
-
const { OpusMLDecoder, OpusMLDecoderWebWorker } = await import(
|
|
56
|
-
/* webpackChunkName: "opus-ml" */ "@wasm-audio-decoders/opus-ml"
|
|
57
|
-
);
|
|
58
|
-
this.OpusMLDecoder = OpusMLDecoder;
|
|
59
|
-
this.OpusMLDecoderWebWorker = OpusMLDecoderWebWorker;
|
|
60
|
-
} else {
|
|
61
|
-
console.warn(
|
|
62
|
-
`ogg-opus-decoder: This platform does not support WebAssembly SIMD; { speechQualityEnhancements: '${this._speechQualityEnhancement}' } has been disabled`,
|
|
63
|
-
);
|
|
64
|
-
this._useMLDecoder = false;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
this.OpusDecoder = OpusDecoder;
|
|
68
|
-
this.OpusDecoderWebWorker = OpusDecoderWebWorker;
|
|
69
|
-
|
|
70
|
-
this._initDecoderClass();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async _init() {
|
|
74
|
-
if (this._decoder) await this._decoder.free();
|
|
75
|
-
this._decoder = null;
|
|
76
|
-
this._decoderReady = null;
|
|
77
|
-
|
|
78
|
-
this._codecParser = new CodecParser("application/ogg", {
|
|
79
|
-
onCodec: this._onCodec,
|
|
80
|
-
enableFrameCRC32: false,
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
async _instantiateDecoder(header) {
|
|
85
|
-
this._totalSamplesDecoded = 0;
|
|
86
|
-
this._preSkip = header[preSkip];
|
|
87
|
-
this._channels = this._forceStereo ? 2 : header[channels];
|
|
88
|
-
|
|
89
|
-
await this._decoderLibraryLoaded;
|
|
90
|
-
|
|
91
|
-
this._decoder = new this._decoderClass({
|
|
92
|
-
channels: header[channels],
|
|
93
|
-
streamCount: header[streamCount],
|
|
94
|
-
coupledStreamCount: header[coupledStreamCount],
|
|
95
|
-
channelMappingTable: header[channelMappingTable],
|
|
96
|
-
preSkip: Math.round((this._preSkip / 48000) * this._sampleRate),
|
|
97
|
-
sampleRate: this._sampleRate,
|
|
98
|
-
speechQualityEnhancement: this._speechQualityEnhancement,
|
|
99
|
-
forceStereo: this._forceStereo,
|
|
100
|
-
});
|
|
101
|
-
return this._decoder.ready;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
get ready() {
|
|
105
|
-
return this._ready;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
async reset() {
|
|
109
|
-
this._ready = this._init();
|
|
110
|
-
await this._ready;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
free() {
|
|
114
|
-
if (this._decoder) this._decoder.free();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
async _decode(oggPages) {
|
|
118
|
-
let opusFrames = [],
|
|
119
|
-
allErrors = [],
|
|
120
|
-
allChannelData = [],
|
|
121
|
-
samplesThisDecode = 0;
|
|
122
|
-
|
|
123
|
-
const flushFrames = async () => {
|
|
124
|
-
if (opusFrames.length) {
|
|
125
|
-
await this._decoderReady;
|
|
126
|
-
|
|
127
|
-
const { channelData, samplesDecoded, errors } =
|
|
128
|
-
await this._decoder.decodeFrames(opusFrames);
|
|
129
|
-
|
|
130
|
-
allChannelData.push(channelData);
|
|
131
|
-
allErrors.push(...errors);
|
|
132
|
-
samplesThisDecode += samplesDecoded;
|
|
133
|
-
this._totalSamplesDecoded += samplesDecoded;
|
|
134
|
-
|
|
135
|
-
opusFrames = [];
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
for (let i = 0; i < oggPages.length; i++) {
|
|
140
|
-
const oggPage = oggPages[i];
|
|
141
|
-
|
|
142
|
-
// only decode Ogg pages that have codec frames
|
|
143
|
-
const frames = oggPage[codecFrames].map((f) => f[data]);
|
|
144
|
-
if (frames.length) {
|
|
145
|
-
opusFrames.push(...frames);
|
|
146
|
-
|
|
147
|
-
if (!this._decoderReady)
|
|
148
|
-
// wait until there is an Opus header before instantiating
|
|
149
|
-
this._decoderReady = this._instantiateDecoder(
|
|
150
|
-
oggPage[codecFrames][0][header],
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (oggPage[isLastPage]) {
|
|
155
|
-
// decode anything left in the current ogg file
|
|
156
|
-
await flushFrames();
|
|
157
|
-
|
|
158
|
-
// in cases where BigInt isn't supported, don't do any absoluteGranulePosition logic (i.e. old iOS versions)
|
|
159
|
-
if (
|
|
160
|
-
oggPage[absoluteGranulePosition] !== undefined &&
|
|
161
|
-
allChannelData.length
|
|
162
|
-
) {
|
|
163
|
-
const totalDecodedSamples_48000 =
|
|
164
|
-
(this._totalSamplesDecoded / this._sampleRate) * 48000;
|
|
165
|
-
|
|
166
|
-
// trim any extra samples that are decoded beyond the absoluteGranulePosition, relative to where we started in the stream
|
|
167
|
-
const samplesToTrim = Math.round(
|
|
168
|
-
((totalDecodedSamples_48000 - oggPage[totalSamples]) / 48000) *
|
|
169
|
-
this._sampleRate,
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
const channelData = allChannelData[allChannelData.length - 1];
|
|
173
|
-
if (samplesToTrim > 0) {
|
|
174
|
-
for (let i = 0; i < channelData.length; i++) {
|
|
175
|
-
channelData[i] = channelData[i].subarray(
|
|
176
|
-
0,
|
|
177
|
-
channelData[i].length - samplesToTrim,
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
samplesThisDecode -= samplesToTrim;
|
|
183
|
-
this._totalSamplesDecoded -= samplesToTrim;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// reached the end of an ogg stream, reset the decoder
|
|
187
|
-
await this.reset();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
await flushFrames();
|
|
192
|
-
|
|
193
|
-
return [
|
|
194
|
-
allErrors,
|
|
195
|
-
allChannelData,
|
|
196
|
-
this._channels,
|
|
197
|
-
samplesThisDecode,
|
|
198
|
-
this._sampleRate,
|
|
199
|
-
16,
|
|
200
|
-
];
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
async decode(oggOpusData) {
|
|
204
|
-
const decoded = await this._decode([
|
|
205
|
-
...this._codecParser.parseChunk(oggOpusData),
|
|
206
|
-
]);
|
|
207
|
-
|
|
208
|
-
return WASMAudioDecoderCommon.getDecodedAudioMultiChannel(...decoded);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
async decodeFile(oggOpusData) {
|
|
212
|
-
const decoded = await this._decode([
|
|
213
|
-
...this._codecParser.parseAll(oggOpusData),
|
|
214
|
-
]);
|
|
215
|
-
await this.reset();
|
|
216
|
-
|
|
217
|
-
return WASMAudioDecoderCommon.getDecodedAudioMultiChannel(...decoded);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
async flush() {
|
|
221
|
-
const decoded = await this._decode([...this._codecParser.flush()]);
|
|
222
|
-
await this.reset();
|
|
223
|
-
|
|
224
|
-
return WASMAudioDecoderCommon.getDecodedAudioMultiChannel(...decoded);
|
|
225
|
-
}
|
|
226
|
-
}
|
package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import OggOpusDecoder from "./OggOpusDecoder.js";
|
|
2
|
-
|
|
3
|
-
export default class OggOpusDecoderWebWorker extends OggOpusDecoder {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
_initDecoderClass() {
|
|
9
|
-
this._decoderClass = this._useMLDecoder
|
|
10
|
-
? this.OpusMLDecoderWebWorker
|
|
11
|
-
: this.OpusDecoderWebWorker;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async free() {
|
|
15
|
-
if (this._decoder) await this._decoder.free();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { DecodeError } from "@wasm-audio-decoders/common";
|
|
2
|
-
import { OpusMLSpeechQualityEnhancementOption } from "@wasm-audio-decoders/opus-ml";
|
|
3
|
-
|
|
4
|
-
export interface OggOpusDecodedAudio {
|
|
5
|
-
channelData: Float32Array[];
|
|
6
|
-
samplesDecoded: number;
|
|
7
|
-
sampleRate: 48000;
|
|
8
|
-
errors: DecodeError[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export class OggOpusDecoder {
|
|
12
|
-
public constructor(options?: {
|
|
13
|
-
forceStereo?: boolean;
|
|
14
|
-
speechQualityEnhancement?: OpusMLSpeechQualityEnhancementOption;
|
|
15
|
-
});
|
|
16
|
-
ready: Promise<void>;
|
|
17
|
-
reset: () => Promise<void>;
|
|
18
|
-
free: () => void;
|
|
19
|
-
decode: (data: Uint8Array) => OggOpusDecodedAudio;
|
|
20
|
-
decodeFile: (data: Uint8Array) => Promise<OggOpusDecodedAudio>;
|
|
21
|
-
flush: () => Promise<OggOpusDecodedAudio>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class OggOpusDecoderWebWorker {
|
|
25
|
-
public constructor(options?: {
|
|
26
|
-
forceStereo?: boolean;
|
|
27
|
-
speechQualityEnhancement?: OpusMLSpeechQualityEnhancementOption;
|
|
28
|
-
});
|
|
29
|
-
ready: Promise<void>;
|
|
30
|
-
reset: () => Promise<void>;
|
|
31
|
-
free: () => Promise<void>;
|
|
32
|
-
decode: (data: Uint8Array) => Promise<OggOpusDecodedAudio>;
|
|
33
|
-
decodeFile: (data: Uint8Array) => Promise<OggOpusDecodedAudio>;
|
|
34
|
-
flush: () => Promise<OggOpusDecodedAudio>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { DecodeError };
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
# `opus-decoder`
|
|
2
|
-
|
|
3
|
-
`opus-decoder` is a Web Assembly Opus audio decoder.
|
|
4
|
-
* 85.5 KiB minified bundle size
|
|
5
|
-
* Browser and NodeJS support
|
|
6
|
-
* Built in Web Worker support
|
|
7
|
-
* Multichannel decoding (up to 255 channels)
|
|
8
|
-
* Based on [`libopus`](https://github.com/xiph/opus)
|
|
9
|
-
|
|
10
|
-
This library is intended for users that already have Opus frames extracted from a container, i.e. (Ogg, Matroska (WEBM), or ISOBMFF (mp4)). See [`ogg-opus-decoder`](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/ogg-opus-decoder) if you have an Ogg Opus file to decode.
|
|
11
|
-
|
|
12
|
-
See the [homepage](https://github.com/eshaz/wasm-audio-decoders) of this repository for more Web Assembly audio decoders like this one.
|
|
13
|
-
|
|
14
|
-
### [Checkout the demo here](https://eshaz.github.io/wasm-audio-decoders/)
|
|
15
|
-
|
|
16
|
-
## Installing
|
|
17
|
-
* Install from [NPM](https://www.npmjs.com/package/opus-decoder).
|
|
18
|
-
|
|
19
|
-
Run `npm i opus-decoder`
|
|
20
|
-
|
|
21
|
-
```javascript
|
|
22
|
-
import { OpusDecoder } from 'opus-decoder';
|
|
23
|
-
|
|
24
|
-
const decoder = new OpusDecoder();
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
* Or download the [build](https://github.com/eshaz/wasm-audio-decoders/tree/main/src/opus-decoder/dist) and include it as a script.
|
|
28
|
-
```html
|
|
29
|
-
<script src="opus-decoder.min.js" charset="UTF-8"></script>
|
|
30
|
-
<script>
|
|
31
|
-
const decoder = new window["opus-decoder"].OpusDecoder();
|
|
32
|
-
</script>
|
|
33
|
-
```
|
|
34
|
-
* Note that the script must be read using UTF-8 character encoding. If running in a browser, the `<script>` tag must include the `charset="UTF-8"` attribute; or, the loading HTML must include `<meta charset="utf-8" />`.
|
|
35
|
-
|
|
36
|
-
## Usage
|
|
37
|
-
|
|
38
|
-
1. Create a new instance and wait for the WASM to finish compiling. Decoding can be done on the main thread synchronously, or in a webworker asynchronously.
|
|
39
|
-
|
|
40
|
-
**Main thread synchronous decoding**
|
|
41
|
-
```javascript
|
|
42
|
-
import { OpusDecoder } from 'opus-decoder';
|
|
43
|
-
|
|
44
|
-
const decoder = new OpusDecoder();
|
|
45
|
-
|
|
46
|
-
// wait for the WASM to be compiled
|
|
47
|
-
await decoder.ready;
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
**Web Worker asynchronous decoding**
|
|
51
|
-
```javascript
|
|
52
|
-
import { OpusDecoderWebWorker } from 'opus-decoder';
|
|
53
|
-
|
|
54
|
-
const decoder = new OpusDecoderWebWorker();
|
|
55
|
-
|
|
56
|
-
// wait for the WASM to be compiled
|
|
57
|
-
await decoder.ready;
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
1. Begin decoding Opus frames.
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
// Decode an individual Opus frame
|
|
64
|
-
const {channelData, samplesDecoded, sampleRate} = decoder.decodeFrame(opusFrame);
|
|
65
|
-
|
|
66
|
-
// Decode an array of individual Opus frames
|
|
67
|
-
const {channelData, samplesDecoded, sampleRate} = decoder.decodeFrames(opusFrameArray);
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
1. When done decoding, reset the decoder to decode a new stream, or free up the memory being used by the WASM module if you have no more audio to decode.
|
|
71
|
-
|
|
72
|
-
```javascript
|
|
73
|
-
// `reset()` clears the decoder state and allows you do decode a new stream of Opus frames.
|
|
74
|
-
await decoder.reset();
|
|
75
|
-
|
|
76
|
-
// `free()` de-allocates the memory used by the decoder. You will need to create a new instance after calling `free()` to start decoding again.
|
|
77
|
-
decoder.free();
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## API
|
|
81
|
-
Decoded audio is always returned in the below structure.
|
|
82
|
-
|
|
83
|
-
```javascript
|
|
84
|
-
{
|
|
85
|
-
channelData: [
|
|
86
|
-
leftAudio, // Float32Array of PCM samples for the left channel
|
|
87
|
-
rightAudio, // Float32Array of PCM samples for the right channel
|
|
88
|
-
... // additional channels
|
|
89
|
-
],
|
|
90
|
-
samplesDecoded: 1234, // number of PCM samples that were decoded per channel
|
|
91
|
-
sampleRate: 48000, // sample rate of the decoded PCM
|
|
92
|
-
errors: [ // array containing descriptions for any decode errors
|
|
93
|
-
{
|
|
94
|
-
message: "libopus -4 OPUS_INVALID_PACKET: The compressed data passed is corrupted",
|
|
95
|
-
frameLength: 400, // length of the frame or data in bytes that encountered an error
|
|
96
|
-
frameNumber: 21, // position of error relative to total frames decoded
|
|
97
|
-
inputBytes: 4905, // position of error relative to total input bytes
|
|
98
|
-
outputSamples: 18888, // position of error relative to total output samples
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Each Float32Array within `channelData` can be used directly in the WebAudio API for playback.
|
|
105
|
-
|
|
106
|
-
Decoding will proceed through any errors. Any errors encountered may result in gaps in the decoded audio.
|
|
107
|
-
|
|
108
|
-
### Multichannel Output
|
|
109
|
-
|
|
110
|
-
Each channel is assigned to a speaker location in a conventional surround arrangement. Specific locations depend on the number of channels, and are given below in order of the corresponding channel indices. This set of surround options and speaker location orderings is the same as those used by the Vorbis codec.
|
|
111
|
-
|
|
112
|
-
* 1 channel: monophonic (mono).
|
|
113
|
-
* 2 channels: stereo (left, right).
|
|
114
|
-
* 3 channels: linear surround (left, center, right).
|
|
115
|
-
* 4 channels: quadraphonic (front left, front right, rear left, rear right).
|
|
116
|
-
* 5 channels: 5.0 surround (front left, front center, front right, rear left, rear right).
|
|
117
|
-
* 6 channels: 5.1 surround (front left, front center, front right, rear left, rear right, LFE).
|
|
118
|
-
* 7 channels: 6.1 surround (front left, front center, front right, side left, side right, rear center, LFE).
|
|
119
|
-
* 8 channels: 7.1 surround (front left, front center, front right, side left, side right, rear left, rear right, LFE).
|
|
120
|
-
* 9-255 channels: No mapping is defined.
|
|
121
|
-
|
|
122
|
-
See: https://datatracker.ietf.org/doc/html/rfc7845.html#section-5.1.1.2
|
|
123
|
-
|
|
124
|
-
Each Float32Array within `channelData` can be used directly in the WebAudio API for playback.
|
|
125
|
-
|
|
126
|
-
## `OpusDecoder`
|
|
127
|
-
|
|
128
|
-
Class that decodes Opus frames synchronously on the main thread.
|
|
129
|
-
|
|
130
|
-
### Options
|
|
131
|
-
```javascript
|
|
132
|
-
const decoder = new OpusDecoder({
|
|
133
|
-
forceStereo: false,
|
|
134
|
-
sampleRate: 48000,
|
|
135
|
-
preSkip: 0,
|
|
136
|
-
channels: 2,
|
|
137
|
-
streamCount: 1,
|
|
138
|
-
coupledStreamCount: 1,
|
|
139
|
-
channelMappingTable: [0, 1]
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
#### **The below options should be obtained from the Opus Header.**
|
|
144
|
-
See this [documentation](https://wiki.xiph.org/OggOpus#ID_Header) on the Opus header for more information. If you don't have access to the Opus header, the default values will successfully decode most stereo Opus streams.
|
|
145
|
-
|
|
146
|
-
* `forceStereo` *optional, defaults to `false`*
|
|
147
|
-
* Set to `true` to force stereo output when decoding mono or multichannel Ogg Opus.
|
|
148
|
-
* If there are more than 8 channels, this option is ignored.
|
|
149
|
-
* `preSkip` *optional, defaults to `0`*
|
|
150
|
-
* Number of samples to skip at the beginning reported by the Opus header.
|
|
151
|
-
* `sampleRate` *optional, defaults to `48000`*
|
|
152
|
-
* Sample rate the decoder will output.
|
|
153
|
-
* Valid sample rates: `8000, 12000, 16000, 24000, or 48000`
|
|
154
|
-
#### ***Required for Multichannel Decoding.** (Channel Mapping Family >= 1)*
|
|
155
|
-
* `channels` *optional, defaults to `2`*
|
|
156
|
-
* Number of channels reported by the Opus header.
|
|
157
|
-
* `streamCount` *optional, defaults to `1`*
|
|
158
|
-
* Number of streams reported by the Opus header.
|
|
159
|
-
* `coupledStreamCount` *optional, defaults to: `1` when 2 channels, `0` when 1 channel*
|
|
160
|
-
* Number of coupled streams reported by the Opus header.
|
|
161
|
-
* `channelMappingTable` *optional, defaults to `[0, 1]` when 2 channels, `[0]` when 1 channel*
|
|
162
|
-
* Channel mapping reported by the Opus header.
|
|
163
|
-
|
|
164
|
-
### Getters
|
|
165
|
-
* `decoder.ready` *async*
|
|
166
|
-
* Returns a promise that is resolved when the WASM is compiled and ready to use.
|
|
167
|
-
|
|
168
|
-
### Methods
|
|
169
|
-
|
|
170
|
-
* `decoder.decodeFrame(opusFrame)`
|
|
171
|
-
* `opusFrame` Uint8Array containing a single Opus frame.
|
|
172
|
-
* Returns decoded audio.
|
|
173
|
-
* `decoder.decodeFrames(opusFrames)`
|
|
174
|
-
* `opusFrames` Array of Uint8Arrays containing Opus frames.
|
|
175
|
-
* Returns decoded audio.
|
|
176
|
-
* `decoder.reset()` *async*
|
|
177
|
-
* Resets the decoder so that a new stream of Opus frames can be decoded.
|
|
178
|
-
* `decoder.free()`
|
|
179
|
-
* De-allocates the memory used by the decoder.
|
|
180
|
-
* After calling `free()`, the current instance is made unusable, and a new instance will need to be created to decode additional Opus frames.
|
|
181
|
-
|
|
182
|
-
## `OpusDecoderWebWorker`
|
|
183
|
-
|
|
184
|
-
Class that decodes Opus frames asynchronously within a web worker. Decoding is performed in a separate, non-blocking thread. Each new instance spawns a new worker allowing you to run multiple workers for concurrent decoding of multiple streams.
|
|
185
|
-
|
|
186
|
-
### Options
|
|
187
|
-
```javascript
|
|
188
|
-
const decoder = new OpusDecoderWebWorker({
|
|
189
|
-
forceStereo: false,
|
|
190
|
-
sampleRate: 48000,
|
|
191
|
-
channels: 2,
|
|
192
|
-
streamCount: 1,
|
|
193
|
-
coupledStreamCount: 1,
|
|
194
|
-
channelMappingTable: [0, 1]
|
|
195
|
-
});
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
#### **The below options should be obtained from the Opus Header.**
|
|
199
|
-
See this [documentation](https://wiki.xiph.org/OggOpus#ID_Header) on the Opus header for more information. If you don't have access to the Opus header, the default values will successfully decode most stereo Opus streams.
|
|
200
|
-
|
|
201
|
-
* `forceStereo` *optional, defaults to `false`*
|
|
202
|
-
* Set to `true` to force stereo output when decoding mono or multichannel Ogg Opus.
|
|
203
|
-
* If there are more than 8 channels, this option is ignored.
|
|
204
|
-
* `preSkip` *optional, defaults to `0`*
|
|
205
|
-
* Number of samples to skip at the beginning reported by the Opus header.
|
|
206
|
-
* `sampleRate` *optional, defaults to `48000`*
|
|
207
|
-
* Sample rate the decoder will output.
|
|
208
|
-
* Valid sample rates: `8000, 12000, 16000, 24000, or 48000`
|
|
209
|
-
#### ***Required for Multichannel Decoding.** (Channel Mapping Family >= 1)*
|
|
210
|
-
* `channels` *optional, defaults to `2`*
|
|
211
|
-
* Number of channels reported by the Opus header.
|
|
212
|
-
* `streamCount` *optional, defaults to `1`*
|
|
213
|
-
* Number of streams reported by the Opus header.
|
|
214
|
-
* `coupledStreamCount` *optional, defaults to: `1` when 2 channels, `0` when 1 channel*
|
|
215
|
-
* Number of coupled streams reported by the Opus header.
|
|
216
|
-
* `channelMappingTable` *optional, defaults to `[0, 1]` when 2 channels, `[0]` when 1 channel*
|
|
217
|
-
* Channel mapping reported by the Opus header.
|
|
218
|
-
### Getters
|
|
219
|
-
* `decoder.ready` *async*
|
|
220
|
-
* Returns a promise that is resolved when the WASM is compiled and ready to use.
|
|
221
|
-
|
|
222
|
-
### Methods
|
|
223
|
-
|
|
224
|
-
* `decoder.decodeFrame(opusFrame)` *async*
|
|
225
|
-
* `opusFrame` Uint8Array containing a single Opus frame.
|
|
226
|
-
* Returns a promise that resolves with the decoded audio.
|
|
227
|
-
* `decoder.decodeFrames(opusFrames)` *async*
|
|
228
|
-
* `opusFrames` Array of Uint8Arrays containing Opus frames.
|
|
229
|
-
* Returns a promise that resolves with the decoded audio.
|
|
230
|
-
* `decoder.reset()` *async*
|
|
231
|
-
* Resets the decoder so that a new stream of Opus frames can be decoded.
|
|
232
|
-
* `decoder.free()` *async*
|
|
233
|
-
* De-allocates the memory used by the decoder and terminates the web worker.
|
|
234
|
-
* After calling `free()`, the current instance is made unusable, and a new instance will need to be created to decode additional Opus frames.
|
|
235
|
-
|
|
236
|
-
### Properly using the Web Worker interface
|
|
237
|
-
|
|
238
|
-
`OpusDecoderWebWorker` uses async functions to send operations to the web worker without blocking the main thread. To fully take advantage of the concurrency provided by web workers, your code should avoid using `await` on decode operations where it will block the main thread.
|
|
239
|
-
|
|
240
|
-
Each method call on a `OpusDecoderWebWorker` instance will queue up an operation to the web worker. Operations will complete within the web worker thread one at a time and in the same order in which the methods were called.
|
|
241
|
-
|
|
242
|
-
* **Good** Main thread is not blocked during each decode operation. The example `playAudio` function is called when each decode operation completes. Also, the next decode operation can begin while `playAudio` is doing work on the main thread.
|
|
243
|
-
```javascript
|
|
244
|
-
const playAudio = ({ channelData, samplesDecoded, sampleRate }) => {
|
|
245
|
-
// does something to play the audio data.
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
decoder.decodeFrame(frameData1).then(playAudio);
|
|
249
|
-
decoder.decodeFrame(frameData2).then(playAudio);
|
|
250
|
-
decoder.decodeFrame(frameData3).then(playAudio);
|
|
251
|
-
|
|
252
|
-
// do some other operations while the audio is decoded
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
* **Bad** Main thread is being blocked by `await` during each decode operation. Synchronous code is halted while decoding completes, negating the benefits of using a webworker.
|
|
256
|
-
```javascript
|
|
257
|
-
const decoded1 = await decoder.decodeFrame(frameData1); // blocks the main thread
|
|
258
|
-
playAudio(decoded1);
|
|
259
|
-
|
|
260
|
-
const decoded2 = await decoder.decodeFrame(frameData2); // blocks the main thread
|
|
261
|
-
playAudio(decoded2);
|
|
262
|
-
|
|
263
|
-
const decoded3 = await decoder.decodeFrame(frameData3); // blocks the main thread
|
|
264
|
-
playAudio(decoded3);
|
|
265
|
-
```
|