@openclaw/whatsapp 2026.9.6 → 2026.9.8

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.
Files changed (354) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/{accounts-D_NGDjCx.mjs → accounts-CtRPAQCL.mjs} +3 -9
  3. package/dist/.setup/{action-runtime-DZZFamfl.mjs → action-runtime-DeVk5V7r.mjs} +2 -2
  4. package/dist/.setup/{approval-handler.runtime-C0hzmMSj.mjs → approval-handler.runtime-CjqMlPOX.mjs} +6 -26
  5. package/dist/.setup/{approval-reactions-BnXw-UZI.mjs → approval-reactions-DiOFvb1s.mjs} +8 -14
  6. package/dist/.setup/{auth-store-Dh8a3cba.mjs → auth-store-BBonwKks.mjs} +9 -33
  7. package/dist/.setup/{channel-Bg_fS2iF.mjs → channel-CJFE0kD_.mjs} +82 -154
  8. package/dist/.setup/{channel-react-action-1iBiEnq7.mjs → channel-react-action-2r_hjLZV.mjs} +4 -8
  9. package/dist/.setup/{channel.runtime-rurG-kbr.mjs → channel.runtime-C94goLw9.mjs} +4 -4
  10. package/dist/.setup/{channel.setup-C8P5q8uD.mjs → channel.setup-CfN1UfdY.mjs} +1 -1
  11. package/dist/.setup/{connection-controller-C60mU7j7.mjs → connection-controller-CHo1oRJA.mjs} +13 -63
  12. package/dist/.setup/{creds-files-Drg3usj1.mjs → creds-files-CDATZWWM.mjs} +5 -11
  13. package/dist/.setup/{directory-config-BHPoBklt.mjs → directory-config-DUiJ5d8I.mjs} +13 -14
  14. package/dist/.setup/doctor-iMwg0Vhr.mjs +222 -0
  15. package/dist/.setup/group-config-path-DZr3ucUO.mjs +40 -0
  16. package/dist/.setup/{group-session-key-D22hYMdE.mjs → group-session-key-2-mja4OF.mjs} +3 -9
  17. package/dist/.setup/{login-2dmd1TfE.mjs → login-BFlvSh9h.mjs} +9 -11
  18. package/dist/.setup/{login-qr-CgKtO_ef.mjs → login-qr-Ayb8i25J.mjs} +29 -77
  19. package/dist/.setup/{monitor-By82ehLA.mjs → monitor-CGpV2VNN.mjs} +376 -504
  20. package/dist/.setup/{question-reactions-D3Zq9Gbn.mjs → question-reactions-CPyyi5AY.mjs} +2 -2
  21. package/dist/.setup/rolldown-runtime-BBjsoOtd.mjs +27 -0
  22. package/dist/.setup/{send-C6jDmcL9.mjs → send-BGdvf5cC.mjs} +31 -80
  23. package/dist/.setup/{send-api-B4DOt2RJ.mjs → send-api-H4AkQJjT.mjs} +45 -109
  24. package/dist/.setup/{session-errors-JuazczrA.mjs → session-errors-B8UcAnZN.mjs} +1 -4
  25. package/dist/.setup/{session.runtime-DcJuO42v.mjs → session.runtime-st1konFI.mjs} +1 -1
  26. package/dist/.setup/{setup-finalize-pGqWOiFX.mjs → setup-finalize-DmPX4EaW.mjs} +32 -70
  27. package/dist/.setup/setup-plugin-api-vJlxKzca.mjs +3 -0
  28. package/dist/.setup/{setup-surface-B9CYwDPZ.mjs → setup-surface-43fj197P.mjs} +3 -3
  29. package/dist/.setup/{shared-DVgQ8kRG.mjs → shared-DgOG5Iqr.mjs} +26 -37
  30. package/dist/.setup/{socket-close-CCVSFufF.mjs → socket-close-CT__V2fz.mjs} +80 -92
  31. package/dist/.setup/{targets-runtime-RBjx3pg_.mjs → targets-runtime-DmiqXIXO.mjs} +2 -7
  32. package/dist/action-runtime-api.js +1 -1
  33. package/dist/action-runtime.runtime.js +1 -1
  34. package/dist/agent-tools-api.js +5 -12
  35. package/dist/api.js +10 -10
  36. package/dist/auth-presence.js +1 -1
  37. package/dist/channel-plugin-api.js +1 -1
  38. package/dist/contract-api.js +2 -2
  39. package/dist/directory-contract-api.js +1 -1
  40. package/dist/doctor-contract-api.js +9 -10
  41. package/dist/light-runtime-api.js +2 -2
  42. package/dist/login-qr-runtime.js +1 -1
  43. package/dist/runtime-api.js +9 -9
  44. package/dist/setup-entry.js +1 -1
  45. package/dist/setup-plugin-api.js +1 -1
  46. package/node_modules/audio-decode/LICENSE +9 -10
  47. package/node_modules/audio-decode/README.md +16 -0
  48. package/node_modules/audio-decode/audio-decode.d.ts +2 -14
  49. package/node_modules/audio-decode/audio-decode.js +4 -92
  50. package/node_modules/audio-decode/meta.js +1 -0
  51. package/node_modules/audio-decode/node_modules/{audio-buffer → @audio/decode}/LICENSE +1 -1
  52. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.d.ts +52 -0
  53. package/node_modules/audio-decode/node_modules/@audio/decode/audio-decode.js +242 -0
  54. package/node_modules/audio-decode/node_modules/@audio/decode/meta.js +14 -0
  55. package/node_modules/audio-decode/node_modules/@audio/decode/package.json +114 -0
  56. package/node_modules/audio-decode/node_modules/@audio/decode/readme.md +191 -0
  57. package/node_modules/audio-decode/node_modules/@audio/decode/stream.d.ts +12 -0
  58. package/node_modules/audio-decode/node_modules/@audio/decode/stream.js +1 -0
  59. package/node_modules/audio-decode/node_modules/@audio/decode/test.html +52 -0
  60. package/node_modules/audio-decode/node_modules/@audio/decode-aac/LICENSE +9 -0
  61. package/node_modules/audio-decode/node_modules/@audio/decode-aac/README.md +80 -0
  62. package/node_modules/audio-decode/node_modules/@audio/decode-aac/alac.js +326 -0
  63. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.d.ts +15 -0
  64. package/node_modules/audio-decode/node_modules/@audio/decode-aac/audio.js +10 -0
  65. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.d.ts +24 -0
  66. package/node_modules/audio-decode/node_modules/@audio/decode-aac/decode-aac.js +452 -0
  67. package/node_modules/audio-decode/node_modules/@audio/decode-aac/meta.js +81 -0
  68. package/node_modules/audio-decode/node_modules/@audio/decode-aac/package.json +63 -0
  69. package/node_modules/audio-decode/node_modules/@audio/decode-aac/src/aac.wasm.js +0 -0
  70. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE +12 -0
  71. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/LICENSE.liba52 +340 -0
  72. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/README.md +41 -0
  73. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.d.ts +15 -0
  74. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/audio.js +9 -0
  75. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.d.ts +20 -0
  76. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/decode-ac3.js +131 -0
  77. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/package.json +64 -0
  78. package/node_modules/audio-decode/node_modules/@audio/decode-ac3/src/ac3.wasm.js +0 -0
  79. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/LICENSE +21 -0
  80. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/README.md +46 -0
  81. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.d.ts +15 -0
  82. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/audio.js +10 -0
  83. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.d.ts +16 -0
  84. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/decode-aiff.js +583 -0
  85. package/node_modules/audio-decode/node_modules/@audio/decode-aiff/package.json +52 -0
  86. package/node_modules/audio-decode/node_modules/@audio/decode-amr/LICENSE +191 -0
  87. package/node_modules/audio-decode/node_modules/@audio/decode-amr/README.md +65 -0
  88. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.d.ts +15 -0
  89. package/node_modules/audio-decode/node_modules/@audio/decode-amr/audio.js +10 -0
  90. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.d.ts +16 -0
  91. package/node_modules/audio-decode/node_modules/@audio/decode-amr/decode-amr.js +150 -0
  92. package/node_modules/audio-decode/node_modules/@audio/decode-amr/package.json +58 -0
  93. package/node_modules/audio-decode/node_modules/@audio/decode-amr/src/amr.wasm.js +0 -0
  94. package/node_modules/audio-decode/node_modules/@audio/decode-avi/LICENSE +21 -0
  95. package/node_modules/audio-decode/node_modules/@audio/decode-avi/README.md +53 -0
  96. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.d.ts +15 -0
  97. package/node_modules/audio-decode/node_modules/@audio/decode-avi/audio.js +9 -0
  98. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.d.ts +21 -0
  99. package/node_modules/audio-decode/node_modules/@audio/decode-avi/decode-avi.js +241 -0
  100. package/node_modules/audio-decode/node_modules/@audio/decode-avi/package.json +66 -0
  101. package/node_modules/audio-decode/node_modules/@audio/decode-caf/LICENSE +21 -0
  102. package/node_modules/audio-decode/node_modules/@audio/decode-caf/README.md +48 -0
  103. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.d.ts +15 -0
  104. package/node_modules/audio-decode/node_modules/@audio/decode-caf/audio.js +10 -0
  105. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.d.ts +16 -0
  106. package/node_modules/audio-decode/node_modules/@audio/decode-caf/decode-caf.js +238 -0
  107. package/node_modules/audio-decode/node_modules/@audio/decode-caf/package.json +53 -0
  108. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/LICENSE +21 -0
  109. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/README.md +73 -0
  110. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.d.ts +21 -0
  111. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/audio.js +15 -0
  112. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.d.ts +29 -0
  113. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/decode-dsd.js +423 -0
  114. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/meta.js +40 -0
  115. package/node_modules/audio-decode/node_modules/@audio/decode-dsd/package.json +64 -0
  116. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE +12 -0
  117. package/node_modules/audio-decode/node_modules/@audio/decode-dts/LICENSE.libdca +339 -0
  118. package/node_modules/audio-decode/node_modules/@audio/decode-dts/README.md +41 -0
  119. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.d.ts +15 -0
  120. package/node_modules/audio-decode/node_modules/@audio/decode-dts/audio.js +9 -0
  121. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.d.ts +20 -0
  122. package/node_modules/audio-decode/node_modules/@audio/decode-dts/decode-dts.js +139 -0
  123. package/node_modules/audio-decode/node_modules/@audio/decode-dts/package.json +64 -0
  124. package/node_modules/audio-decode/node_modules/@audio/decode-dts/src/dts.wasm.js +0 -0
  125. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE +12 -0
  126. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/LICENSE.ffmpeg +502 -0
  127. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/README.md +45 -0
  128. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.d.ts +15 -0
  129. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/audio.js +9 -0
  130. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.d.ts +20 -0
  131. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/decode-eac3.js +124 -0
  132. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/package.json +68 -0
  133. package/node_modules/audio-decode/node_modules/@audio/decode-eac3/src/eac3.wasm.js +0 -0
  134. package/node_modules/audio-decode/node_modules/@audio/decode-flac/LICENSE +25 -0
  135. package/node_modules/audio-decode/node_modules/@audio/decode-flac/README.md +23 -0
  136. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.d.ts +15 -0
  137. package/node_modules/audio-decode/node_modules/@audio/decode-flac/audio.js +10 -0
  138. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.d.ts +18 -0
  139. package/node_modules/audio-decode/node_modules/@audio/decode-flac/decode-flac.js +3172 -0
  140. package/node_modules/audio-decode/node_modules/@audio/decode-flac/meta.js +115 -0
  141. package/node_modules/audio-decode/node_modules/@audio/decode-flac/package.json +60 -0
  142. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE +23 -0
  143. package/node_modules/audio-decode/node_modules/@audio/decode-mod/LICENSE.libopenmpt +25 -0
  144. package/node_modules/audio-decode/node_modules/@audio/decode-mod/README.md +86 -0
  145. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.d.ts +20 -0
  146. package/node_modules/audio-decode/node_modules/@audio/decode-mod/audio.js +12 -0
  147. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.d.ts +58 -0
  148. package/node_modules/audio-decode/node_modules/@audio/decode-mod/decode-mod.js +148 -0
  149. package/node_modules/audio-decode/node_modules/@audio/decode-mod/package.json +68 -0
  150. package/node_modules/audio-decode/node_modules/@audio/decode-mod/src/mod.wasm.js +0 -0
  151. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/LICENSE +25 -0
  152. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/README.md +20 -0
  153. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.d.ts +15 -0
  154. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/audio.js +10 -0
  155. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.d.ts +16 -0
  156. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/decode-mp3.js +793 -0
  157. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/meta.js +143 -0
  158. package/node_modules/audio-decode/node_modules/@audio/decode-mp3/package.json +60 -0
  159. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/LICENSE +21 -0
  160. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/README.md +58 -0
  161. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.d.ts +15 -0
  162. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/audio.js +9 -0
  163. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.d.ts +21 -0
  164. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/decode-mp4.js +455 -0
  165. package/node_modules/audio-decode/node_modules/@audio/decode-mp4/package.json +74 -0
  166. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE +31 -0
  167. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/LICENSE.libmpcdec +31 -0
  168. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/README.md +60 -0
  169. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.d.ts +15 -0
  170. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/audio.js +9 -0
  171. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.d.ts +20 -0
  172. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/decode-mpc.js +158 -0
  173. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/package.json +64 -0
  174. package/node_modules/audio-decode/node_modules/@audio/decode-mpc/src/mpc.wasm.js +0 -0
  175. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE +25 -0
  176. package/node_modules/audio-decode/node_modules/@audio/decode-opus/LICENSE.libopus +44 -0
  177. package/node_modules/audio-decode/node_modules/@audio/decode-opus/README.md +32 -0
  178. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.d.ts +15 -0
  179. package/node_modules/audio-decode/node_modules/@audio/decode-opus/audio.js +10 -0
  180. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.d.ts +33 -0
  181. package/node_modules/audio-decode/node_modules/@audio/decode-opus/core.js +147 -0
  182. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.d.ts +18 -0
  183. package/node_modules/audio-decode/node_modules/@audio/decode-opus/decode-opus.js +1 -0
  184. package/node_modules/audio-decode/node_modules/@audio/decode-opus/meta.js +103 -0
  185. package/node_modules/audio-decode/node_modules/@audio/decode-opus/package.json +68 -0
  186. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/decode-opus.js +2 -0
  187. package/node_modules/audio-decode/node_modules/@audio/decode-opus/src/opus.wasm.js +0 -0
  188. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/LICENSE +25 -0
  189. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/README.md +19 -0
  190. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.d.ts +15 -0
  191. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/audio.js +10 -0
  192. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.d.ts +16 -0
  193. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/decode-qoa.js +275 -0
  194. package/node_modules/audio-decode/node_modules/@audio/decode-qoa/package.json +56 -0
  195. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE +21 -0
  196. package/node_modules/audio-decode/node_modules/@audio/decode-tta/LICENSE.ttadec +39 -0
  197. package/node_modules/audio-decode/node_modules/@audio/decode-tta/README.md +58 -0
  198. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.d.ts +15 -0
  199. package/node_modules/audio-decode/node_modules/@audio/decode-tta/audio.js +9 -0
  200. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.d.ts +17 -0
  201. package/node_modules/audio-decode/node_modules/@audio/decode-tta/decode-tta.js +302 -0
  202. package/node_modules/audio-decode/node_modules/@audio/decode-tta/package.json +58 -0
  203. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/LICENSE +25 -0
  204. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/README.md +33 -0
  205. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.d.ts +15 -0
  206. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/audio.js +10 -0
  207. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.d.ts +18 -0
  208. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/decode-vorbis.js +2984 -0
  209. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/meta.js +102 -0
  210. package/node_modules/audio-decode/node_modules/@audio/decode-vorbis/package.json +60 -0
  211. package/node_modules/audio-decode/node_modules/@audio/decode-wav/LICENSE +21 -0
  212. package/node_modules/audio-decode/node_modules/@audio/decode-wav/README.md +23 -0
  213. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.d.ts +15 -0
  214. package/node_modules/audio-decode/node_modules/@audio/decode-wav/audio.js +10 -0
  215. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.d.ts +8 -0
  216. package/node_modules/audio-decode/node_modules/@audio/decode-wav/decode-wav.js +256 -0
  217. package/node_modules/audio-decode/node_modules/@audio/decode-wav/meta.js +114 -0
  218. package/node_modules/audio-decode/node_modules/@audio/decode-wav/package.json +52 -0
  219. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE +29 -0
  220. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/LICENSE.wavpack +25 -0
  221. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/README.md +41 -0
  222. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.d.ts +15 -0
  223. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/audio.js +9 -0
  224. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.d.ts +18 -0
  225. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/decode-wavpack.js +140 -0
  226. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/package.json +62 -0
  227. package/node_modules/audio-decode/node_modules/@audio/decode-wavpack/src/wavpack.wasm.js +0 -0
  228. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE +21 -0
  229. package/node_modules/audio-decode/node_modules/@audio/decode-webm/LICENSE.libopus +44 -0
  230. package/node_modules/audio-decode/node_modules/@audio/decode-webm/README.md +59 -0
  231. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.d.ts +15 -0
  232. package/node_modules/audio-decode/node_modules/@audio/decode-webm/audio.js +10 -0
  233. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.d.ts +18 -0
  234. package/node_modules/audio-decode/node_modules/@audio/decode-webm/decode-webm.js +141 -0
  235. package/node_modules/audio-decode/node_modules/@audio/decode-webm/package.json +76 -0
  236. package/node_modules/audio-decode/node_modules/@audio/decode-webm/src/opus.wasm.js +0 -0
  237. package/node_modules/audio-decode/node_modules/@audio/decode-wma/LICENSE +12 -0
  238. package/node_modules/audio-decode/node_modules/@audio/decode-wma/README.md +74 -0
  239. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.d.ts +15 -0
  240. package/node_modules/audio-decode/node_modules/@audio/decode-wma/audio.js +10 -0
  241. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.d.ts +33 -0
  242. package/node_modules/audio-decode/node_modules/@audio/decode-wma/decode-wma.js +516 -0
  243. package/node_modules/audio-decode/node_modules/@audio/decode-wma/package.json +57 -0
  244. package/node_modules/audio-decode/node_modules/@audio/decode-wma/src/wma.wasm.js +0 -0
  245. package/node_modules/audio-decode/package.json +37 -39
  246. package/node_modules/audio-decode/stream.d.ts +2 -0
  247. package/node_modules/audio-decode/stream.js +2 -0
  248. package/node_modules/baileys/lib/Utils/messages-media.js +1 -1
  249. package/node_modules/baileys/node_modules/file-type/package.json +1 -1
  250. package/node_modules/baileys/node_modules/file-type/readme.md +2 -0
  251. package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +9 -4
  252. package/node_modules/baileys/package.json +1 -1
  253. package/node_modules/typebox/build/compile/code.mjs +1 -2
  254. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  255. package/node_modules/typebox/build/format/iri.mjs +16 -9
  256. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  257. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  258. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  259. package/node_modules/typebox/build/guard/index.mjs +6 -0
  260. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  261. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  262. package/node_modules/typebox/build/guard/{string.mjs → unicode/unicode_segment.mjs} +16 -19
  263. package/node_modules/typebox/build/schema/build.mjs +2 -3
  264. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  265. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  266. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  267. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  268. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  269. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  270. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  271. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  272. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  273. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  274. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  275. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  276. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  277. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  278. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  279. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  280. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  281. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  282. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  283. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  284. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  285. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  286. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  287. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  288. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  289. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  290. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  291. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  292. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  293. package/node_modules/typebox/package.json +1 -1
  294. package/node_modules/typebox/readme.md +3 -1
  295. package/package.json +6 -6
  296. package/dist/.setup/doctor-BPb-SjdE.mjs +0 -65
  297. package/dist/.setup/group-config-path-BGyzT9Lg.mjs +0 -54
  298. package/dist/.setup/normalize-DdsROMMa.mjs +0 -2
  299. package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +0 -13
  300. package/dist/.setup/runtime-group-policy-DeSRFXEV.mjs +0 -11
  301. package/dist/.setup/setup-plugin-api-2wUapweU.mjs +0 -3
  302. package/dist/.setup/text-runtime-CHl0iPYe.mjs +0 -4
  303. package/node_modules/audio-decode/.eslintrc.json +0 -43
  304. package/node_modules/audio-decode/.github/workflows/test.js.yml +0 -31
  305. package/node_modules/audio-decode/.travis.yml +0 -13
  306. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/README.md +0 -293
  307. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js +0 -11646
  308. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/dist/opus-ml-decoder.min.js.map +0 -1
  309. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/index.js +0 -8
  310. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/package.json +0 -58
  311. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/EmscriptenWasm.js +0 -0
  312. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoder.js +0 -253
  313. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/src/OpusMLDecoderWebWorker.js +0 -17
  314. package/node_modules/audio-decode/node_modules/@wasm-audio-decoders/opus-ml/types.d.ts +0 -77
  315. package/node_modules/audio-decode/node_modules/audio-buffer/.eslintrc.json +0 -44
  316. package/node_modules/audio-decode/node_modules/audio-buffer/.github/workflows/node.js.yml +0 -31
  317. package/node_modules/audio-decode/node_modules/audio-buffer/.travis.yml +0 -7
  318. package/node_modules/audio-decode/node_modules/audio-buffer/index.js +0 -76
  319. package/node_modules/audio-decode/node_modules/audio-buffer/package.json +0 -37
  320. package/node_modules/audio-decode/node_modules/audio-buffer/readme.md +0 -56
  321. package/node_modules/audio-decode/node_modules/node-wav/README.md +0 -35
  322. package/node_modules/audio-decode/node_modules/node-wav/file.wav +0 -0
  323. package/node_modules/audio-decode/node_modules/node-wav/index.js +0 -291
  324. package/node_modules/audio-decode/node_modules/node-wav/package.json +0 -29
  325. package/node_modules/audio-decode/node_modules/node-wav/tests/file1.wav +0 -0
  326. package/node_modules/audio-decode/node_modules/node-wav/tests/test.js +0 -66
  327. package/node_modules/audio-decode/node_modules/node-wav/x.js +0 -12
  328. package/node_modules/audio-decode/node_modules/node-wav/x.json +0 -86702
  329. package/node_modules/audio-decode/node_modules/node-wav/x.js~ +0 -13
  330. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/README.md +0 -320
  331. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js +0 -232
  332. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.min.js.map +0 -1
  333. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js +0 -0
  334. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/dist/ogg-opus-decoder.opus-ml.min.js.map +0 -1
  335. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/index.js +0 -8
  336. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/package.json +0 -74
  337. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoder.js +0 -226
  338. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/src/OggOpusDecoderWebWorker.js +0 -17
  339. package/node_modules/audio-decode/node_modules/ogg-opus-decoder/types.d.ts +0 -37
  340. package/node_modules/audio-decode/node_modules/opus-decoder/README.md +0 -265
  341. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js +0 -232
  342. package/node_modules/audio-decode/node_modules/opus-decoder/dist/opus-decoder.min.js.map +0 -1
  343. package/node_modules/audio-decode/node_modules/opus-decoder/index.js +0 -8
  344. package/node_modules/audio-decode/node_modules/opus-decoder/package.json +0 -56
  345. package/node_modules/audio-decode/node_modules/opus-decoder/src/EmscriptenWasm.js +0 -0
  346. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoder.js +0 -239
  347. package/node_modules/audio-decode/node_modules/opus-decoder/src/OpusDecoderWebWorker.js +0 -17
  348. package/node_modules/audio-decode/node_modules/opus-decoder/types.d.ts +0 -74
  349. package/node_modules/audio-decode/readme.md +0 -49
  350. package/node_modules/audio-decode/tea.yaml +0 -6
  351. package/node_modules/audio-decode/test-case.js +0 -11
  352. package/node_modules/audio-decode/test.html +0 -15
  353. package/node_modules/audio-decode/test.js +0 -107
  354. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
@@ -1,37 +0,0 @@
1
- {
2
- "name": "audio-buffer",
3
- "version": "5.0.0",
4
- "description": "AudioBuffer class for node/browser",
5
- "main": "index.js",
6
- "type": "module",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/audiojs/audio-buffer"
10
- },
11
- "scripts": {
12
- "test": "node test"
13
- },
14
- "keywords": [
15
- "audio",
16
- "audiojs",
17
- "pcm",
18
- "dsp",
19
- "sound",
20
- "processing",
21
- "ndsamples",
22
- "ponyfill",
23
- "audio-buffer",
24
- "web-audio",
25
- "waa",
26
- "audiodata"
27
- ],
28
- "author": "Dmitry Iv <df.creative@gmail.com>",
29
- "license": "MIT",
30
- "bugs": {
31
- "url": "https://github.com/audiojs/audio-buffer/issues"
32
- },
33
- "homepage": "https://github.com/audiojs/audio-buffer",
34
- "devDependencies": {
35
- "tape": "^5.6.3"
36
- }
37
- }
@@ -1,56 +0,0 @@
1
- # audio-buffer [![test](https://github.com/audiojs/audio-buffer/actions/workflows/node.js.yml/badge.svg)](https://github.com/audiojs/audio-buffer/actions/workflows/node.js.yml) [![stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)](http://github.com/badges/stability-badges)
2
-
3
- _AudioBuffer_ - basic audio data container class.
4
- Useful instead of _Buffer_ in audio streams, [**@audiojs**](https://github.com/audiojs) components, in webworkers, nodejs, other environments without audio context.
5
-
6
- Implementation is compatible with [Web Audio API AudioBuffer](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer), can be used as ponyfill.
7
-
8
- ## Usage
9
-
10
- [![npm install audio-buffer](https://nodei.co/npm/audio-buffer.png?mini=true)](https://npmjs.org/package/audio-buffer/)
11
-
12
- ### new AudioBuffer(options)
13
-
14
- Create audio buffer from `options`.
15
-
16
- * `options.length` — number of samples, minimum is 1.
17
- * `options.sampleRate` — default sample rate is 44100.
18
- * `options.numberOfChannels` — default number of channels is 1.
19
-
20
- ### buffer.duration
21
-
22
- Duration of the underlying audio data, in seconds.
23
-
24
- ### buffer.length
25
-
26
- Number of samples per channel.
27
-
28
- ### buffer.sampleRate
29
-
30
- Default sample rate is 44100.
31
-
32
- ### buffer.numberOfChannels
33
-
34
- Default number of channels is 1.
35
-
36
- ### buffer.getChannelData(channel)
37
-
38
- Get array containing the data for the channel (not copied).
39
-
40
- ### buffer.copyFromChannel(destination, channelNumber, startInChannel=0)
41
-
42
- Place data from channel to destination Float32Array.
43
-
44
- ### buffer.copyToChannel(source, channelNumber, startInChannel=0)
45
-
46
- Place data from source Float32Array to the channel.
47
-
48
-
49
- ## Similar
50
-
51
- * [ndsamples](https://github.com/livejs/ndsamples) — audio-wrapper for ndarrays. A somewhat alternative approach to wrap audio data, based on ndarrays, used by some modules in [livejs](https://github.com/livejs).
52
- * [1](https://www.npmjs.com/package/audiobuffer), [2](https://www.npmjs.com/package/audio-buffer), [3](https://github.com/sebpiq/node-web-audio-api/blob/master/lib/AudioBuffer.js), [4](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer) — other AudioBuffer implementations.
53
- * [audiodata](https://www.npmjs.com/package/audiodata) alternative data holder from @mohayonao.
54
-
55
-
56
- <p align=center><a href="https://github.com/krishnized/license/">🕉</a></p>
@@ -1,35 +0,0 @@
1
- node-wav
2
- ========
3
-
4
- High performance WAV decoder and encoder. The decoder is up to 750x faster than
5
- the 'wav-decoder' npm module.
6
-
7
- In addition, in contrast to 'wav-decoder' the result is returned directly instead
8
- of with a promise.
9
-
10
- This module combines the functionality of 'wav-decoder' and 'wav-encoder'.
11
-
12
- Usage
13
- -----
14
-
15
- let fs = require('fs');
16
- let wav = require('node-wav');
17
-
18
- let buffer = fs.readFileSync('file.wav');
19
- let result = wav.decode(buffer);
20
- console.log(result.sampleRate);
21
- console.log(result.channelData); // array of Float32Arrays
22
-
23
- wav.encode(result.channelData, { sampleRate: result.sampleRate, float: true, bitDepth: 32 });
24
-
25
- Data format
26
- -----------
27
-
28
- Data is always returned as Float32Arrays. While reading and writing 64-bit float
29
- WAV files is supported, data is truncated to 32-bit floats.
30
-
31
- Endianness
32
- ----------
33
-
34
- This module assumes a little endian CPU, which is true for pretty much every processor
35
- these days (in particular Intel and ARM).
@@ -1,291 +0,0 @@
1
- /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
- /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
3
-
4
- 'use strict';
5
-
6
- const data_decoders = {
7
- pcm8: (buffer, offset, output, channels, samples) => {
8
- let input = new Uint8Array(buffer, offset);
9
- let pos = 0;
10
- for (let i = 0; i < samples; ++i) {
11
- for (let ch = 0; ch < channels; ++ch) {
12
- let data = input[pos++] - 128;
13
- output[ch][i] = data < 0 ? data / 128 : data / 127;
14
- }
15
- }
16
- },
17
- pcm16: (buffer, offset, output, channels, samples) => {
18
- let input = new Int16Array(buffer, offset);
19
- let pos = 0;
20
- for (let i = 0; i < samples; ++i) {
21
- for (let ch = 0; ch < channels; ++ch) {
22
- let data = input[pos++];
23
- output[ch][i] = data < 0 ? data / 32768 : data / 32767;
24
- }
25
- }
26
- },
27
- pcm24: (buffer, offset, output, channels, samples) => {
28
- let input = new Uint8Array(buffer, offset);
29
- let pos = 0;
30
- for (let i = 0; i < samples; ++i) {
31
- for (let ch = 0; ch < channels; ++ch) {
32
- let x0 = input[pos++];
33
- let x1 = input[pos++];
34
- let x2 = input[pos++];
35
- let xx = (x0 + (x1 << 8) + (x2 << 16));
36
- let data = xx > 0x800000 ? xx - 0x1000000 : xx;
37
- output[ch][i] = data < 0 ? data / 8388608 : data / 8388607;
38
- }
39
- }
40
- },
41
- pcm32: (buffer, offset, output, channels, samples) => {
42
- let input = new Int32Array(buffer, offset);
43
- let pos = 0;
44
- for (let i = 0; i < samples; ++i) {
45
- for (let ch = 0; ch < channels; ++ch) {
46
- let data = input[pos++];
47
- output[ch][i] = data < 0 ? data / 2147483648 : data / 2147483647;
48
- }
49
- }
50
- },
51
- pcm32f: (buffer, offset, output, channels, samples) => {
52
- let input = new Float32Array(buffer, offset);
53
- let pos = 0;
54
- for (let i = 0; i < samples; ++i) {
55
- for (let ch = 0; ch < channels; ++ch)
56
- output[ch][i] = input[pos++];
57
- }
58
- },
59
- pcm64f: (buffer, offset, output, channels, samples) => {
60
- let input = new Float64Array(buffer, offset);
61
- let pos = 0;
62
- for (let i = 0; i < samples; ++i) {
63
- for (let ch = 0; ch < channels; ++ch)
64
- output[ch][i] = input[pos++];
65
- }
66
- },
67
- };
68
-
69
- const data_encoders = {
70
- pcm8: (buffer, offset, input, channels, samples) => {
71
- let output = new Uint8Array(buffer, offset);
72
- let pos = 0;
73
- for (let i = 0; i < samples; ++i) {
74
- for (let ch = 0; ch < channels; ++ch) {
75
- let v = Math.max(-1, Math.min(input[ch][i], 1));
76
- v = ((v * 0.5 + 0.5) * 255) | 0;
77
- output[pos++] = v;
78
- }
79
- }
80
- },
81
- pcm16: (buffer, offset, input, channels, samples) => {
82
- let output = new Int16Array(buffer, offset);
83
- let pos = 0;
84
- for (let i = 0; i < samples; ++i) {
85
- for (let ch = 0; ch < channels; ++ch) {
86
- let v = Math.max(-1, Math.min(input[ch][i], 1));
87
- v = ((v < 0) ? v * 32768 : v * 32767) | 0;
88
- output[pos++] = v;
89
- }
90
- }
91
- },
92
- pcm24: (buffer, offset, input, channels, samples) => {
93
- let output = new Uint8Array(buffer, offset);
94
- let pos = 0;
95
- for (let i = 0; i < samples; ++i) {
96
- for (let ch = 0; ch < channels; ++ch) {
97
- let v = Math.max(-1, Math.min(input[ch][i], 1));
98
- v = ((v < 0) ? 0x1000000 + v * 8388608 : v * 8388607) | 0;
99
- output[pos++] = (v >> 0) & 0xff;
100
- output[pos++] = (v >> 8) & 0xff;
101
- output[pos++] = (v >> 16) & 0xff;
102
- }
103
- }
104
- },
105
- pcm32: (buffer, offset, input, channels, samples) => {
106
- let output = new Int32Array(buffer, offset);
107
- let pos = 0;
108
- for (let i = 0; i < samples; ++i) {
109
- for (let ch = 0; ch < channels; ++ch) {
110
- let v = Math.max(-1, Math.min(input[ch][i], 1));
111
- v = ((v < 0) ? v * 2147483648 : v * 2147483647) | 0;
112
- output[pos++] = v;
113
- }
114
- }
115
- },
116
- pcm32f: (buffer, offset, input, channels, samples) => {
117
- let output = new Float32Array(buffer, offset);
118
- let pos = 0;
119
- for (let i = 0; i < samples; ++i) {
120
- for (let ch = 0; ch < channels; ++ch) {
121
- let v = Math.max(-1, Math.min(input[ch][i], 1));
122
- output[pos++] = v;
123
- }
124
- }
125
- },
126
- pcm64f: (buffer, offset, input, channels, samples) => {
127
- let output = new Float64Array(buffer, offset);
128
- let pos = 0;
129
- for (let i = 0; i < samples; ++i) {
130
- for (let ch = 0; ch < channels; ++ch) {
131
- let v = Math.max(-1, Math.min(input[ch][i], 1));
132
- output[pos++] = v;
133
- }
134
- }
135
- },
136
- };
137
-
138
- function lookup(table, bitDepth, floatingPoint) {
139
- let name = 'pcm' + bitDepth + (floatingPoint ? 'f' : '');
140
- let fn = table[name];
141
- if (!fn)
142
- throw new TypeError('Unsupported data format: ' + name);
143
- return fn;
144
- }
145
-
146
- function decode(buffer) {
147
- let pos = 0, end = 0;
148
- if (buffer.buffer) {
149
- // If we are handed a typed array or a buffer, then we have to consider the
150
- // offset and length into the underlying array buffer.
151
- pos = buffer.byteOffset;
152
- end = buffer.length;
153
- buffer = buffer.buffer;
154
- } else {
155
- // If we are handed a straight up array buffer, start at offset 0 and use
156
- // the full length of the buffer.
157
- pos = 0;
158
- end = buffer.byteLength;
159
- }
160
-
161
- let v = new DataView(buffer);
162
-
163
- function u8() {
164
- let x = v.getUint8(pos);
165
- pos++;
166
- return x;
167
- }
168
-
169
- function u16() {
170
- let x = v.getUint16(pos, true);
171
- pos += 2;
172
- return x;
173
- }
174
-
175
- function u32() {
176
- let x = v.getUint32(pos, true);
177
- pos += 4;
178
- return x;
179
- }
180
-
181
- function string(len) {
182
- let str = '';
183
- for (let i = 0; i < len; ++i)
184
- str += String.fromCharCode(u8());
185
- return str;
186
- }
187
-
188
- if (string(4) !== 'RIFF')
189
- throw new TypeError('Invalid WAV file');
190
- u32();
191
- if (string(4) !== 'WAVE')
192
- throw new TypeError('Invalid WAV file');
193
-
194
- let fmt;
195
-
196
- while (pos < end) {
197
- let type = string(4);
198
- let size = u32();
199
- let next = pos + size;
200
- switch (type) {
201
- case 'fmt ':
202
- let formatId = u16();
203
- if (formatId !== 0x0001 && formatId !== 0x0003)
204
- throw new TypeError('Unsupported format in WAV file: ' + formatId.toString(16));
205
- fmt = {
206
- format: 'lpcm',
207
- floatingPoint: formatId === 0x0003,
208
- channels: u16(),
209
- sampleRate: u32(),
210
- byteRate: u32(),
211
- blockSize: u16(),
212
- bitDepth: u16(),
213
- };
214
- break;
215
- case 'data':
216
- if (!fmt)
217
- throw new TypeError('Missing "fmt " chunk.');
218
- let samples = Math.floor(size / fmt.blockSize);
219
- let channels = fmt.channels;
220
- let sampleRate = fmt.sampleRate;
221
- let channelData = [];
222
- for (let ch = 0; ch < channels; ++ch)
223
- channelData[ch] = new Float32Array(samples);
224
- lookup(data_decoders, fmt.bitDepth, fmt.floatingPoint)(buffer, pos, channelData, channels, samples);
225
- return {
226
- sampleRate: sampleRate,
227
- channelData: channelData
228
- };
229
- break;
230
- }
231
- pos = next;
232
- }
233
- }
234
-
235
- function encode(channelData, opts) {
236
- let sampleRate = opts.sampleRate || 16000;
237
- let floatingPoint = !!(opts.float || opts.floatingPoint);
238
- let bitDepth = floatingPoint ? 32 : ((opts.bitDepth | 0) || 16);
239
- let channels = channelData.length;
240
- let samples = channelData[0].length;
241
- let buffer = new ArrayBuffer(44 + (samples * channels * (bitDepth >> 3)));
242
-
243
- let v = new DataView(buffer);
244
- let pos = 0;
245
-
246
- function u8(x) {
247
- v.setUint8(pos++, x);
248
- }
249
-
250
- function u16(x) {
251
- v.setUint16(pos, x, true);
252
- pos += 2;
253
- }
254
-
255
- function u32(x) {
256
- v.setUint32(pos, x, true);
257
- pos += 4;
258
- }
259
-
260
- function string(s) {
261
- for (var i = 0; i < s.length; ++i)
262
- u8(s.charCodeAt(i));
263
- }
264
-
265
- // write header
266
- string('RIFF');
267
- u32(buffer.byteLength - 8);
268
- string('WAVE');
269
-
270
- // write 'fmt ' chunk
271
- string('fmt ');
272
- u32(16);
273
- u16(floatingPoint ? 0x0003 : 0x0001);
274
- u16(channels);
275
- u32(sampleRate);
276
- u32(sampleRate * channels * (bitDepth >> 3));
277
- u16(channels * (bitDepth >> 3));
278
- u16(bitDepth);
279
-
280
- // write 'data' chunk
281
- string('data');
282
- u32(buffer.byteLength - 44);
283
- lookup(data_encoders, bitDepth, floatingPoint)(buffer, pos, channelData, channels, samples);
284
-
285
- return Buffer(buffer);
286
- }
287
-
288
- module.exports = {
289
- decode: decode,
290
- encode: encode,
291
- };
@@ -1,29 +0,0 @@
1
- {
2
- "name": "node-wav",
3
- "version": "0.0.2",
4
- "description": "High performance WAV file decoder and encoder",
5
- "main": "./index.js",
6
- "scripts": {
7
- "test": "./node_modules/nodeunit/bin/nodeunit ./tests/test.js"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/andreasgal/node-wav.git"
12
- },
13
- "keywords": [
14
- "wav",
15
- "decode"
16
- ],
17
- "author": "Andreas Gal",
18
- "license": "MIT",
19
- "homepage": "https://github.com/andreasgal/node-wav",
20
- "engines": {
21
- "node": ">=4.4.0"
22
- },
23
- "dependencies": {},
24
- "devDependencies": {
25
- "nodeunit": "^0.9.1",
26
- "wav-decoder": "^1.1.0",
27
- "wav-encoder": "^1.1.0"
28
- }
29
- }
@@ -1,66 +0,0 @@
1
- /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
- /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
3
-
4
- "use strict";
5
-
6
- const fs = require('fs');
7
- const encoder = require('wav-encoder');
8
- const decoder = require('wav-decoder');
9
- const wav = require('../index');
10
-
11
- function make_test_data(channels, samples) {
12
- let data = [];
13
- for (let ch = 0; ch < channels; ++ch) {
14
- data[ch] = new Float32Array(samples);
15
- for (let n = 0; n < samples; ++n)
16
- data[ch][n] = Math.random();
17
- }
18
- return data;
19
- }
20
-
21
- exports.test_wav = test => {
22
- test.expect(25);
23
- let samples = 10;
24
- let channels = 2;
25
- let data = make_test_data(channels, samples);
26
- Promise.all([8, 16, 24, 32, '32f'].map(bitDepth => new Promise((resolve, reject) => {
27
- let floatingPoint = false;
28
- if (bitDepth == '32f') {
29
- bitDepth = 32;
30
- floatingPoint = true;
31
- }
32
- let audioData = {
33
- length: samples,
34
- numberOfChannels: channels,
35
- sampleRate: 16000,
36
- channelData: data
37
- };
38
- let opts = {
39
- floatingPoint: floatingPoint,
40
- bitDepth: bitDepth,
41
- };
42
- encoder.encode(audioData, opts).then(buffer => {
43
- let encoded = wav.encode(audioData.channelData, opts);
44
- test.equal(new Buffer(buffer).toString('hex'), encoded.toString('hex'), 'our encoder should match wav-encoder');
45
- let decoded = wav.decode(buffer);
46
- decoder.decode(buffer).then(reference => {
47
- test.equal(reference.length, decoded.channelData[0].length, 'number of samples should match');
48
- test.equal(reference.numberOfChannels, decoded.channelData.length, 'number of channels should match');
49
- test.equal(reference.sampleRate, decoded.sampleRate, 'sample rate should match');
50
- test.deepEqual(reference.channelData, decoded.channelData, 'data should match');
51
- resolve();
52
- });
53
- });
54
- }))).then(() => test.done());
55
- };
56
-
57
- exports.test_buffer_offset = test => {
58
- test.expect(1);
59
- let files = ["./tests/file1.wav"];
60
- files.forEach(file => {
61
- let buffer = fs.readFileSync(file);
62
- let decoded = wav.decode(buffer);
63
- test.equal(decoded.sampleRate, 16000);
64
- test.done();
65
- });
66
- };
@@ -1,12 +0,0 @@
1
- let fs = require('fs');
2
- let wav = require('./index');
3
-
4
- //let files = JSON.parse(fs.readFileSync('x.json'));
5
-
6
- let files = ["../train/data//other/0005932e-db17-4a21-b99f-5e10f84a9e74.wav"];
7
-
8
- files.forEach(file => {
9
- console.log(file);
10
- let buffer = fs.readFileSync(file);
11
- let w = wav.decode(buffer);
12
- });