hyperframes 0.9.8 → 0.9.10

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 (245) hide show
  1. package/dist/{add-KCOZUTMS.js → add-AFD3HNXB.js} +12 -12
  2. package/dist/{agentPromptGenerator-P75AWDLA.js → agentPromptGenerator-XNGPKVEX.js} +9 -9
  3. package/dist/{animatedGifPrep-OBZTJQ7X.js → animatedGifPrep-E3PYKFJ3.js} +9 -9
  4. package/dist/api.js +29 -29
  5. package/dist/{asset-N3A7GB3E.js → asset-P6SF46UX.js} +2 -2
  6. package/dist/{assetCataloger-OQYRQZLW.js → assetCataloger-SDFP4DWL.js} +10 -10
  7. package/dist/{audio-KCKNENFH.js → audio-DFQXEAEE.js} +26 -26
  8. package/dist/{auth-Y72WHJCW.js → auth-T62ANGDQ.js} +2 -2
  9. package/dist/{autoUpdate-DLNFGTN2.js → autoUpdate-3IT56KGL.js} +23 -16
  10. package/dist/{backgroundChecks-EFVHAYNQ.js → backgroundChecks-UKBVUYML.js} +3 -3
  11. package/dist/backgroundChecksWorker.js +3 -3
  12. package/dist/{batchRender-JKOGFHLU.js → batchRender-ZDL65J7N.js} +4 -4
  13. package/dist/{beats-RIKKG4N7.js → beats-7UFMDXBY.js} +11 -11
  14. package/dist/{benchmark-7TCK3SGH.js → benchmark-LCSHBJJF.js} +9 -9
  15. package/dist/billing-5YSYJJ2V.js +142 -0
  16. package/dist/{browser-4BF7NKPF.js → browser-5DZHA4EW.js} +3 -3
  17. package/dist/{bundleWithLocalizedFonts-PAWHGZRW.js → bundleWithLocalizedFonts-TJL2JWRD.js} +2 -2
  18. package/dist/{capture-5PZTT5O7.js → capture-HLC6I4RE.js} +3 -3
  19. package/dist/{capture-H7UDNHF2.js → capture-UKWY3SZQ.js} +22 -22
  20. package/dist/{captureCompositionFrame-LR2XKVKX.js → captureCompositionFrame-YMB3CKSP.js} +14 -14
  21. package/dist/{catalog-4W5XDIKM.js → catalog-F2XB4VPP.js} +12 -12
  22. package/dist/{catch-up-H2Y2WRIA.js → catch-up-HCBA3MIP.js} +4 -4
  23. package/dist/{check-NG6FULCN.js → check-E2RQCELF.js} +44 -44
  24. package/dist/{checkAudio-HI5ICPRV.js → checkAudio-R4DRK3VG.js} +17 -17
  25. package/dist/{checkBrowser-YPPMCXET.js → checkBrowser-NGY225IO.js} +39 -37
  26. package/dist/{chunk-4WJKSTDS.js → chunk-2CKL2FUJ.js} +3 -3
  27. package/dist/{chunk-6RD46YOJ.js → chunk-2QMEP4LR.js} +1 -1
  28. package/dist/{chunk-RPVL65M7.js → chunk-2WNIF4YT.js} +6 -6
  29. package/dist/{chunk-WF4TXIXY.js → chunk-3DWH6Z5U.js} +1 -1
  30. package/dist/{chunk-2MUWGYXQ.js → chunk-3XHWHH5A.js} +60 -44
  31. package/dist/{chunk-VX3JUOZ6.js → chunk-42TYQPES.js} +2 -2
  32. package/dist/{chunk-5D23BECZ.js → chunk-5CDTGHED.js} +1 -1
  33. package/dist/{chunk-XPN7SDFQ.js → chunk-6HO6QKYG.js} +9 -9
  34. package/dist/{chunk-KKPYNKZD.js → chunk-6KV3CMY2.js} +1 -1
  35. package/dist/{chunk-7TAS4BNT.js → chunk-6UZLHLFP.js} +2 -2
  36. package/dist/{chunk-WY4J37EZ.js → chunk-6VKYITOR.js} +30 -8
  37. package/dist/{chunk-THSTFHB7.js → chunk-7RM3TB62.js} +29 -2
  38. package/dist/{chunk-YXIXTFRO.js → chunk-7VGM5TLZ.js} +2 -2
  39. package/dist/{chunk-TLBSOI2R.js → chunk-7VOLQUA2.js} +1 -1
  40. package/dist/{chunk-RULCW25D.js → chunk-7VU4RBHC.js} +15 -14
  41. package/dist/{chunk-GSZAUB3W.js → chunk-7W5ZDOLW.js} +2 -2
  42. package/dist/{chunk-D7THUO4V.js → chunk-A33GFLPY.js} +22 -2
  43. package/dist/{chunk-74VSOKKS.js → chunk-ABI256T5.js} +1 -1
  44. package/dist/chunk-AHLDGEH5.js +158 -0
  45. package/dist/{chunk-7DQHV322.js → chunk-AUYRWWFL.js} +3 -3
  46. package/dist/{chunk-FNNNGI42.js → chunk-AVNF52HR.js} +1 -1
  47. package/dist/{chunk-ODIGIQ4C.js → chunk-B5GWDPUO.js} +3 -3
  48. package/dist/{chunk-JCOECSLT.js → chunk-BHL4KN3H.js} +2 -2
  49. package/dist/{chunk-6DTXWYZA.js → chunk-BYC4C4YY.js} +9 -9
  50. package/dist/{chunk-7HRQOEYY.js → chunk-C3NC67BB.js} +8 -8
  51. package/dist/{chunk-6CEQCL6O.js → chunk-CBTBVRXB.js} +3 -3
  52. package/dist/{chunk-ZAOQWCZM.js → chunk-CDSTLOB7.js} +9 -9
  53. package/dist/{chunk-RWQANKWK.js → chunk-CPMTEWQM.js} +3 -3
  54. package/dist/{chunk-NU5LJYAT.js → chunk-CUYVIDGF.js} +4 -3
  55. package/dist/{chunk-GZZE2OJP.js → chunk-DKROJ3GJ.js} +16 -15
  56. package/dist/{chunk-BCQ42FAS.js → chunk-E2YXF2EP.js} +3 -3
  57. package/dist/{chunk-OYN54RSU.js → chunk-EBUA6NWH.js} +2 -2
  58. package/dist/{chunk-DHIXDUET.js → chunk-EN6MPNZT.js} +4 -4
  59. package/dist/{chunk-MNX7CK5N.js → chunk-GAKRZZHQ.js} +2 -2
  60. package/dist/{chunk-457LNKMV.js → chunk-GIYZMGYT.js} +1 -1
  61. package/dist/{chunk-UUW654GD.js → chunk-GRUI2S2F.js} +2 -2
  62. package/dist/{chunk-WVH6VWMY.js → chunk-JZPUXDQE.js} +4 -4
  63. package/dist/{chunk-SACHIPZP.js → chunk-LR5NVYZT.js} +1 -1
  64. package/dist/{chunk-QPTQSM3D.js → chunk-LTBBFLOM.js} +1 -1
  65. package/dist/{chunk-7VHS56BT.js → chunk-LV5SL4YW.js} +2 -2
  66. package/dist/{chunk-Q3SKYJGG.js → chunk-M6JFR7KF.js} +18 -5
  67. package/dist/{chunk-2ZQ7BZOS.js → chunk-MDMQD6BV.js} +6 -6
  68. package/dist/{chunk-HVBQL3PZ.js → chunk-MHZ7NSL5.js} +1 -1
  69. package/dist/{chunk-JP2ZSFRJ.js → chunk-MWHTLXG4.js} +4 -54
  70. package/dist/{chunk-NUFOXUDF.js → chunk-N6FGHJ7X.js} +53 -29
  71. package/dist/{chunk-ECJCBLME.js → chunk-N74N2I2K.js} +1 -1
  72. package/dist/{chunk-Y3RERZRQ.js → chunk-NBWYATVA.js} +1 -1
  73. package/dist/{chunk-3BCLDK6O.js → chunk-NCP3JQ6S.js} +99 -93
  74. package/dist/{chunk-UQDO2L6F.js → chunk-NVYVI4FR.js} +17 -14
  75. package/dist/{chunk-M336YVCP.js → chunk-NWQFOHXF.js} +1 -1
  76. package/dist/{chunk-E2SVAOS6.js → chunk-OAFGA2FR.js} +4 -3
  77. package/dist/{chunk-TODLF56D.js → chunk-P4WYY52Y.js} +1 -1
  78. package/dist/{chunk-3LLFF6EE.js → chunk-PO7LSMN5.js} +1 -1
  79. package/dist/{chunk-4MDLXE3N.js → chunk-PPMCILED.js} +37 -5
  80. package/dist/{chunk-L3ZVUQGN.js → chunk-PYUS627M.js} +2 -2
  81. package/dist/{chunk-DT6NGXSS.js → chunk-Q3IT7I2K.js} +1 -1
  82. package/dist/{chunk-VKWAW4JW.js → chunk-Q3W7TDQX.js} +236 -193
  83. package/dist/{chunk-UPN4UMT7.js → chunk-QBPZHOEJ.js} +2 -2
  84. package/dist/{chunk-3YZ3LNXV.js → chunk-QOF7XZEI.js} +1 -1
  85. package/dist/{chunk-VLHCR3G2.js → chunk-QPEDM2ZR.js} +2 -2
  86. package/dist/{chunk-F6GJUCIY.js → chunk-QRCORKYC.js} +2 -2
  87. package/dist/{chunk-ZAXAT2D7.js → chunk-QUBVGS27.js} +5 -5
  88. package/dist/{chunk-BUYV2WGV.js → chunk-R7EKEIAK.js} +1 -1
  89. package/dist/{chunk-ZJ5ZLU2I.js → chunk-RZFW7FBA.js} +2 -2
  90. package/dist/{chunk-RGYPRUQP.js → chunk-S2UKSI3C.js} +1 -1
  91. package/dist/{chunk-TDIYINK6.js → chunk-SG4YBQPY.js} +2 -2
  92. package/dist/chunk-SRVAYGTN.js +62 -0
  93. package/dist/{chunk-K6QVKO7M.js → chunk-SSZTRWKQ.js} +2 -2
  94. package/dist/{chunk-W5VDIXYL.js → chunk-UDBNPVUR.js} +1 -1
  95. package/dist/{chunk-HFNB2CG3.js → chunk-V6HV2IDT.js} +6 -3
  96. package/dist/{chunk-CUR5UYYJ.js → chunk-VM6T3Z6B.js} +1 -1
  97. package/dist/{chunk-SBA4NG7Q.js → chunk-W4Q6VYPZ.js} +7 -7
  98. package/dist/{chunk-6ZICZOMN.js → chunk-W5AUD5OL.js} +2 -2
  99. package/dist/{chunk-CCFSUSAE.js → chunk-WCETVN3N.js} +65 -14
  100. package/dist/{chunk-QTEU6NL3.js → chunk-WP5QHNXN.js} +5 -5
  101. package/dist/{chunk-BGHKFD3T.js → chunk-WWBEAKTO.js} +10 -2
  102. package/dist/{chunk-X422IJKF.js → chunk-WWPOGMNX.js} +1 -1
  103. package/dist/{chunk-UGUYWTWD.js → chunk-XLPCBE2Q.js} +4 -4
  104. package/dist/{chunk-5SCOPSVL.js → chunk-XTYNW745.js} +1 -1
  105. package/dist/{chunk-BGMMC352.js → chunk-XX77LLFJ.js} +6 -6
  106. package/dist/chunk-Y3ICFPFK.js +5035 -0
  107. package/dist/{chunk-NST5G3WX.js → chunk-YTNHZT47.js} +2 -2
  108. package/dist/{chunk-AC3TSGGG.js → chunk-YXSM33UC.js} +35 -30
  109. package/dist/{chunk-H4D2X5N3.js → chunk-ZD3MK4H5.js} +1 -1
  110. package/dist/{chunk-6A4RAHMF.js → chunk-ZLN3AJKT.js} +1 -1
  111. package/dist/{chunk-ZK3GFNHM.js → chunk-ZMXFRRQR.js} +191 -49
  112. package/dist/{clean-VPOP4TU4.js → clean-BXHJEVVO.js} +23 -23
  113. package/dist/cli.js +61 -60
  114. package/dist/{cloud-Q7ZXCZ6E.js → cloud-ISWLTHGP.js} +4 -4
  115. package/dist/cloud-Z3FNCC4T.js +39 -0
  116. package/dist/{cloudrun-6DVAE7GG.js → cloudrun-N737TJRC.js} +6 -6
  117. package/dist/{compare-X5SWN5XJ.js → compare-MLZYDSZD.js} +34 -34
  118. package/dist/{compiler-N4TTEEQC.js → compiler-NAIDMQFU.js} +6 -6
  119. package/dist/{component-MJXAMRKF.js → component-MMBTCMY3.js} +3 -3
  120. package/dist/{compositions-F3ZHG5F4.js → compositions-WT2577NJ.js} +15 -15
  121. package/dist/{curve-4TWENQO7.js → curve-HHKVZ6LX.js} +13 -13
  122. package/dist/{cuts-X3LE5A2K.js → cuts-66GBRT5P.js} +14 -14
  123. package/dist/{delete-MYHKF3MS.js → delete-P3WYOC7I.js} +7 -5
  124. package/dist/{deploy-OP2BHWCQ.js → deploy-OJ3M7QJQ.js} +6 -6
  125. package/dist/{describeProject-ZMKVHAYX.js → describeProject-DN6YQU3X.js} +10 -10
  126. package/dist/{deterministicFonts-H4RC6TOJ.js → deterministicFonts-GQMT52JQ.js} +2 -2
  127. package/dist/{diff-7ZNSFBKV.js → diff-R74KQXXN.js} +158 -76
  128. package/dist/dist-CCPYPKOC.js +197 -0
  129. package/dist/{dist-SWPSKAAJ.js → dist-GUX66F7V.js} +3 -3
  130. package/dist/{dist-H4C7ZCFU.js → dist-PCVNVAVC.js} +4 -4
  131. package/dist/{doctor-ABSXYNXY.js → doctor-DT52W4UE.js} +13 -13
  132. package/dist/{energy-X2OAWHME.js → energy-WOMDOOLC.js} +14 -14
  133. package/dist/{events-26SWSHDR.js → events-PCK4AIN5.js} +2 -2
  134. package/dist/{events-JFIZSYMH.js → events-WEVZ2ELP.js} +16 -16
  135. package/dist/{events-4MDK4K7Q.js → events-YVQJLQWG.js} +3 -3
  136. package/dist/{extract-4O3Q3LOD.js → extract-CNXA3DWB.js} +14 -14
  137. package/dist/{face-7J7AQJDY.js → face-2WNBW74C.js} +14 -14
  138. package/dist/{feedback-CVTJDQIX.js → feedback-ADMM2XDS.js} +8 -8
  139. package/dist/{ffmpeg-EE2NKQT4.js → ffmpeg-PERZ6YHQ.js} +9 -9
  140. package/dist/{figma-55J7UDDC.js → figma-5MMN5JUU.js} +3 -3
  141. package/dist/fontLocalizeCli.js +15 -15
  142. package/dist/{frames-OZLUDUOS.js → frames-7CQGHRWT.js} +19 -16
  143. package/dist/{generate-CY2TRPRE.js → generate-XOR4UJDW.js} +20 -18
  144. package/dist/{get-HJHSVKGK.js → get-5K6ALHBS.js} +7 -5
  145. package/dist/{gpuPolicy-LZFNAIJB.js → gpuPolicy-DUNSQM6M.js} +9 -9
  146. package/dist/{grade-compare-JVTYF2T6.js → grade-compare-DK63C776.js} +34 -34
  147. package/dist/{heifImagePrep-OGFEQMQT.js → heifImagePrep-YNPHFR6W.js} +10 -10
  148. package/dist/{help-6WDI76YU.js → help-AUF2KA6D.js} +2 -1
  149. package/dist/{history-FIP5NGFC.js → history-G3FXVX4A.js} +10 -10
  150. package/dist/hyperframe.manifest.json +1 -1
  151. package/dist/hyperframe.runtime.iife.js +65 -65
  152. package/dist/hyperframes-player.global.js +1 -1
  153. package/dist/{info-WTGJE4QB.js → info-DGU3CIU5.js} +8 -8
  154. package/dist/{init-UYTDM56U.js → init-LYZI2WCS.js} +29 -29
  155. package/dist/{ink-BTLAE3ZR.js → ink-DYZG4BST.js} +14 -14
  156. package/dist/{inspect-KIMJNTS4.js → inspect-BYQSCRKT.js} +34 -34
  157. package/dist/{installer-6GSD3CVW.js → installer-PUQYKLXZ.js} +5 -5
  158. package/dist/{keyframes-74LK522L.js → keyframes-XX2DIYPI.js} +6 -6
  159. package/dist/{lambda-CJ7P5NLO.js → lambda-RKI7KKWW.js} +15 -15
  160. package/dist/{layout-RLIXTM56.js → layout-RQFOMQRO.js} +34 -34
  161. package/dist/{lint-IOJB746U.js → lint-LFCMCDEG.js} +10 -10
  162. package/dist/{lintProject-NZADSVSU.js → lintProject-EV3EEBY3.js} +4 -4
  163. package/dist/{list-V3TMQEQV.js → list-V4TGMQ3Y.js} +7 -5
  164. package/dist/{localPage-5LUCH2RM.js → localPage-6MQ6YFER.js} +9 -9
  165. package/dist/{login-GNVKQO3W.js → login-EXCG7PEH.js} +4 -4
  166. package/dist/{look-3QZIJFNX.js → look-RBHKHGMF.js} +14 -14
  167. package/dist/{manager-3QTARUMT.js → manager-ARXEX6OP.js} +10 -10
  168. package/dist/{measure-7LUYTL2E.js → measure-SAV5K4WT.js} +11 -11
  169. package/dist/{media-treatment-MYDIYP5I.js → media-treatment-2BVHRXJS.js} +15 -15
  170. package/dist/{media-use-UDBHEIYA.js → media-use-YEBYLITF.js} +17 -11
  171. package/dist/{models-S5CT7CST.js → models-GMJODMZ5.js} +13 -13
  172. package/dist/{motionShot-U3TSHI33.js → motionShot-Z63I3GO7.js} +17 -17
  173. package/dist/{normalize-audio-ZETO53KI.js → normalize-audio-ILLUZPTO.js} +10 -10
  174. package/dist/{open-UEJMPEPN.js → open-GTNLU7UF.js} +12 -12
  175. package/dist/{parakeetRunner-2KFML7ZA.js → parakeetRunner-K4EGDDVH.js} +14 -14
  176. package/dist/{pipeline-2TPI5L2C.js → pipeline-EKLTELWF.js} +12 -12
  177. package/dist/{play-XH2XKNCL.js → play-F2HIXJKH.js} +25 -25
  178. package/dist/{preflight-L5P4QXXH.js → preflight-QMXCKE5P.js} +10 -10
  179. package/dist/{present-XXEU7RTN.js → present-GDR6LCKE.js} +20 -20
  180. package/dist/{preview-V6LNVTBH.js → preview-4TV5426Q.js} +23 -23
  181. package/dist/{probe-JL4JSTSP.js → probe-TYM7WKX2.js} +14 -14
  182. package/dist/{producer-RLZ64COI.js → producer-NHQXKH7Y.js} +1 -1
  183. package/dist/{projectConfig-3IK4M62D.js → projectConfig-PUAOWUNS.js} +7 -7
  184. package/dist/{publication-4I6P772E.js → publication-K4XAMUI6.js} +3 -3
  185. package/dist/{publish-TOPACGPR.js → publish-7W46NJFT.js} +13 -13
  186. package/dist/{remove-background-CNXM4XJN.js → remove-background-LURZDSDJ.js} +13 -13
  187. package/dist/{render-OD3XEIBG.js → render-EF7Y6YYC.js} +6 -6
  188. package/dist/{render-WCLJ4GPZ.js → render-GEAO2HAV.js} +39 -37
  189. package/dist/{render-XAE2YCRZ.js → render-YLAS7GVD.js} +46 -46
  190. package/dist/{render-batch-QM4SW65U.js → render-batch-JYYP4RXA.js} +6 -6
  191. package/dist/renderSetupWorker.js +4 -4
  192. package/dist/{resolver-K2UZSBCZ.js → resolver-BKFLETMU.js} +5 -5
  193. package/dist/{reverse-JGOZUFKK.js → reverse-3KAZZXB2.js} +1 -1
  194. package/dist/{run-2JI4VCW5.js → run-XER4YJY5.js} +3 -3
  195. package/dist/{sherpa-OIJBFCKZ.js → sherpa-D6FQ3CHN.js} +13 -13
  196. package/dist/skills/media-use/SKILL.md +2 -2
  197. package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +1 -1
  198. package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +1 -1
  199. package/dist/skills/media-use/references/heygen.md +18 -10
  200. package/dist/skills/media-use/references/operations.md +14 -13
  201. package/dist/skills/media-use/scripts/lib/adopt.mjs +11 -0
  202. package/dist/skills/media-use/scripts/lib/adopt.test.mjs +26 -0
  203. package/dist/skills/media-use/scripts/lib/registry.mjs +2 -1
  204. package/dist/skills/media-use/scripts/lib/registry.test.mjs +5 -6
  205. package/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
  206. package/dist/skills/media-use/scripts/resolve.mjs +3 -1
  207. package/dist/{skills-L4AWBUJJ.js → skills-T5XCP3RC.js} +43 -18
  208. package/dist/{skillsUpdateCheck-GSX5MLON.js → skillsUpdateCheck-IG7KLWIA.js} +3 -3
  209. package/dist/{snapshot-5FK3HCJ7.js → snapshot-RULSIRM6.js} +49 -46
  210. package/dist/{src-JT324RDD.js → src-DHBRQZFZ.js} +18 -18
  211. package/dist/{src-HKLKN7AE.js → src-RL6YEPTD.js} +10 -10
  212. package/dist/{start-5O33EGN2.js → start-GF3JCTGF.js} +43 -31
  213. package/dist/{staticProjectServer-CWKMUI6O.js → staticProjectServer-BX4RWEY5.js} +21 -21
  214. package/dist/{status-MPCREDMQ.js → status-SUK4I7TS.js} +8 -5
  215. package/dist/studio/assets/{hyperframes-player-D7kdypzS.js → hyperframes-player-BcELSci_.js} +1 -1
  216. package/dist/studio/assets/{index-BT1zmedz.js → index-2SLNyxZG.js} +1 -1
  217. package/dist/studio/assets/{index-CaOrmH_8.js → index-DR2eua-L.js} +126 -126
  218. package/dist/studio/index.html +1 -1
  219. package/dist/{studio-api-24HJ5KQX.js → studio-api-PEUXVD7P.js} +17 -17
  220. package/dist/{studioServer-KKGBELBR.js → studioServer-DOTRPHS3.js} +61 -61
  221. package/dist/{sync-BT4WDK3B.js → sync-XQPBXGGX.js} +19 -16
  222. package/dist/{telemetry-77PW2F7B.js → telemetry-7TIIOBVB.js} +3 -3
  223. package/dist/templates/_shared/AGENTS.md +1 -0
  224. package/dist/templates/_shared/CLAUDE.md +1 -0
  225. package/dist/templates-7DIQ52Y4.js +202 -0
  226. package/dist/{timeline-RKJ63VIU.js → timeline-4JIUAUIP.js} +24 -24
  227. package/dist/{tokens-JATS65YH.js → tokens-4PQU4LVQ.js} +2 -2
  228. package/dist/{transcribe-FYBJBBP3.js → transcribe-IKUPC2R3.js} +23 -23
  229. package/dist/{transcribe-ELWJ6NYG.js → transcribe-N66QUYCS.js} +12 -12
  230. package/dist/{tts-JHGGL7GL.js → tts-HIQMJU6O.js} +1 -1
  231. package/dist/{updateCheck-NU374MVC.js → updateCheck-LBPTWEZV.js} +2 -2
  232. package/dist/{upgrade-VIWR25J6.js → upgrade-2FS4AMCA.js} +2 -2
  233. package/dist/upload-L5TSWWIU.js +16 -0
  234. package/dist/{urlDownloader-MVZYN7XB.js → urlDownloader-YNI3Y3IE.js} +8 -8
  235. package/dist/{validate-3HM2XCH4.js → validate-MLVDUEK7.js} +28 -28
  236. package/dist/{video-H4ASUN7D.js → video-2OEOTSPQ.js} +10 -10
  237. package/dist/warmCheck.js +44 -44
  238. package/package.json +1 -1
  239. package/dist/billing-JBG45ON2.js +0 -96
  240. package/dist/chunk-N3CZ437C.js +0 -5035
  241. package/dist/chunk-QXVW22VM.js +0 -58
  242. package/dist/{chunk-GSNSSFT7.js → chunk-G3ERWPNV.js} +0 -0
  243. package/dist/{chunk-T5ELONXY.js → chunk-JHILL4BN.js} +0 -0
  244. package/dist/{destroy-IQLGADZM.js → destroy-C5GQLZVZ.js} +4 -4
  245. package/dist/{synthesize-YYT7UON6.js → synthesize-YK3WLOEQ.js} +5 -5
@@ -21,10 +21,10 @@ import {
21
21
  emitWords,
22
22
  getPreparedWavDurationSeconds,
23
23
  prepareWav
24
- } from "./chunk-7DQHV322.js";
24
+ } from "./chunk-AUYRWWFL.js";
25
25
  import {
26
26
  stoppedByCancelSignal
27
- } from "./chunk-CUR5UYYJ.js";
27
+ } from "./chunk-VM6T3Z6B.js";
28
28
  import {
29
29
  verifies
30
30
  } from "./chunk-RZ6CXJ56.js";
@@ -7,32 +7,15 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  ambiguousIssue,
9
9
  loadBrowserScript
10
- } from "./chunk-ZAOQWCZM.js";
10
+ } from "./chunk-CDSTLOB7.js";
11
11
  import {
12
12
  auditClipDurations,
13
13
  shouldIgnoreHttpError,
14
14
  shouldIgnoreRequestFailure
15
- } from "./chunk-RULCW25D.js";
15
+ } from "./chunk-7VU4RBHC.js";
16
16
  import {
17
17
  serveStaticProjectHtml
18
- } from "./chunk-6DTXWYZA.js";
19
- import {
20
- STUDIO_PREVIEW_CAPTURE_MODE,
21
- STUDIO_PREVIEW_MARK_META
22
- } from "./chunk-3BCLDK6O.js";
23
- import {
24
- FfmpegUnavailableError,
25
- decideMediaProxyEligibility,
26
- getProxyCachePath,
27
- proxyVariantFor,
28
- resolveProxies,
29
- scanProjectMediaCodecMap,
30
- shouldPrewarmProxy
31
- } from "./chunk-2ZQ7BZOS.js";
32
- import {
33
- artifactDirectory,
34
- finishSnapshotRun
35
- } from "./chunk-UGUYWTWD.js";
18
+ } from "./chunk-BYC4C4YY.js";
36
19
  import {
37
20
  AUDIT_SEEK_OPTIONS,
38
21
  DEFAULT_ZOOM_PADDING_PX,
@@ -46,24 +29,44 @@ import {
46
29
  seekCompositionTimeline,
47
30
  seekInPage,
48
31
  waitForPreferredSeekTarget
49
- } from "./chunk-XPN7SDFQ.js";
32
+ } from "./chunk-6HO6QKYG.js";
50
33
  import {
51
34
  SEEK_SETTLES_BEFORE_PROTOCOL_TIMEOUT_MS
52
35
  } from "./chunk-YGGZ23BB.js";
53
36
  import {
54
37
  findStageProxyBox
55
- } from "./chunk-QPTQSM3D.js";
38
+ } from "./chunk-LTBBFLOM.js";
39
+ import {
40
+ STUDIO_PREVIEW_CAPTURE_MODE,
41
+ STUDIO_PREVIEW_MARK_META
42
+ } from "./chunk-NCP3JQ6S.js";
43
+ import {
44
+ artifactDirectory,
45
+ finishSnapshotRun
46
+ } from "./chunk-XLPCBE2Q.js";
47
+ import {
48
+ FfmpegUnavailableError,
49
+ decideMediaProxyEligibility,
50
+ getProxyCachePath,
51
+ proxyVariantFor,
52
+ resolveProxies,
53
+ scanProjectMediaCodecMap,
54
+ shouldPrewarmProxy
55
+ } from "./chunk-MDMQD6BV.js";
56
56
  import {
57
57
  resolveAutoProxy
58
- } from "./chunk-RGYPRUQP.js";
58
+ } from "./chunk-S2UKSI3C.js";
59
59
  import {
60
60
  BrowserCleanupError,
61
61
  closeManagedBrowser,
62
62
  onStopSignal
63
- } from "./chunk-JCOECSLT.js";
63
+ } from "./chunk-BHL4KN3H.js";
64
+ import {
65
+ DEFAULT_CONFIG
66
+ } from "./chunk-N6FGHJ7X.js";
64
67
  import {
65
68
  injectTagsAtHeadStart
66
- } from "./chunk-N3CZ437C.js";
69
+ } from "./chunk-Y3ICFPFK.js";
67
70
  import {
68
71
  normalizeErrorMessage
69
72
  } from "./chunk-E63BDV4Z.js";
@@ -459,6 +462,7 @@ function rectToBbox(rect) {
459
462
  }
460
463
 
461
464
  // src/utils/checkBrowser.ts
465
+ var RENDER_READY_WARNING_SUFFIX = `the scene may still be building, so results can miss late content; raise --timeout (for example ${DEFAULT_CONFIG.playerReadyTimeout * 2 / 1e3}s)`;
462
466
  var COPY_HEARTBEAT_MS = 1e4;
463
467
  function elapsedText(ms) {
464
468
  const seconds = Math.round(ms / 1e3);
@@ -582,7 +586,7 @@ function proxyFailedDraft(message) {
582
586
  return { code: "media_proxy_failed", severity: "warning", message, time: 0 };
583
587
  }
584
588
  async function loadCheckHtmlWithDeferredMedia(dir) {
585
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-PAWHGZRW.js");
589
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-TJL2JWRD.js");
586
590
  return withCapturePreviewMark(await bundleWithLocalizedFonts(dir));
587
591
  }
588
592
  function withCapturePreviewMark(html) {
@@ -621,7 +625,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline, prel
621
625
  const session = await openSettledCompositionPage(html, server.url, {
622
626
  navigationTimeoutMs: options.timeout,
623
627
  renderReadyTimeoutMs: options.timeout,
624
- renderReadyWarningSuffix: "the scene may still be building, so results can miss late content; raise --timeout (for example 20s)",
628
+ renderReadyWarningSuffix: RENDER_READY_WARNING_SUFFIX,
625
629
  prelaunched,
626
630
  browserGpuMode: options.browserGpuMode ?? resolveCliChromeGpuMode(),
627
631
  signal: deadline?.signal,
@@ -644,7 +648,7 @@ async function runBrowserCheck(project, options, motion, runGrid, deadline, prel
644
648
  ).map((draft) => runtimeFinding(draft, rootAnchor))
645
649
  }));
646
650
  const launchSettleMs = Date.now() - launchSettleStart;
647
- const { analyzeClipMediaFit } = await import("./src-HKLKN7AE.js");
651
+ const { analyzeClipMediaFit } = await import("./src-RL6YEPTD.js");
648
652
  for (const entry of await auditClipDurations(page, analyzeClipMediaFit, options.timeout)) {
649
653
  drafts.push({ code: "clip_media_fit", severity: entry.level, message: entry.text, time: 0 });
650
654
  }
@@ -736,7 +740,7 @@ async function openHelperSession(html, url, options, deadline, owner) {
736
740
  const session = await openSettledCompositionPage(html, url, {
737
741
  navigationTimeoutMs: options.timeout,
738
742
  renderReadyTimeoutMs: options.timeout,
739
- renderReadyWarningSuffix: "the scene may still be building, so results can miss late content; raise --timeout (for example 20s)",
743
+ renderReadyWarningSuffix: RENDER_READY_WARNING_SUFFIX,
740
744
  browserGpuMode: options.browserGpuMode ?? resolveCliChromeGpuMode(),
741
745
  signal: owner.signal,
742
746
  onBrowser: owner.onBrowser,
@@ -785,7 +789,7 @@ async function captureFindingCrops(project, options, requests, deadline) {
785
789
  async function captureFindingFrames(project, options, requests, deadline) {
786
790
  if (requests.length === 0) return { written: [], inspected: [] };
787
791
  const inspector = requests.some((request) => request.inspect?.length) ? await prepareFindingInspector(project.dir, async (bundleOptions) => {
788
- const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-PAWHGZRW.js");
792
+ const { bundleWithLocalizedFonts } = await import("./bundleWithLocalizedFonts-TJL2JWRD.js");
789
793
  return withCapturePreviewMark(
790
794
  await bundleWithLocalizedFonts(project.dir, void 0, bundleOptions)
791
795
  );
@@ -2090,6 +2094,7 @@ export {
2090
2094
  checkSnapshotDirectory,
2091
2095
  finishCheckSnapshots,
2092
2096
  rectToBbox,
2097
+ RENDER_READY_WARNING_SUFFIX,
2093
2098
  preResolveHostileMediaProxies,
2094
2099
  runBrowserCheck,
2095
2100
  samplingBrowserCount,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-EQBDKYXR.js";
10
10
  import {
11
11
  listenOnBrowserSafePort
12
- } from "./chunk-NUFOXUDF.js";
12
+ } from "./chunk-N6FGHJ7X.js";
13
13
 
14
14
  // src/capture/localPage.ts
15
15
  import {
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-R4EWRIDL.js";
13
13
  import {
14
14
  findFFmpeg
15
- } from "./chunk-FNNNGI42.js";
15
+ } from "./chunk-AVNF52HR.js";
16
16
  import {
17
17
  stoppableExecFile
18
18
  } from "./chunk-HU2SPFNG.js";
@@ -7,12 +7,12 @@ var __dirname = __hf_dirname(__filename);
7
7
  import {
8
8
  findCuts,
9
9
  signatures
10
- } from "./chunk-THSTFHB7.js";
10
+ } from "./chunk-7RM3TB62.js";
11
11
  import {
12
12
  jsonArg,
13
13
  num,
14
14
  runMeasure
15
- } from "./chunk-UUW654GD.js";
15
+ } from "./chunk-GRUI2S2F.js";
16
16
  import {
17
17
  idempotencyKey,
18
18
  keepVoice,
@@ -20,20 +20,25 @@ import {
20
20
  publicVoices,
21
21
  runJob,
22
22
  senderScope
23
- } from "./chunk-GZZE2OJP.js";
23
+ } from "./chunk-DKROJ3GJ.js";
24
24
  import {
25
25
  Fix,
26
+ probeSeconds,
26
27
  probeVideo,
27
28
  projectOf,
28
29
  round,
29
30
  runFfmpeg,
30
31
  videoClip
31
- } from "./chunk-D7THUO4V.js";
32
+ } from "./chunk-A33GFLPY.js";
33
+ import {
34
+ loadSharp
35
+ } from "./chunk-5UT3R43E.js";
32
36
  import {
33
37
  defineCommand
34
38
  } from "./chunk-DL4OD7IA.js";
35
39
 
36
40
  // src/heygen/generate.ts
41
+ import { randomUUID } from "crypto";
37
42
  import {
38
43
  existsSync,
39
44
  mkdirSync,
@@ -44,11 +49,13 @@ import {
44
49
  writeFileSync
45
50
  } from "fs";
46
51
  import { tmpdir } from "os";
47
- import { dirname, extname, join, relative, resolve } from "path";
52
+ import { basename, dirname, extname, join, relative, resolve } from "path";
48
53
  var GENERATE_TYPES = [
49
54
  "image",
50
55
  "video",
56
+ "lipsync",
51
57
  "avatar",
58
+ "cutout",
52
59
  "voice",
53
60
  "music"
54
61
  ];
@@ -157,16 +164,53 @@ var ROUTES = {
157
164
  ledger: "video",
158
165
  ext: [".mp4", ".mov", ".webm"]
159
166
  },
167
+ lipsync: {
168
+ path: "/v3/lipsyncs",
169
+ start: (c, body, key, signal) => c.createLipsyncV3({ body, idempotencyKey: key, signal }),
170
+ status: (c, id, signal) => c.getLipsyncV3({ lipsync_id: id, signal }),
171
+ body: (r, media) => ({
172
+ video: media(need(r.video, "--video", "--video work/s01.mp4"), "video"),
173
+ audio: media(need(r.audio, "--audio", "--audio work/s01.mp3"), "audio"),
174
+ mode: "speed",
175
+ enable_dynamic_duration: false,
176
+ fps_mode: "cfr",
177
+ keep_the_same_format: true
178
+ }),
179
+ urls: ["video_url"],
180
+ ledger: "video",
181
+ ext: [".mp4"]
182
+ },
183
+ cutout: {
184
+ path: "/v3/background-removals",
185
+ start: (c, body, key, signal) => c.createBackgroundRemoval({
186
+ body: { ...body, request_id: key },
187
+ signal
188
+ }),
189
+ status: (c, id, signal) => c.getBackgroundRemoval({ job_id: id, signal }),
190
+ body: (r, media) => ({
191
+ video: media(need(r.video, "--video", "--video assets/presenter.mp4"), "video"),
192
+ layers: ["foreground"]
193
+ }),
194
+ urls: ["layers.foreground"],
195
+ ledger: "video",
196
+ ext: [".webm", ".mov"]
197
+ },
160
198
  avatar: {
161
199
  path: "/v3/videos",
162
200
  start: (c, body, key, signal) => c.createVideo({ body, idempotencyKey: key, signal }),
163
201
  status: (c, id, signal) => c.getVideoV3({ video_id: id, signal }),
164
202
  body: (r, media) => ({
165
- type: "image",
166
- image: media(need(r.photo, "--photo", "--photo assets/presenter.png"), "image"),
167
- script: need(r.script, "--script", '--script "What they say"'),
168
- voice_id: need(r.voice, "--voice", "--voice <voice id or language>"),
203
+ ...r.avatar ? { type: "avatar", avatar_id: r.avatar } : {
204
+ type: "image",
205
+ image: media(need(r.photo, "--photo", "--photo assets/presenter.png"), "image"),
206
+ ...r.prompt ? { motion_prompt: r.prompt } : {}
207
+ },
208
+ ...r.audio ? { audio_asset_id: media(r.audio, "audio").asset_id } : {
209
+ script: need(r.script, "--script", '--script "What they say"'),
210
+ voice_id: need(r.voice, "--voice", "--voice <voice id or language>")
211
+ },
169
212
  ...r.aspect ? { aspect_ratio: r.aspect } : {},
213
+ resolution: "1080p",
170
214
  output_format: "mp4"
171
215
  }),
172
216
  urls: ["video_url"],
@@ -215,29 +259,41 @@ function needFile(path) {
215
259
  if (!existsSync(path))
216
260
  throw new Fix(`no file at ${path}`, "pass a picture or sound from the project");
217
261
  }
218
- var shrink = (path, out) => runFfmpeg([
219
- "-y",
220
- "-i",
221
- path,
222
- "-vf",
223
- "scale='min(2048,iw)':'min(2048,ih)':force_original_aspect_ratio=decrease",
224
- "-q:v",
225
- "3",
226
- "-frames:v",
227
- "1",
228
- out
229
- ]);
230
- function inline(work, masks = []) {
262
+ var FIT_2048 = "scale='min(2048,iw)':'min(2048,ih)':force_original_aspect_ratio=decrease";
263
+ function picturesOf(route, r) {
264
+ const paths = [];
265
+ route.body(r, (path, kind) => {
266
+ if (kind === "image") paths.push(path);
267
+ return {};
268
+ });
269
+ return paths;
270
+ }
271
+ var sharpOrNone = () => loadSharp("media-use pictures").catch(() => null);
272
+ async function shrunk(paths, work) {
273
+ const out = /* @__PURE__ */ new Map();
274
+ if (!paths.length) return out;
275
+ const sharp = await sharpOrNone();
276
+ for (const path of new Set(paths)) {
277
+ needFile(path);
278
+ const to = join(work, `picture-${out.size}.jpg`);
279
+ const viaFfmpeg = () => runFfmpeg(["-y", "-i", path, "-vf", FIT_2048, "-q:v", "3", "-frames:v", "1", to]);
280
+ if (!sharp) viaFfmpeg();
281
+ else
282
+ await sharp(path).rotate().resize(2048, 2048, { fit: "inside", withoutEnlargement: true }).jpeg({ quality: 90 }).toFile(to).catch(viaFfmpeg);
283
+ out.set(path, to);
284
+ }
285
+ return out;
286
+ }
287
+ function inline(work, pictures, masks = []) {
231
288
  return (path, kind) => {
232
289
  needFile(path);
233
- const out = join(
290
+ const out = kind === "image" ? pictures.get(path) : join(
234
291
  work,
235
- `in-${Math.random().toString(36).slice(2)}.${{ image: "jpg", audio: "mp3", video: "mp4" }[kind]}`
292
+ `in-${Math.random().toString(36).slice(2)}.${{ audio: "mp3", video: "mp4" }[kind]}`
236
293
  );
237
- if (kind === "image") shrink(path, out);
238
- else if (kind === "audio")
294
+ if (kind === "audio")
239
295
  runFfmpeg(["-y", "-i", path, "-vn", "-ac", "1", "-c:a", "libmp3lame", "-b:a", "128k", out]);
240
- else {
296
+ else if (kind === "video") {
241
297
  const guide = masks.length ? fillMasks(path, masks, work) : path;
242
298
  const scale = "scale='if(gt(iw,ih),min(720,iw),-2)':'if(gt(iw,ih),-2,min(720,ih))'";
243
299
  runFfmpeg([
@@ -252,6 +308,30 @@ function inline(work, masks = []) {
252
308
  };
253
309
  };
254
310
  }
311
+ function assetsOf(r) {
312
+ if (r.type === "lipsync") return [r.video, r.audio];
313
+ if (r.type === "cutout") return [r.video];
314
+ return r.type === "avatar" && r.audio ? [r.audio] : [];
315
+ }
316
+ async function uploaded(paths) {
317
+ const ids = /* @__PURE__ */ new Map();
318
+ if (!paths.length) return ids;
319
+ const { createCloudClient } = await import("./cloud-Z3FNCC4T.js");
320
+ const { uploadAssetViaDirectUpload } = await import("./upload-L5TSWWIU.js");
321
+ const { getMimeType } = await import("./dist-CCPYPKOC.js");
322
+ const client = await createCloudClient();
323
+ for (const path of paths) {
324
+ const asset = await uploadAssetViaDirectUpload({
325
+ client,
326
+ bytes: new Uint8Array(readFileSync(path)),
327
+ filename: basename(path),
328
+ contentType: getMimeType(path),
329
+ idempotencyKey: randomUUID()
330
+ });
331
+ ids.set(path, asset.asset_id);
332
+ }
333
+ return ids;
334
+ }
255
335
  function cutsInside(path, seconds) {
256
336
  const info = probeVideo(path);
257
337
  const clip = videoClip(info.path, 0, seconds, info);
@@ -340,11 +420,11 @@ function fitAspect(out, aspect) {
340
420
  renameSync(fitted, out);
341
421
  return `HeyGen returned ${width}x${height} for ${aspect}; cropped to ${w}x${h} (centre), not stretched`;
342
422
  }
343
- function aspectOf(r, work) {
423
+ async function aspectOf(r, pictures) {
344
424
  if (r.aspect || !r.firstFrame) return r.aspect ?? "16:9";
345
- const sent = join(work, "first-frame.jpg");
346
- shrink(r.firstFrame, sent);
347
- const { width, height } = probeVideo(sent);
425
+ const sent = pictures.get(r.firstFrame);
426
+ const sharp = await sharpOrNone();
427
+ const { width, height } = sharp ? await sharp(sent).metadata() : probeVideo(sent);
348
428
  return `${width}:${height}`;
349
429
  }
350
430
  var MIN_SHOT_S = 0.15;
@@ -375,6 +455,9 @@ function checkGuide(r) {
375
455
  );
376
456
  }
377
457
  var VOICE_ID = /^[0-9a-f]{32}$/i;
458
+ async function voiceFor(r) {
459
+ return r.type === "voice" || r.type === "avatar" && !r.audio ? pickVoice(r) : void 0;
460
+ }
378
461
  async function pickVoice(r) {
379
462
  if (r.voice && VOICE_ID.test(r.voice)) return { voice_id: r.voice, name: r.voice };
380
463
  if (!r.voice) {
@@ -422,11 +505,19 @@ async function generate(r, onWait, credits) {
422
505
  const project = projectOf(dirname(out));
423
506
  const work = mkdtempSync(join(tmpdir(), "hf-generate-"));
424
507
  try {
425
- const body = route.body(r, inline(work, r.masks));
426
- const key = idempotencyKey(route.path, [JSON.stringify(body)]);
508
+ const sources = assetsOf(r);
509
+ const ids = await uploaded(sources);
510
+ const pictures = await shrunk(picturesOf(route, r), work);
511
+ const local = inline(work, pictures, r.masks);
512
+ const body = route.body(
513
+ r,
514
+ (path, kind) => ids.has(path) ? { type: "asset_id", asset_id: ids.get(path) } : local(path, kind)
515
+ );
516
+ const sent = [...ids.values()].reduce((t, id) => t.replaceAll(id, ""), JSON.stringify(body));
517
+ const key = idempotencyKey(route.path, [...sources.map((p) => readFileSync(p)), sent]);
427
518
  const job = await runJob(route, body, key, {
428
519
  log: {
429
- projectDir: project ?? void 0,
520
+ projectDir: project ?? process.cwd(),
430
521
  what: `generate ${r.type} ${relative(project ?? ".", out)}`
431
522
  },
432
523
  onWait: (j) => onWait?.(j.status),
@@ -456,7 +547,7 @@ async function generate(r, onWait, credits) {
456
547
  const notes = [];
457
548
  if (r.type === "video")
458
549
  try {
459
- const note = fitAspect(out, aspectOf(r, work));
550
+ const note = fitAspect(out, await aspectOf(r, pictures));
460
551
  if (note) notes.push(note);
461
552
  } catch (e) {
462
553
  notes.push(`kept HeyGen's size, could not crop: ${e instanceof Error ? e.message : e}`);
@@ -489,7 +580,9 @@ async function generate(r, onWait, credits) {
489
580
  ...r.references?.length ? { references: r.references.map(describe) } : {},
490
581
  ...r.firstFrame ? { first_frame: describe(r.firstFrame) } : {},
491
582
  ...r.photo ? { photo: describe(r.photo) } : {},
583
+ ...r.avatar ? { avatar: r.avatar } : {},
492
584
  ...r.audio ? { audio: describe(r.audio) } : {},
585
+ ...r.video ? { video: describe(r.video) } : {},
493
586
  ...r.motion ? { motion: describe(r.motion) } : {},
494
587
  ...r.masks?.length ? { motion_masks: r.masks.map((m) => [...m.box, ...m.window ?? []]) } : {},
495
588
  ...r.voice ? { voice: r.voice } : {},
@@ -535,13 +628,17 @@ var VIDEO_768P_PER_S = 0.018;
535
628
  var VIDEO_REF_768P_PER_S = 0.05;
536
629
  var VIDEO_INCLUDED_IMAGES = 2;
537
630
  var VIDEO_EXTRA_IMAGE = 0.02;
538
- var HF_VIDEO_768P_PER_S = 12;
539
- var HF_VIDEO_REF_768P_PER_S = 100 / 3;
540
- var HF_VIDEO_EXTRA_IMAGE = 40 / 3;
541
- var HF_AVATAR_IV_PHOTO_PER_S = 800 / 60;
631
+ var HF_VIDEO_768P_PER_S = 18;
632
+ var HF_VIDEO_REF_768P_PER_S = 50;
633
+ var HF_VIDEO_EXTRA_IMAGE = 20;
634
+ var HF_AVATAR_IV_PHOTO_PER_S = 1155 / 60;
635
+ var HF_AVATAR_IV_TWIN_PER_S = 2415 / 60;
636
+ var HF_LIPSYNC_SPEED_PER_S = 7;
542
637
  var MUSIC_PER_TRACK = 0.08;
543
638
  var AVATAR_IV_PER_MIN = 4.83;
544
639
  var SCRIPT_WORDS_PER_S = 2;
640
+ var HF_TTS_PER_S = 1;
641
+ var SPEECH_CHARS_PER_S = { zh: 5, en: 15 };
545
642
  function priceOf(r) {
546
643
  switch (r.type) {
547
644
  case "image": {
@@ -572,24 +669,44 @@ function priceOf(r) {
572
669
  seconds * HF_VIDEO_768P_PER_S
573
670
  );
574
671
  }
672
+ case "lipsync": {
673
+ const seconds = r.video ? probeVideo(r.video).pictureDuration : 0;
674
+ return {
675
+ usd: null,
676
+ list: null,
677
+ credits: seconds * HF_LIPSYNC_SPEED_PER_S,
678
+ basis: `lipsync at speed, ${round(seconds, 2)} s at ${HF_LIPSYNC_SPEED_PER_S} credits a second`
679
+ };
680
+ }
575
681
  case "avatar": {
576
682
  const words = (r.script ?? "").split(/\s+/).filter(Boolean).length;
577
- const seconds = Math.max(1, Math.floor(words / SCRIPT_WORDS_PER_S));
683
+ const seconds = r.audio ? probeSeconds(r.audio) : Math.max(1, Math.floor(words / SCRIPT_WORDS_PER_S));
578
684
  return at(
579
685
  Math.ceil(seconds * AVATAR_IV_PER_MIN) / 60,
580
- `avatar video, about ${seconds} s from ${words} words at $4.83 a minute`,
581
- seconds * HF_AVATAR_IV_PHOTO_PER_S
686
+ `avatar video, about ${round(seconds, 1)} s${r.audio ? "" : ` from ${words} words`} at $4.83 a minute`,
687
+ seconds * (r.avatar ? HF_AVATAR_IV_TWIN_PER_S : HF_AVATAR_IV_PHOTO_PER_S)
582
688
  );
583
689
  }
690
+ case "cutout":
691
+ return {
692
+ usd: null,
693
+ list: null,
694
+ credits: null,
695
+ basis: "background removal, not priced ahead"
696
+ };
584
697
  case "music":
585
698
  return at(MUSIC_PER_TRACK, "lyria-3-pro, $0.08 a track");
586
- case "voice":
699
+ case "voice": {
700
+ const text = r.script ?? "";
701
+ const cjk = (text.match(new RegExp("\\p{Script=Han}", "gu")) ?? []).length;
702
+ const seconds = cjk / SPEECH_CHARS_PER_S.zh + (text.length - cjk) / SPEECH_CHARS_PER_S.en;
587
703
  return {
588
704
  usd: null,
589
705
  list: null,
590
- credits: null,
591
- basis: "HeyGen does not price catalog speech ahead; it is charged per character"
706
+ credits: seconds * HF_TTS_PER_S,
707
+ basis: `about ${round(seconds, 1)} s of speech at ${HF_TTS_PER_S} credit a second, an estimate: it is charged per character`
592
708
  };
709
+ }
593
710
  }
594
711
  }
595
712
  var creditsOf = (p) => p.credits === null ? null : Math.ceil(p.credits - 1e-9);
@@ -622,6 +739,18 @@ var examples = [
622
739
  "The original's presenter re-shot clean, saying an 8 s stretch of the original voice",
623
740
  'hyperframes media-use generate --type video --reference assets/presenter-clean.png --audio assets/s02-voice.m4a --motion assets/s02-original.mp4 --mask 110,615,390,165 --prompt "the woman talks to camera, seated, soft daylight" --seconds 8 --aspect 9:16 --out assets/s02-presenter.mp4'
624
741
  ],
742
+ [
743
+ "That shot's mouth redone to the exact voice, which stays as it is",
744
+ "hyperframes media-use generate --type lipsync --video assets/s02-presenter.mp4 --audio assets/s02-voice.mp3 --out assets/s02-lips.mp4"
745
+ ],
746
+ [
747
+ "The presenter cut out of their room, on a transparent background",
748
+ "hyperframes media-use generate --type cutout --video assets/presenter.mp4 --out assets/presenter-cutout.webm"
749
+ ],
750
+ [
751
+ "The person in a photo saying a finished voice, which stays as it is",
752
+ 'hyperframes media-use generate --type avatar --photo assets/presenter.png --audio assets/vo.mp3 --prompt "seated, talks with both hands" --aspect 16:9 --out assets/host.mp4'
753
+ ],
625
754
  [
626
755
  "The person in a photo saying a script in a chosen voice",
627
756
  'hyperframes media-use generate --type avatar --photo assets/presenter.png --script "Hi, I am Ana" --voice <voice-id> --out assets/ana.mp4'
@@ -636,7 +765,7 @@ function repeated(raw, flag) {
636
765
  var generate_default = defineCommand({
637
766
  meta: {
638
767
  name: "generate",
639
- description: "Make new media on HeyGen: an image (edited from references), a video shot (from a first frame), a person speaking from a photo, a voice, or music. --plan prices it first"
768
+ description: "Make new media on HeyGen: an image (edited from references), a video shot (from a first frame), a shot's mouth redone to a voice, a person speaking from a photo, a voice, or music. --plan prices it first"
640
769
  },
641
770
  args: {
642
771
  type: {
@@ -649,14 +778,21 @@ var generate_default = defineCommand({
649
778
  description: "The project file to write, e.g. assets/plate.png",
650
779
  required: true
651
780
  },
652
- prompt: { type: "string", description: "What it shows or sounds like (image, video, music)" },
781
+ prompt: {
782
+ type: "string",
783
+ description: "What it shows or sounds like (image, video, music); avatar: how a photo moves"
784
+ },
653
785
  reference: {
654
786
  type: "string",
655
787
  description: "image: comma-separated pictures to edit from or follow; video: the person to show speaking"
656
788
  },
657
789
  audio: {
658
790
  type: "string",
659
- description: "video: speech the referenced person says, lips in sync (5\u201315 s)"
791
+ description: "video: speech the referenced person says (5\u201315 s), a reference the model re-paces; lipsync, avatar: the exact voice"
792
+ },
793
+ video: {
794
+ type: "string",
795
+ description: "lipsync: the shot whose mouth is redone; cutout: the shot cut out of its background"
660
796
  },
661
797
  motion: {
662
798
  type: "string",
@@ -673,6 +809,10 @@ var generate_default = defineCommand({
673
809
  },
674
810
  "first-frame": { type: "string", description: "video: the picture the shot starts from" },
675
811
  photo: { type: "string", description: "avatar: the person's photo" },
812
+ avatar: {
813
+ type: "string",
814
+ description: "avatar: the person's own HeyGen avatar look id, instead of --photo"
815
+ },
676
816
  script: { type: "string", description: "avatar, voice: the words spoken" },
677
817
  voice: {
678
818
  type: "string",
@@ -716,10 +856,12 @@ var generate_default = defineCommand({
716
856
  references: args.reference?.split(",").map((p) => p.trim()).filter(Boolean),
717
857
  firstFrame: args["first-frame"],
718
858
  audio: args.audio,
859
+ video: args.video,
719
860
  motion: args.motion,
720
861
  allowCuts: args["allow-cuts"],
721
862
  masks: repeated(rawArgs, "--mask").map(parseMask),
722
863
  photo: args.photo,
864
+ avatar: args.avatar,
723
865
  script: args.script,
724
866
  voice: args.voice,
725
867
  seconds: num(args.seconds, "--seconds"),
@@ -728,7 +870,7 @@ var generate_default = defineCommand({
728
870
  bpm: num(args.bpm, "--bpm"),
729
871
  instrumental: !args.vocals
730
872
  };
731
- const voice = type === "voice" || type === "avatar" ? await pickVoice(request) : void 0;
873
+ const voice = await voiceFor(request);
732
874
  if (voice) request.voice = voice.voice_id;
733
875
  const price = priceOf(request);
734
876
  const credits = creditsOf(price);