@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.0

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 (370) hide show
  1. package/NOTICE +85 -0
  2. package/client.d.ts +45 -1
  3. package/dist/anim.js +2 -75
  4. package/dist/define.d.ts +10 -4
  5. package/dist/define.js +2 -95
  6. package/dist/dom.d.ts +1 -1
  7. package/dist/dom.js +2 -457
  8. package/dist/fit.js +2 -60
  9. package/dist/free.d.ts +18 -0
  10. package/dist/free.js +2 -0
  11. package/dist/index.d.ts +28 -13
  12. package/dist/index.js +2 -11
  13. package/dist/input.d.ts +306 -0
  14. package/dist/input.js +2 -0
  15. package/dist/media.d.ts +3 -6
  16. package/dist/media.js +2 -27
  17. package/dist/messages.d.ts +3 -2
  18. package/dist/messages.js +2 -2
  19. package/dist/module.d.ts +24 -0
  20. package/dist/module.js +2 -0
  21. package/dist/noise.js +2 -233
  22. package/dist/parts.d.ts +97 -21
  23. package/dist/parts.js +2 -414
  24. package/dist/paths.d.ts +1 -1
  25. package/dist/paths.js +2 -720
  26. package/dist/phone.d.ts +26 -0
  27. package/dist/phone.js +2 -0
  28. package/dist/piece.d.ts +106 -35
  29. package/dist/piece.js +2 -38
  30. package/dist/props.d.ts +1 -1
  31. package/dist/props.js +2 -35
  32. package/dist/scenery.d.ts +2 -0
  33. package/dist/scenery.js +2 -0
  34. package/dist/text.js +2 -38
  35. package/dist/written.d.ts +12 -0
  36. package/dist/written.js +2 -0
  37. package/docs/README.md +18 -0
  38. package/docs/batches.md +148 -0
  39. package/docs/contract.md +51 -0
  40. package/docs/defaults.md +703 -0
  41. package/docs/docs.md +148 -0
  42. package/docs/footage.md +249 -0
  43. package/docs/layers.md +317 -0
  44. package/docs/modeling.md +143 -0
  45. package/docs/project.md +265 -0
  46. package/docs/scenery.md +308 -0
  47. package/docs/sheets.md +119 -0
  48. package/docs/slides.md +111 -0
  49. package/docs/sound.md +170 -0
  50. package/docs/speech.md +289 -0
  51. package/docs/video.md +265 -0
  52. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  53. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  54. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  55. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  57. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  59. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  61. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  63. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  65. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  67. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  83. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  85. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  87. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  117. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  119. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  121. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  123. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  124. package/node_modules/@allyhub-next/audio/package.json +17 -0
  125. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  126. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  127. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  149. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  150. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  151. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  152. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  153. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  154. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  155. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  156. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  157. package/node_modules/@allyhub-next/formats/package.json +14 -0
  158. package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
  159. package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
  160. package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
  161. package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
  162. package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
  163. package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
  164. package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
  165. package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
  166. package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
  167. package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
  168. package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
  169. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  170. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  171. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  172. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  173. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  174. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  175. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
  176. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  177. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  178. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  179. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  180. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  181. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  182. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  183. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  184. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  185. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  186. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  187. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  188. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  189. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  190. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  191. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  192. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  193. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  207. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  208. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  209. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  210. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  211. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  212. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  213. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  214. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  215. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  216. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  217. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  218. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  219. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  220. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  221. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  222. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  223. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  224. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  225. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  226. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  227. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  228. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  229. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  230. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  231. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  232. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  233. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  234. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  235. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  236. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  237. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  238. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  239. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  240. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  241. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  242. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  243. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  244. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  245. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  246. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  247. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  248. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  249. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  250. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  251. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  252. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  253. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  254. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  255. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  256. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  257. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  258. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  259. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  260. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  261. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  262. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  264. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  265. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  266. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  268. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  269. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  270. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  272. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  273. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  274. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  276. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  277. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  278. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  280. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  282. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  284. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  286. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  288. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  290. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  292. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  294. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  295. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  296. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  298. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  299. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  300. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  302. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  304. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  306. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  308. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  310. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  312. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  314. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  316. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  318. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  320. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  322. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  324. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  325. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  326. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  328. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  329. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  330. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  332. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  334. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  336. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  338. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  339. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  340. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  341. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  342. package/package.json +52 -41
  343. package/README.md +0 -17
  344. package/dist/anim.d.ts.map +0 -1
  345. package/dist/anim.js.map +0 -1
  346. package/dist/define.d.ts.map +0 -1
  347. package/dist/define.js.map +0 -1
  348. package/dist/dom.d.ts.map +0 -1
  349. package/dist/dom.js.map +0 -1
  350. package/dist/fit.d.ts.map +0 -1
  351. package/dist/fit.js.map +0 -1
  352. package/dist/index.d.ts.map +0 -1
  353. package/dist/index.js.map +0 -1
  354. package/dist/media.d.ts.map +0 -1
  355. package/dist/media.js.map +0 -1
  356. package/dist/messages.d.ts.map +0 -1
  357. package/dist/messages.js.map +0 -1
  358. package/dist/noise.d.ts.map +0 -1
  359. package/dist/noise.js.map +0 -1
  360. package/dist/parts.d.ts.map +0 -1
  361. package/dist/parts.js.map +0 -1
  362. package/dist/paths.d.ts.map +0 -1
  363. package/dist/paths.js.map +0 -1
  364. package/dist/piece.d.ts.map +0 -1
  365. package/dist/piece.js.map +0 -1
  366. package/dist/props.d.ts.map +0 -1
  367. package/dist/props.js.map +0 -1
  368. package/dist/text.d.ts.map +0 -1
  369. package/dist/text.js.map +0 -1
  370. /package/{LICENSE → LICENSE.md} +0 -0
package/docs/speech.md ADDED
@@ -0,0 +1,289 @@
1
+ # Speech
2
+
3
+ What a part says: a recording (`take()`), text to speech (`say()`) or a stretch of another video item (`take(piece)`). Its words time the part, place its layers and sounds, duck the music and make the captions. This file covers those, word references, anchors, shown-and-said text, captions and the words and edits files.
4
+
5
+ ```ts file=launch/film/video.ts
6
+ import { part, say, take, video } from "@allyhub/sdk";
7
+
8
+ import vo from "./vo/en.mp3";
9
+
10
+ export default video({
11
+ format: "16x9",
12
+ parts: ({ s }) => [
13
+ part({ key: "hook", speech: take(vo).saying(s("launch.film.hook.say")) }),
14
+ part({
15
+ key: "how",
16
+ speech: take("./vo/en.mp3").saying(s("launch.film.how.say")).speed(1.1),
17
+ }),
18
+ part({
19
+ key: "host",
20
+ speech: take("./host.mp4")
21
+ .range("So here is", "every time")
22
+ .edits("./edits/host.json")
23
+ .denoise(12)
24
+ .roomTone({ limitDb: 4, fade: 0.06 }),
25
+ }),
26
+ part({
27
+ key: "cta",
28
+ speech: say(s("launch.film.cta.say"), { voice: "rachel", speed: 1.05 }),
29
+ }),
30
+ ],
31
+ });
32
+ ```
33
+
34
+ A path written as a string (`take("./host.mp4")`, `.edits("./edits/host.json")`) is relative to the module that wrote it, also once the part is spread into another piece ([project.md](project.md)).
35
+
36
+ ## A part's length
37
+
38
+ A part with speech lasts lead + speech + tail: `lead` before the first word (default 0.2 s) and `tail` after the last (default 0.3 s), less any `overlap` ([J and L cuts](#j-and-l-cuts)). A part without speech lasts `dur` (default 4 s). The defaults are `PART_DEFAULTS`, changed for the project by `defaults.part` in `allyhub.config.ts` and for one video by `video({ defaults: { part } })`.
39
+
40
+ ## `take(file)`
41
+
42
+ A recording, audio or video (an import, or a path), with its words in `<name>.words.json` beside it ([Words files](#words-files)). `allyhub words <file>` hears it on this computer and writes that file. A take without one is AK-T001.
43
+
44
+ Alone, a take is the whole recording, from its first word to its last. Each method returns a new take:
45
+
46
+ - `.range(from, to?)`: the stretch from the first words `from` to the end of the first `to` after them (phrases; case and punctuation ignored); without `to`, to the end. A phrase not found is AK-T003.
47
+ - `.saying(text)`: the stretch that says this line, usually `s(key)`, found by its words, misheard words tolerated; the line's spelling is the caption. Parts that take the same file each search after the previous part's stretch. A line not found is AK-T003.
48
+ - `.edits(path)`: a cut list, a `.json` file ([Edits files](#edits-files)). One that is not there, or does not match the format, is AK-T005: the take would play uncut.
49
+ - `.denoise(db?)`: reduces its noise by `db` (over 0, up to 97; default 12) with ffmpeg's FFT denoiser, in the render and the preview.
50
+ - `.roomTone(tone)`: how the part's lead and tail are filled where the take has no silence of its own round the part's words ([Room tone](#room-tone)).
51
+ - `.speed(times)`: plays it `times` as fast, its pitch kept (0.5 to 2); its words, the part's length and everything timed by them follow. The file is not changed. A part whose `footage()` shows the take's own picture cannot change its speed (`part()` throws).
52
+
53
+ With `.edits()`, `range` and `saying` look only at the words the edits keep: a phrase or line said only in removed words is AK-T006. A take a voice tool generated keeps the text it was made from in its `.gen.json`: a part whose line is not in that text is AK-T007.
54
+
55
+ ### Room tone
56
+
57
+ A part's lead and tail play the take's own room round its words. Where that runs out, a room tone fills them:
58
+
59
+ - The fill is the quietest steady stretch the build measured, or `{ from, to }` (seconds of the file, both given, at least 0.05 s apart), looped. `.roomTone(false)` leaves digital silence.
60
+ - Its level is matched to the floor of the take's own room beside the join (the mean power of the quietest quarter of the 10 ms frames within 0.3 s), at most `limitDb` either way (0 to 60; default 6). `match: false` plays it as recorded; `gainDb` (−60 to 24) sets its gain instead. Where the take keeps under 0.1 s of its own room at a join, or its levels are not known, it plays as recorded.
61
+ - It cross-fades with the take over `fade` seconds (0 to 1; default 0.04), equal-power.
62
+
63
+ The values are `ROOM_MATCH` ([defaults.md](defaults.md)). `allyhub inspect timeline` prints each fill's gain and where it came from.
64
+
65
+ ## `take(piece)`
66
+
67
+ A stretch of another video item of the project, imported, with a clock of its own:
68
+
69
+ ```ts file=scene/video.ts
70
+ import { part, video } from "@allyhub/sdk";
71
+
72
+ export default video({
73
+ format: "16x9",
74
+ deliverable: false,
75
+ parts: () => [
76
+ part({ key: "desk", dur: 6, anchors: { turn: 1.2, press: [3, 4.5] } }),
77
+ ],
78
+ });
79
+ ```
80
+
81
+ ```ts file=short/video.ts
82
+ import { footage, part, take, video } from "@allyhub/sdk";
83
+
84
+ import scene from "../scene/video.ts";
85
+
86
+ export default video({
87
+ format: "9x16",
88
+ parts: () => [
89
+ part({
90
+ key: "cut",
91
+ speech: take(scene).range("@turn", "@/press"),
92
+ layers: [footage()],
93
+ }),
94
+ ],
95
+ });
96
+ ```
97
+
98
+ - `.range(from, to?)` takes seconds of its clock, an anchor of one of its parts (`"@turn"`, `"@/turn"`, `"@turn+0.2"`) or a part's key; without `to`, to its end. A reference it does not have is AK-T003.
99
+ - Its ends go on the frame grid, never into a word they are not in (a stretch that splits a word is a `cut-in-word` fact). The part lasts the stretch exactly, with no lead or tail; it hears the item's speech, room tone and sound effects (not its music), says its words and has its anchors.
100
+ - `footage()` without a file draws its picture in sync, in the part's frame whatever the item's own format ([footage.md](footage.md)). `deliverable: false` marks an item that is only shown inside others.
101
+
102
+ ## `say(text, opts?)`
103
+
104
+ Text to speech. `allyhub voice` makes the missing files with the cloud voice tool, each in `assets/media/gen/say/<hash>` with its words and its record (`--quote` prices them first). A `say` without its file is AK-T002; until it has one, the part lasts about as long as the line takes to say (`SPEECH_RATE_DEFAULTS`: 0.38 s a word, 0.22 s a Chinese, Japanese or Korean character; at least 1 s), and its anchors are placed in proportion along the line.
105
+
106
+ - `voice`: the voice tool's voice id; default the tool's own.
107
+ - `tool`: the voice tool; default `"tts-elevenlabs-multilingual-v2"` (`allyhub help ai <tool>` lists its input).
108
+ - `params`: more input for the tool, plain JSON: fields its schema has besides the text and voice (`text` and `voiceId` throw).
109
+ - `speed`: 0.5 to 2, default 1: plays the file faster or slower, pitch kept, as `.speed()` does. Not sent to the tool, so the same file.
110
+
111
+ The file is named by a hash of the text read aloud, the voice, the tool and the params: a changed line needs a new file. Text from `s(key)` is read aloud as its said side ([Shown and said](#shown-and-said)).
112
+
113
+ ## Word references
114
+
115
+ A word reference names a moment of a part by what is said there. A layer's `at` and `until`, a part's `still`, a sound's `at`, a footage `punchIn` and every prop declared `time()` take one; a layer reads one with `ctx.at(ref)`, in seconds from the part's start.
116
+
117
+ | Reference | Moment |
118
+ | --- | --- |
119
+ | `"inbox"` | The start of the first time "inbox" is said in the part |
120
+ | `"inbox@2"` | The second time |
121
+ | `"inbox+0.2"`, `"inbox@2-0.35"` | Shifted by seconds |
122
+ | `"@name"`, `"@/name"`, `"@name+0.2"` | An [anchor](#anchors)'s start, a stretch's end, shifted |
123
+ | `1.8`, `"1.8"` | Seconds from the part's start |
124
+
125
+ A reference may be a phrase; case and punctuation are ignored. With `say` or `saying` a reference is found in the line first, so a misheard word still lands where it is said. A reference the part does not say, or any word in a part without speech, is AK-T004.
126
+
127
+ ## Anchors
128
+
129
+ An anchor is a name written in the line a part says, in each language's script (`script.<lang>.yaml`, [project.md](project.md)). The code refers to the name, so a reworded or translated line keeps what hangs on it.
130
+
131
+ ```yaml
132
+ parts:
133
+ - id: how
134
+ say: "@{step1}Paste your form link. We @{step2}match the answers you @{have}already have@{/have}."
135
+ ```
136
+
137
+ | In the line | In code | Moment |
138
+ | --- | --- | --- |
139
+ | `@{name}` | `"@name"` | A point: the start of the word after it (the end of the last word, at the line's end) |
140
+ | `@{name}…@{/name}` | `"@name"`, `"@/name"` | A stretch: the start of its first word, the end of its last |
141
+ | | `"@name+0.2"`, `"@/name-0.1"` | Shifted by seconds |
142
+
143
+ ```ts file=launch/how.ts
144
+ import { custom, part, say, type MessageReader } from "@allyhub/sdk";
145
+
146
+ export const how = (s: MessageReader) =>
147
+ part({
148
+ key: "how",
149
+ speech: say(s("launch.film.how.say")),
150
+ sounds: [{ at: "@step1", sound: "tick" }],
151
+ layers: [
152
+ custom({
153
+ at: "@step2",
154
+ until: "@/have+0.3",
155
+ mount(el, ctx) {
156
+ el.dataset["step"] = String(ctx.at("@step1"));
157
+ el.dataset["film"] = String(ctx.film?.at("@step1") ?? 0);
158
+ },
159
+ render() {},
160
+ }),
161
+ ],
162
+ });
163
+ ```
164
+
165
+ - An anchor is looked up in the line the part says, so the speech comes from that script line: `say(s("<prefix>.<part>.say"))` or `take(…).saying(s(…))`. A name the line does not have is AK-T004.
166
+ - A name is letters, digits, `_` and `-`, once in a line; stretches may overlap. A name written twice, an end without a start, a stretch with no words and an anchor in a plural are AK-M007. An anchor goes before a `<shown|said>` piece, not inside it.
167
+ - An anchor lands by the line's letters matched to the words of its sound.
168
+ - `ctx.at("@name")` is seconds from the part's start; `ctx.film.at("@name")` is film seconds and takes an anchor of any part. `allyhub inspect timeline` prints where each landed.
169
+
170
+ ### A part's own anchors
171
+
172
+ A part names moments in seconds from its start, with no speech needed: `part({ anchors: { press: 7.1, map: [9.6, 13.4] } })`. A number is a point, `[from, to]` a stretch; `"@press"`, `"@map"`, `"@/map"` and `"@press+0.2"` work as above. A name is the line's or the part's own, not both: a name in both is AK-T004, and `"@name"` is the part's own.
173
+
174
+ ## Shown and said
175
+
176
+ A piece of a script's `say` shown one way and said another is `<shown|said>`: `from <12|twelve> fields`, `<AI|A I>`. The line as shown is what `s()` returns, titles and captions show; the line as said is what `say` reads aloud and what `saying` looks for in a recording. Either side may be empty: `<™|>` is shown and not said, `<|[laughs]>` said and not shown. In `assets/text/<lang>.json`, the same is a `{ "display", "speak" }` value.
177
+
178
+ ## Captions
179
+
180
+ Burned-in captions are a graphic layer in each part that has them: a starter component (`captionWord`, `captionLine`, `captionSubtitle`, added with `allyhub add`), a component of the project's, or `custom()`. In any layer:
181
+
182
+ - `ctx.words()` is the part's words on its clock, `{ text, start, end, confidence? }`; empty without speech.
183
+ - `ctx.captions(opts?)` is the cues heard over the part, on its clock:
184
+
185
+ ```ts fragment
186
+ type CaptionTrackCue = {
187
+ start: number;
188
+ end: number;
189
+ text: string;
190
+ words: { text: string; start: number; end: number }[];
191
+ };
192
+ ```
193
+
194
+ | Option | Default | What it is |
195
+ | --- | --- | --- |
196
+ | `maxChars` | 32 (16 for Chinese, Japanese and Korean) | Most characters in a cue |
197
+ | `maxWords` | none | Most words in a cue |
198
+ | `keep` | none | Phrases a cue never breaks inside, matched as said; the cue round one may run over the limits |
199
+ | `close` | 0.4 | A gap between two cues shorter than this many seconds closes |
200
+ | `edges` | false | `true`: the first cue from the part's start, the last to its end |
201
+
202
+ Cues come from the part's speech (a cut take's kept words, spelled as the script when there is one), break at sentence and clause ends, then by length, and never span two parts. In a J or L cut, the words heard under a neighbour's picture are there too. Where they go and which words they stress is the layer's code:
203
+
204
+ ```ts file=launch/captions.ts
205
+ import { custom } from "@allyhub/sdk";
206
+ import { emojiEl, emphasized, h, wordEmoji } from "@allyhub/sdk/dom";
207
+
208
+ export const captions = custom({
209
+ mount(el, ctx) {
210
+ for (const cue of ctx.captions({ maxChars: 20, edges: true })) {
211
+ const line = h("div", { opacity: 0 });
212
+ line.dataset["start"] = String(cue.start);
213
+ line.dataset["end"] = String(cue.end);
214
+ const stressed = emphasized(cue.words, ["free", "two minutes"]);
215
+ const emoji = wordEmoji(cue.words, { free: "🎁" });
216
+ cue.words.forEach((w, i) => {
217
+ const color = stressed[i] ? "var(--ak-color-accent)" : "inherit";
218
+ line.append(h("span", { color }, [`${w.text} `]));
219
+ const e = emoji[i];
220
+ if (e) line.append(emojiEl(e));
221
+ });
222
+ el.append(line);
223
+ }
224
+ },
225
+ render(el, t) {
226
+ for (const line of Array.from(el.children) as HTMLElement[]) {
227
+ const on =
228
+ t >= Number(line.dataset["start"]) && t < Number(line.dataset["end"]);
229
+ line.style.opacity = on ? "1" : "0";
230
+ }
231
+ },
232
+ });
233
+ ```
234
+
235
+ `emphasized` and `wordEmoji` match as said (case, accents and punctuation ignored, whole words; a phrase marks each of its words, its emoji on its last). `captionTop` and `freeAreas` measure a place for them ([layers.md](layers.md)).
236
+
237
+ Subtitle files (`allyhub render --type srt,vtt`) come from each voiced part's line. A piece whose layers call `ctx.captions()` has its subtitles cut as the first such layer asked; otherwise by `CAPTION_CUE_DEFAULTS`: one line a cue of at most 42 characters (16 in Chinese, Japanese and Korean), 0.8 to 6 s, 2 frames before the next.
238
+
239
+ ## J and L cuts
240
+
241
+ `part({ overlap: { before, after } })`, seconds from 0 to 10: `before` seconds of the part's speech play under the previous part's picture, `after` seconds under the next part's. The part's picture is shorter by them. Each is at most the part's lead (or tail) plus half its speech; the first part's `before` and the last part's `after` do nothing.
242
+
243
+ ## Speech gain
244
+
245
+ `part({ speechGainDb })` (−40 to 24, default 0) turns the part's speech up or down after it is recorded ([sound.md](sound.md#how-the-voice-was-recorded)), as an editor's clip volume: the recording's compressor does not even it out, and its room tone moves with it.
246
+
247
+ ## Words files
248
+
249
+ `<name>.words.json` beside the recording (its extension replaced): the words said in it, in the order said, with times in seconds of the file. `allyhub words` writes it; an agent may correct it. A file that does not match the format is not read (AK-T001).
250
+
251
+ ```json
252
+ {
253
+ "version": 1,
254
+ "language": "en",
255
+ "duration": 14.2,
256
+ "words": [
257
+ { "text": "So", "start": 0.42, "end": 0.6, "confidence": 0.98 },
258
+ { "text": "here", "start": 0.63, "end": 0.81 }
259
+ ]
260
+ }
261
+ ```
262
+
263
+ `version` is 1; `language` (a BCP 47 tag), `duration` (seconds) and `model` (what recognised it) are optional. Each word's `text` keeps its punctuation, `end` is at or after `start`, and `confidence` (0 to 1) is absent when recognition did not say. `$schema` may name a JSON Schema; any other field is an error.
264
+
265
+ ## Edits files
266
+
267
+ A take's cut list, a JSON file named by `.edits("./edits/<name>.json")`. It removes exactly what it lists, without touching the recording; `{ "version": 1 }` removes nothing. Which words are fillers, retakes or false starts is the agent's to decide.
268
+
269
+ ```json
270
+ {
271
+ "version": 1,
272
+ "take": "talk/host.mp4",
273
+ "remove": [{ "from": 167, "to": 189, "text": "Now second, figure out" }],
274
+ "sounds": [{ "from": 61.17, "to": 61.4 }],
275
+ "inWord": [{ "from": 12.31, "to": 12.62 }],
276
+ "maxPause": 0.35,
277
+ "pad": { "before": 0.12, "after": 0.08 }
278
+ }
279
+ ```
280
+
281
+ - `remove`: words, by their indices in the words file (both ends included), with their `text`. When the take is heard again, a range is found again by its text, nearest its old place.
282
+ - `sounds`: stretches of the file (seconds) between words; cut only between two kept words, never into one.
283
+ - `inWord`: stretches of the file cut even inside a kept word; each end moves only to the quietest 10 ms within 40 ms. One that reaches the first or last word of a part's stretch moves that end.
284
+ - `maxPause`: every pause between kept words longer than it (0.05 to 10 s) is shortened to it.
285
+ - `pad`: the silence a cut keeps, `before` it after the last kept word (default 0.12 s) and `after` it before the next kept word (default 0.08 s); never past half the silence.
286
+ - `take`: the recording it cuts, a note for people; the code names the file.
287
+ - `version` is 1; `$schema` may name a JSON Schema; any other field is an error.
288
+
289
+ Every cut lands in the silence, at the quietest 10 ms within 40 ms, on the frame grid, with 10 ms fades. The take's words, its footage and its sound follow the kept stretches. `allyhub words <take>` prints the take's words with their indices and the sounds between them; `allyhub words edits <take> <edits>` shows what an edits file keeps and removes and measures every join.
package/docs/video.md ADDED
@@ -0,0 +1,265 @@
1
+ # Videos
2
+
3
+ A video is the default export of an item's `video.ts`: `video({ …, parts })`, its parts in order, each with its speech (or a length) and its layers. Here: `video()`, formats, `part()`, layers and their stacking, transitions, the look, the camera filming the picture, post.
4
+
5
+ ```ts file=launch/film/video.ts
6
+ import { part, say, video } from "@allyhub/sdk";
7
+
8
+ export default video({
9
+ format: "16x9",
10
+ parts: ({ s }) => [
11
+ part({ key: "intro", dur: 3 }),
12
+ part({ key: "pitch", speech: say(s("launch.film.pitch.say")) }),
13
+ ],
14
+ });
15
+ ```
16
+
17
+ ## `video()`
18
+
19
+ `video(opts)` returns its fields as written, with where it was written, so another piece can spread it into its own ([Another format](#another-format-reusing-a-piece)).
20
+
21
+ Every piece, a video or a deck, has:
22
+
23
+ | Field | Type | Default | What it is |
24
+ | --- | --- | --- | --- |
25
+ | `id` | string | the item's folder, from the project's root | A stable identity ([project.md](project.md)) |
26
+ | `title` | string, or by language | the script's `title` (`<prefix>.title`), else the file name | The name people see |
27
+ | `format` | `FormatEntry` | `allyhub.config.ts` `defaults.format`, else `"16x9"` | What it is rendered as: one format ([Formats](#formats)) |
28
+ | `matrix` | `Matrix` | the project's languages | Dimensions and slots: which combos are made ([batches.md](batches.md)) |
29
+ | `meta` | `Record<string, unknown>` | none | Any key-values, plain data |
30
+
31
+ A video adds:
32
+
33
+ | Field | Type | Default | What it is |
34
+ | --- | --- | --- | --- |
35
+ | `parts` | `(ctx) => PartSpec[]`, or a promise | required | The parts, in order |
36
+ | `covers` | `(ctx) => PartSpec[]` | none | Parts without speech, each drawn at its `still` for the cover image (`allyhub render --type cover`); their layers mount on elements of their own |
37
+ | `fps` | number or string | 30 | A whole number from 1 to 120, or an NTSC rate: `23.976`, `29.97`, `47.952`, `59.94`, `119.88`, or `"24000/1001"` … |
38
+ | `transparent` | boolean | false | No background: mov, webm and png keep the alpha; mp4 and gif show black where nothing is drawn |
39
+ | `look` | string | `"clean"` | The look's name ([The look](#the-look)) |
40
+ | `defaults` | `{ part?: { dur?, lead?, tail? } }` | the project's, over `PART_DEFAULTS` | This video's part defaults |
41
+ | `music` | media, or `MusicOptions` | none | [sound.md](sound.md) |
42
+ | `mix` | `MixOptions` | `MIX_DEFAULTS` | The stems' loudness, the music's ducking and fades ([sound.md](sound.md)) |
43
+ | `master` | LUFS, `{ lufs, truePeak }`, or `false` | the profile's loudness, else −14 LUFS; −3 dBTP | What the sound is mastered to ([sound.md](sound.md)) |
44
+ | `mic` | a setup's name, its options, or `false` | `"studio"` | How the speech was recorded ([sound.md](sound.md)) |
45
+ | `capture` | `CaptureOptions` | none | A camera filming the picture ([The camera](#the-camera-filming-the-picture)) |
46
+ | `post` | `{ filter?, lut? }` | none | An ffmpeg filter chain and a `.cube` LUT over the frames ([Post](#post)) |
47
+ | `motionBlur` | `{ samples, shutter? }` | none | [Motion blur](#motion-blur) |
48
+ | `maxDuration` | seconds | none | The longest a combo may last; longer is AK-X006 |
49
+ | `deliverable` | boolean | true | `false`: only shown inside another video. Rendered only when named; the check leaves out the facts about watching it as a film |
50
+ | `loadLimit` | seconds | 10 (`LOAD_LIMIT`) | How long loading may take; longer is AK-P002 |
51
+ | `seekLimit` | seconds | 30 (`SEEK_LIMIT`) | How long one moment may take to draw; longer is AK-P003. Loading waits for its layers' work at most 4 times as long |
52
+
53
+ ### The parts function's `ctx`
54
+
55
+ `parts`, `covers` (and a deck's `pages`) get a `PieceContext`:
56
+
57
+ | Name | What it is |
58
+ | --- | --- |
59
+ | `ctx.combo` | This combo: one value per dimension and, with slots, its structure and one candidate per slot (`{ lang: "en", hook: "price" }`) |
60
+ | `ctx.s` | The combo's text: `s(key, hint?)`, `s.list(prefix)`, `s.with(key, inputs)` ([project.md](project.md)) |
61
+ | `ctx.asset(path)` | Media at a path made at run time, relative to the piece's file; fixed paths are imports |
62
+ | `ctx.data(path)` | A data file (CSV rows, YAML, JSON) at a path made at run time, parsed: cast it, `ctx.data(path) as Plan[]` |
63
+ | `ctx.pool(slot)` | The file a pool slot picked in this combo, as a path `footage()` and `ctx.asset()` take ([batches.md](batches.md)) |
64
+ | `ctx.look` | The look |
65
+
66
+ ### Another format: reusing a piece
67
+
68
+ A piece has one format. Another format is another item that imports what it shares:
69
+
70
+ ```ts file=launch/film-vertical/video.ts
71
+ import { video } from "@allyhub/sdk";
72
+ import film from "../film/video.ts";
73
+
74
+ export default video({ ...film, id: "launch/film-vertical", format: "9x16" });
75
+ ```
76
+
77
+ A path written as a string (a take's, footage's, a sound's, `music`, `post.lut`) is relative to the module that wrote it, also once spread into another piece; a field the new piece writes again is relative to the new piece.
78
+
79
+ ## Formats
80
+
81
+ | Format | Pixels | Covered edges |
82
+ | --- | --- | --- |
83
+ | `16x9`, `9x16`, `1x1`, `4x5` | 1920 × 1080, 1080 × 1920, 1080 × 1080, 1080 × 1350 | the preset's (`PRESETS`) |
84
+ | a platform profile | the platform's | the platform's interface |
85
+ | `WIDTHxHEIGHT` | each side 64 to 8192, even for a video | none |
86
+ | `a4`, `letter` (slides only) | at 150 dpi | none |
87
+
88
+ The **platform profiles** (`PROFILES`) are `tiktok`, `reels`, `shorts`, `meta-feed`, `amazon` and `linkedin`: a frame with the edges the platform's interface covers, its longest video (AK-F001), the loudness the sound is mastered to when the video sets no `master`, and how `allyhub render` encodes an mp4 for it. Every preset's and profile's numbers: [defaults.md](defaults.md). Any other format is AK-G001.
89
+
90
+ A format can change its numbers with a `FormatSpec`; its name stays the format's own (combos and file names use it):
91
+
92
+ ```ts fragment
93
+ format: { format: "tiktok", safe: { bottom: 520 }, maxDuration: 60, loudness: -16 }
94
+ ```
95
+
96
+ `safe` (whole pixels per edge, any format; edges not given keep the format's) changes the covered edges; `maxDuration` (seconds) and `loudness` (LUFS) belong to a platform profile only.
97
+
98
+ A layer reads `ctx.format` (the name) and `ctx.dims`: `{ width, height, orient, safe, profile? }`, `orient` `"landscape"`, `"portrait"` or `"square"`, `safe` the covered edges in pixels. Lay out by `ctx.dims` or `layout(ctx)` ([layers.md](layers.md#the-content-box)), not by the name: a custom `WxH` or a changed `safe` has none of its own.
99
+
100
+ ## Parts
101
+
102
+ `part(opts)` makes a part of a video, or a page of a deck.
103
+
104
+ ```ts
105
+ import { part, take } from "@allyhub/sdk";
106
+
107
+ export const demo = part({
108
+ key: "demo",
109
+ title: "Demo",
110
+ speech: take("./vo/en.mp3").range("Paste your link", "and you're done"),
111
+ lead: 0.3,
112
+ tail: 0.5,
113
+ still: "done",
114
+ transition: { type: "push", direction: "up", dur: 0.5 },
115
+ overlap: { before: 0.4 },
116
+ });
117
+
118
+ export const end = part({ key: "end", dur: 3, transition: "fade" });
119
+ ```
120
+
121
+ | Option | Type | Default | What it is |
122
+ | --- | --- | --- | --- |
123
+ | `key` | string | required | Unique in the video (a repeat is AK-K001), stable across combos. A part whose key is a slot's name fills that slot |
124
+ | `title` | string | its largest text at its still that not every part shows | Its name for people: the timeline, a note |
125
+ | `slot` | string | its key, when that is a slot's name | The slot it fills, when the piece has slots ([batches.md](batches.md)) |
126
+ | `speech` | `take(…)`, `say(…)` | none: silent | What it says ([speech.md](speech.md)) |
127
+ | `dur` | seconds | 4 (`defaults.part.dur`) | The length of a part without speech; ignored with speech |
128
+ | `lead`, `tail` | seconds | 0.2, 0.3 (`defaults.part`) | Before the first word, after the last |
129
+ | `layers` | `LayerSpec[]` | none | What it shows, back to front ([Layers](#layers)) |
130
+ | `still` | word reference, seconds, or `(dur) => seconds` | 0.4 s before its end | The moment drawn for a cover, a sheet, a page |
131
+ | `transition` | a type's name or `TransitionSpec` | a cut | How it comes in from the part before ([Transitions](#transitions)) |
132
+ | `overlap` | `{ before?, after? }`, seconds, 0 to 10 | none | J and L cuts: `before` seconds of its speech play under the previous part's picture, `after` under the next part's |
133
+ | `anchors` | `{ name: seconds \| [from, to] }` | none | Named moments of the part, from its start ([speech.md](speech.md)) |
134
+ | `sounds` | `SoundSpec[]` | none | Sound effects ([sound.md](sound.md)) |
135
+ | `mic` | as the video's | the video's | How this part's speech was recorded |
136
+ | `speechGainDb` | dB, −40 to 24 | 0 | Its speech turned up or down after it is recorded |
137
+ | `post` | `{ filter }` | none | The part's own grade ([Post](#post)) |
138
+ | `tags` | string[] | none | Labels the matrix's rules read ([batches.md](batches.md)) |
139
+
140
+ `part()` throws for a value it cannot use (an empty key, an `overlap` or a gain out of range, a bad transition, anchor, `mic` or `post`), and for a take played at another speed in a part that shows the take's own picture.
141
+
142
+ **A part's length.** A part with speech lasts `lead` + its speech (its first word to its last) + `tail`; its picture is shorter by its `overlap`. A part without speech lasts `dur`; with `music.snap` it ends on the music's beat ([sound.md](sound.md)). Parts follow each other on the frame grid. Lengths are worked out from the speech each time: change a take and the parts follow.
143
+
144
+ Part defaults, from the weakest: `PART_DEFAULTS`, `allyhub.config.ts`'s `defaults.part`, the video's `defaults.part`, the part's own.
145
+
146
+ ## Layers
147
+
148
+ A part's layers are drawn back to front in the order listed, footage and graphics alike: a graphic layer listed before a footage layer is under it, one between two is between them. Footage layers are `footage()` ([footage.md](footage.md)); graphic layers are made by a component or `custom()` ([layers.md](layers.md)).
149
+
150
+ Every layer takes:
151
+
152
+ | Option | Type | Default | What it is |
153
+ | --- | --- | --- | --- |
154
+ | `at` | word reference or seconds | 0 | When it starts, from the part's start |
155
+ | `until` | word reference or seconds | the part's end | When it stops |
156
+ | `dur` | seconds | | Its length from `at`, when there is no `until` |
157
+ | `z` (graphic layers) | `"front"`, `"behind-person"`, `"overlay"` | `"front"` | Where it stacks |
158
+
159
+ A word reference is a word the part says (`"inbox"`, `"inbox@2"`, `"inbox+0.2"`), an anchor (`"@press"`), or seconds ([speech.md](speech.md)).
160
+
161
+ **Stacking (`z`).**
162
+
163
+ - `"front"`: at its place in the list.
164
+ - `"behind-person"`: drawn right over the part's own footage (the `footage()` without a file) wherever it is listed, and under that take's speaker, who is cut out with the take's person matte ([footage.md](footage.md)).
165
+ - `"overlay"`: over the finished picture, as an app lays captions and stickers over a filmed video: over every other layer, and not marked by `capture`, `motionBlur`, `post` or the LUT. In a transition's window each part's overlays move and fade with its picture.
166
+
167
+ ## Transitions
168
+
169
+ Parts join with cuts. A part comes in with a transition only when it says so: `transition: "fade"`, or a type with its options.
170
+
171
+ | Type | What happens | Its own options |
172
+ | --- | --- | --- |
173
+ | `fade` | A crossfade | |
174
+ | `dip` | The part before fades to a colour, this part fades in from it | `color`: a CSS colour; default the look's background |
175
+ | `slide` | This part travels in over the part before, which stays | `direction`: `"left"` (default), `"right"`, `"up"`, `"down"` |
176
+ | `push` | This part pushes the part before out, both travelling | `direction` |
177
+ | `wipe` | An edge travels across and uncovers this part; neither picture moves | `direction` |
178
+ | `zoom` | The part before grows to `scale` while this part fades in, settling from `from` | `scale` (over 1, up to 4; default 1.2), `from` (0.1 to 4; default `scale`; under 1 it grows in instead) |
179
+ | `custom` | The channels given directly | `out`, `in`, `color` |
180
+
181
+ Every type takes `dur` (over 0, up to 10 s; default 0.4), `ease` (`"linear"`, `"in"`, `"out"`, `"in-out"`; default `"linear"` for fade, dip and custom, `"in-out"` for the others) and `split` (0 to 1, the share of the window before the join; default 0.5). Defaults: `TRANSITION_DEFAULTS`.
182
+
183
+ - Parts keep their lengths and places: the window lies across the join. Outside its own time a part's graphics hold its first or last frame and its footage runs on in its file.
184
+ - The whole picture transitions, footage and graphics together. In a `transparent` video a fade adds the two pictures, weighted.
185
+ - Sound is not changed: place a sound on the join with `sounds`.
186
+ - The first part's transition is ignored, and so is a deck's.
187
+
188
+ A `custom` transition gives `out` (the part before) and `in` (this part, over it) as `{ x, y, scale, opacity, clip: { left, right, top, bottom } }`, and `color: { value?, opacity }`, a colour between them. Each channel is a number (held), `[from, to]`, or keys `[{ p, v }]` over the progress `p` (0 to 1, in order, linear between keys, after `ease`). `x` and `y` are shares of the frame's width and height (−4 to 4), `scale` is about the frame's centre (0.01 to 8), `opacity` and `clip` are 0 to 1. Channels not given rest.
189
+
190
+ ```ts
191
+ import { part } from "@allyhub/sdk";
192
+
193
+ export const slideIn = part({
194
+ key: "custom",
195
+ dur: 2,
196
+ transition: {
197
+ type: "custom",
198
+ dur: 0.6,
199
+ ease: "out",
200
+ out: { x: [0, -0.3], opacity: [1, 0] },
201
+ in: { x: [1, 0] },
202
+ },
203
+ });
204
+ ```
205
+
206
+ ## The look
207
+
208
+ A look is the variables layers draw with: `ctx.look`, and the same as CSS variables on the stage.
209
+
210
+ | Token | CSS variable |
211
+ | --- | --- |
212
+ | `color.bg`, `fg`, `accent`, `muted`, `surface` | `--ak-color-bg`, `--ak-color-fg` … |
213
+ | `font.display`, `body`, `mono`, `emoji` | `--ak-font-display` … |
214
+ | `motion.beat`, seconds per beat | `--ak-motion-beat` |
215
+ | `sfx`: sounds by name | |
216
+
217
+ The built-in look is `clean` (`CLEAN_LOOK`; its values in [defaults.md](defaults.md)). `allyhub.config.ts`'s `look` (`{ color?, font?, motion?, sfx? }`, each field optional) is laid over it for every video and deck in the project, under the same name ([project.md](project.md)). `sfx` names audio files relative to the project's root; every look also has the synthesized `whoosh`, `tick` and `pop`, unless it gives a file of the same name. `clean`'s `font.mono` is the computer's own monospace: bring a font for code.
218
+
219
+ ## The camera filming the picture
220
+
221
+ `capture` is what a camera filming the picture does to it, before `post`. Each mark is drawn only when given; `{}` takes that mark's defaults (`CAPTURE_DEFAULTS`). Lengths are px at 1080 lines.
222
+
223
+ | Field | What it is | Range |
224
+ | --- | --- | --- |
225
+ | `bloom: { threshold, radius, strength }` | Light above `threshold` blurred by `radius` and added at `strength` | 0–0.99, 0–200, 0–1 |
226
+ | `aberration` | Red and blue drawn apart at the corners by this many px, less toward the centre | 0–20 |
227
+ | `soften` | The lens's softness, a Gaussian blur's sigma | 0–20 |
228
+ | `vignette` | How much darker the corners are | 0–0.99 |
229
+ | `exposure: { drift, period }` | The exposure breathing as a phone meters: stops, over seconds | drift 0–2, period over 0 |
230
+ | `grain: { amount, size, shadows, highlights, chroma, chromaSize, static }` | `amount`: its deviation at middle grey (share of full scale); `size`: its softness; × `shadows` at black, × `highlights` at white, drawn smaller near either end so nothing clips; `chroma`: each channel's own noise, softer by `chromaSize`; `static`: the same grain every frame | amount 0–0.166 |
231
+ | `sharpen` | The phone's sharpening: unsharp masking's amount | 0–5 |
232
+
233
+ Each frame's marks are a function of its frame number in the film: a still is the render's frame, and nothing starts again at a cut. `allyhub frames compare` measures grain and edge softness against a reference's frame.
234
+
235
+ ## Post
236
+
237
+ `post: { filter?, lut? }` runs over the frames after the camera's marks: one ffmpeg filter chain, then a 3D LUT (`.cube`) at a path relative to the module that wrote it.
238
+
239
+ - One chain: no `;`, no `[labels]`, no filter that reads or writes files.
240
+ - It gets the picture opaque as 8-bit planar RGB (`gbrp`), its `t` the film's time, and what it gives back is made opaque `gbrp` again.
241
+ - Use `t`, not `n`: `n` counts from each segment's first frame. A chain whose frames depend on where a segment starts (`n`, a seed drawn per frame, neighbouring frames) is AK-D002; one that does not run is AK-M001.
242
+
243
+ A part's `post: { filter }` is the same contract on that part's picture alone, before the camera's marks and the video's `post`: a clip's white balance or exposure.
244
+
245
+ ```ts
246
+ import { part, video } from "@allyhub/sdk";
247
+
248
+ export default video({
249
+ format: "9x16",
250
+ capture: { grain: {}, vignette: 0.2, soften: 1 },
251
+ post: { filter: "eq=contrast=1.05:saturation=1.1", lut: "./grade.cube" },
252
+ motionBlur: { samples: 4 },
253
+ parts: () => [
254
+ part({
255
+ key: "hook",
256
+ dur: 3,
257
+ post: { filter: "colortemperature=temperature=4800" },
258
+ }),
259
+ ],
260
+ });
261
+ ```
262
+
263
+ ## Motion blur
264
+
265
+ `motionBlur: { samples, shutter? }`: each frame blends `samples` (2 to 16) moments of the graphic layers across `shutter` of the frame's time (over 0, up to 1; default 0.5, a 180° shutter). Footage is not blurred again. `z: "overlay"` layers are not blurred.
@@ -0,0 +1,52 @@
1
+ /** Decibels of an amplitude (1 is full scale), rounded to 0.1, at least −120. */
2
+ export declare const db: (x: number) => number;
3
+ /** A stretch in seconds. */
4
+ export interface Band {
5
+ start: number;
6
+ end: number;
7
+ }
8
+ export interface SilenceOptions {
9
+ /** Seconds of the first sample (default 0). */
10
+ t0?: number;
11
+ /** Silence is under this, dBFS (default −40). */
12
+ threshold?: number;
13
+ /** The RMS window, seconds (default 0.01). */
14
+ window?: number;
15
+ /** The shortest band, seconds (default 0.03). */
16
+ minLength?: number;
17
+ }
18
+ /**
19
+ * Stretches where the sound stays under `threshold` dBFS (RMS over
20
+ * `window` seconds) for at least `minLength` seconds.
21
+ */
22
+ export declare function silenceBands(s: Float32Array, rate: number, o?: SilenceOptions): Band[];
23
+ /** The sound at a cut, in dBFS and dB. */
24
+ export interface CutSound {
25
+ /** RMS over the 10 ms around the cut. */
26
+ levelDb: number;
27
+ /** RMS over 20–150 ms before and after the cut. */
28
+ aroundDb: number;
29
+ /** The highest sample within 5 ms of the cut. */
30
+ peakDb: number;
31
+ /**
32
+ * The largest step between two samples within 2 ms of the cut, against
33
+ * the steps 5–150 ms around it (their 99th percentile, at least −60
34
+ * dBFS): above 0 the cut has a sharper edge than the sound beside it; a
35
+ * click is a large step in quiet sound. At least −60: in silence a step
36
+ * means nothing.
37
+ */
38
+ jumpDb: number;
39
+ }
40
+ /** The sound at sample `at` of `s`. */
41
+ export declare function soundAtCut(s: Float32Array, rate: number, at: number): CutSound;
42
+ /** Samples as `columns` [min, max] pairs, for drawing a waveform. */
43
+ export declare function waveColumns(s: Float32Array, columns: number): [min: number, max: number][];
44
+ /** The level in dBFS over windows of `window` seconds, each at its middle's time from `t0`. */
45
+ export declare function levelCurve(s: Float32Array, rate: number, o?: {
46
+ t0?: number;
47
+ window?: number;
48
+ }): {
49
+ t: number;
50
+ db: number;
51
+ }[];
52
+ //# sourceMappingURL=at-cut.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ const p=t=>Math.round(t*1e3)/1e3;export const db=t=>t>1e-6?Math.round(20*Math.log10(t)*10)/10:-120;function f(t,l,o){const n=Math.max(0,l),a=Math.min(t.length,o);if(a<=n)return 0;let s=0;for(let h=n;h<a;h++){const u=t[h]??0;s+=u*u}return Math.sqrt(s/(a-n))}export function silenceBands(t,l,o={}){const n=o.t0??0,a=o.threshold??-40,s=Math.max(1,Math.round((o.window??.01)*l)),h=o.minLength??.03,u=[];let c;const i=e=>{c!==void 0&&(e-c)/l>=h-1e-9&&u.push({start:p(n+c/l),end:p(n+e/l)}),c=void 0};for(let e=0;e<t.length;e+=s){const M=db(f(t,e,e+s))<a;M&&c===void 0?c=e:M||i(e)}return i(t.length),u}export function soundAtCut(t,l,o){const n=r=>Math.round(r/1e3*l),a=db(f(t,o-n(5),o+n(5))),s=f(t,o-n(150),o-n(20)),h=f(t,o+n(20),o+n(150)),u=db(Math.sqrt((s*s+h*h)/2));let c=0;for(let r=Math.max(0,o-n(5));r<Math.min(t.length,o+n(5));r++)c=Math.max(c,Math.abs(t[r]??0));const i=r=>Math.abs((t[r]??0)-(t[r-1]??0));let e=0;for(let r=Math.max(1,o-n(2));r<=Math.min(t.length-1,o+n(2));r++)e=Math.max(e,i(r));const M=[];for(const[r,m]of[[o-n(150),o-n(5)],[o+n(5),o+n(150)]])for(let d=Math.max(1,r);d<Math.min(t.length,m);d++)M.push(i(d));M.sort((r,m)=>r-m);const x=M[Math.floor(M.length*.99)]??0,g=10**(-60/20);return{levelDb:a,aroundDb:u,peakDb:db(c),jumpDb:Math.max(-60,Math.round(20*Math.log10(Math.max(e,1e-9)/Math.max(x,g))*10)/10)}}export function waveColumns(t,l){const o=[],n=t.length/l;for(let a=0;a<l;a++){const s=Math.floor(a*n),h=Math.max(s+1,Math.floor((a+1)*n));let u=0,c=0;for(let i=s;i<Math.min(h,t.length);i++){const e=t[i]??0;e<u&&(u=e),e>c&&(c=e)}o.push([u,c])}return o}export function levelCurve(t,l,o={}){const n=Math.max(1,Math.round((o.window??.01)*l)),a=o.t0??0,s=[];for(let h=0;h<t.length;h+=n)s.push({t:a+(h+n/2)/l,db:db(f(t,h,Math.min(t.length,h+n)))});return s}
@@ -0,0 +1,33 @@
1
+ import type { MixPlan, SpeechClip, Stereo } from "./plan.js";
2
+ import type { ClipSource } from "./voice.js";
3
+ /** How a file is decoded for the mix: a take's noise reduction and speed, a stem's filter. */
4
+ export interface DecodeAs {
5
+ denoise?: number | undefined;
6
+ speed?: number | undefined;
7
+ filter?: string | undefined;
8
+ }
9
+ /** One file's decoding, as a key: the same file decoded alike is decoded once. */
10
+ export declare const decodeKey: (file: string, how: DecodeAs) => string;
11
+ /**
12
+ * A decoded file as the mix asks for it: its two channels, and what of
13
+ * the asking it was made with (`made.speed`: the take's second s is at s
14
+ * / speed; a speed not made is resampled, its pitch moved). The player
15
+ * may have a file only as recorded until the host has made it.
16
+ */
17
+ export type SoundOf = (file: string, how: DecodeAs) => {
18
+ src: Stereo;
19
+ made: DecodeAs;
20
+ } | undefined;
21
+ /** The speech's decoding of a clip: its denoise and its speed (pitch kept). */
22
+ export declare const speechHow: (c: SpeechClip) => DecodeAs;
23
+ /** Every decoding a plan asks for, so a host can make them before mixing. */
24
+ export declare function decodings(plan: MixPlan): {
25
+ file: string;
26
+ how: DecodeAs;
27
+ }[];
28
+ /**
29
+ * Each speech clip's source found: as the host made it (sped already,
30
+ * `stretched`), or as recorded, to be resampled.
31
+ */
32
+ export declare function clipSource(sound: SoundOf): (c: SpeechClip) => ClipSource | undefined;
33
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const decodeKey=(e,i)=>`${e}\0${String(i.denoise??0)}\0${String(i.speed??1)}\0${i.filter??""}`,speechHow=e=>({...e.denoise?{denoise:e.denoise}:{},...e.speed!==void 0&&e.speed!==1?{speed:e.speed}:{}});export function decodings(e){const i=new Map,t=(s,d)=>i.set(decodeKey(s,d),{file:s,how:d});for(const s of e.speech)t(s.file,speechHow(s));for(const s of e.footage)t(s.file,{});e.music&&t(e.music.file,e.music.shape?.filter?{filter:e.music.shape.filter}:{});for(const s of e.sfx)s.file!==void 0&&t(s.file,s.shape?.filter?{filter:s.shape.filter}:{});return[...i.values()]}export function clipSource(e){return i=>{const t=e(i.file,speechHow(i));if(!t)return;const s=i.speed!==void 0&&i.speed!==1?i.speed:void 0;return s!==void 0&&t.made.speed===s?{src:t.src,stretched:s}:{src:t.src}}}