hyperframes 0.9.55 → 0.9.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-2LZ5XA27.js → add-JQUKPSEZ.js} +30 -28
- package/dist/{agentPromptGenerator-RSFEFNFL.js → agentPromptGenerator-3NEY7FPP.js} +16 -15
- package/dist/{animatedGifPrep-AX4MK2QD.js → animatedGifPrep-VMUZ6IVJ.js} +18 -16
- package/dist/api.js +61 -59
- package/dist/{appHistory-T3ZLA7QN.js → appHistory-JNI6IOR6.js} +7 -4
- package/dist/{asset-XYQJVHR2.js → asset-ZT3VXZ67.js} +3 -2
- package/dist/{assetCataloger-WTFR2Z5Q.js → assetCataloger-D2DV65BA.js} +17 -16
- package/dist/{audio-U2OIHTUI.js → audio-LD5H2R5V.js} +40 -39
- package/dist/{auth-DXESNULL.js → auth-4FPYYMSH.js} +4 -4
- package/dist/{autoUpdate-DWT4YYU2.js → autoUpdate-5ZKSFCG4.js} +5 -5
- package/dist/{avatars-EL5RBI4P.js → avatars-DCLFE7VG.js} +26 -24
- package/dist/{backgroundChecks-T2DL425O.js → backgroundChecks-UZA3F46H.js} +6 -6
- package/dist/backgroundChecksWorker.js +6 -6
- package/dist/{batchRender-CMG4SVBX.js → batchRender-TAUW3CT2.js} +14 -9
- package/dist/{beats-HU756KUO.js → beats-X3LCR6OG.js} +16 -15
- package/dist/{benchmark-HBNCPXH5.js → benchmark-DNZQT3YQ.js} +23 -22
- package/dist/{billing-LGHM3LC7.js → billing-4BFUAHWX.js} +44 -29
- package/dist/{browser-XIFUT5OB.js → browser-5J2MTDB6.js} +14 -13
- package/dist/{bundleWithLocalizedFonts-JPPBCCVV.js → bundleWithLocalizedFonts-XWK47ZVF.js} +1 -1
- package/dist/{capture-ZY7G3QSM.js → capture-2YSVFKWV.js} +40 -39
- package/dist/{capture-B6DSZD2P.js → capture-TVYTKWTG.js} +4 -4
- package/dist/{captureCompositionFrame-2WRG6SNW.js → captureCompositionFrame-L765HLCT.js} +22 -21
- package/dist/{captureFile-LXMDM5TD.js → captureFile-DOCK42K3.js} +4 -3
- package/dist/{catalog-CUEOQ4PJ.js → catalog-CHGGRRQX.js} +30 -28
- package/dist/catalog-artifact/media-vectors.json +205 -0
- package/dist/{catch-up-BAYJTXAL.js → catch-up-OCFU6ZR3.js} +18 -17
- package/dist/{check-KGXBQPRZ.js → check-LWK4Z7FI.js} +66 -63
- package/dist/{checkAudio-6PI7DJLP.js → checkAudio-R5ORBXBO.js} +27 -24
- package/dist/{checkBrowser-4SGXUL27.js → checkBrowser-6SH73T47.js} +56 -55
- package/dist/{chunk-VK3MQSA2.js → chunk-23SG3B6M.js} +5 -2
- package/dist/{chunk-EXXIFMUX.js → chunk-2GRCLLKU.js} +13 -5
- package/dist/chunk-2RUCE54M.js +5083 -0
- package/dist/{chunk-PLFOZIEH.js → chunk-2SJNGWSY.js} +1 -1
- package/dist/{chunk-FPRHOB5W.js → chunk-2WA62M3B.js} +3 -3
- package/dist/{chunk-E2DHBP6C.js → chunk-37VS6QY6.js} +1 -1
- package/dist/{chunk-KG24ATFM.js → chunk-37Y334MN.js} +13 -11
- package/dist/{chunk-ER22SVLT.js → chunk-3GKGBYW3.js} +7 -27
- package/dist/{chunk-SDFGDNWV.js → chunk-3VMZQQUI.js} +1 -1
- package/dist/{chunk-NUGAYGT3.js → chunk-4LZSNWFJ.js} +2 -2
- package/dist/{chunk-JVA3SAGB.js → chunk-4N3WOFP3.js} +30 -37
- package/dist/{chunk-W2GXQ3CR.js → chunk-4NNYYCJN.js} +15 -15
- package/dist/{chunk-TMLKMCZK.js → chunk-4QPT3IEL.js} +5 -5
- package/dist/{chunk-3L2POG2J.js → chunk-5IE5ZI66.js} +37 -8
- package/dist/{chunk-4IUOWNDS.js → chunk-5IUVWP3A.js} +2 -2
- package/dist/{chunk-3USMIMBB.js → chunk-5SGGOZNL.js} +464 -140
- package/dist/chunk-677JGYQL.js +91 -0
- package/dist/{chunk-LEIR7IDJ.js → chunk-6LU6JICP.js} +80 -1
- package/dist/{chunk-QWBJABCA.js → chunk-7ECPFKQV.js} +4 -4
- package/dist/{chunk-BZULWFMJ.js → chunk-7FIJRDUG.js} +45 -10
- package/dist/{chunk-VCKUDUPN.js → chunk-7IMHPBSH.js} +248 -32
- package/dist/{chunk-OM2WIZOR.js → chunk-7WAWUQDQ.js} +3 -3
- package/dist/{chunk-F7B2YDPM.js → chunk-7WYJXKIG.js} +19 -11
- package/dist/{chunk-OWQWMQTY.js → chunk-7ZHBY7T5.js} +1 -1
- package/dist/{chunk-GKOF2RS3.js → chunk-A4L7G74T.js} +1 -1
- package/dist/{chunk-NHNFBLBM.js → chunk-A4YRESMH.js} +6 -3
- package/dist/{chunk-MDRLJ737.js → chunk-AJ7YRQS4.js} +1 -1
- package/dist/{chunk-WPD7JH6F.js → chunk-ALD7JBPV.js} +2 -2
- package/dist/{chunk-5HJZGP54.js → chunk-AM4Y3XMR.js} +2 -2
- package/dist/{chunk-7DJCG5ED.js → chunk-AM6UYKVR.js} +10 -10
- package/dist/{chunk-FOKS5HQ2.js → chunk-AMS7Q7P7.js} +4 -4
- package/dist/{chunk-EKZ5FGV7.js → chunk-BSDUTNFX.js} +1 -1
- package/dist/{chunk-6BGTTCKN.js → chunk-BSFTB6AM.js} +5 -5
- package/dist/{chunk-NCSBBZQ5.js → chunk-CGJIMWNU.js} +5 -2
- package/dist/{chunk-TULCSCC4.js → chunk-CGODFJZ7.js} +9 -9
- package/dist/{chunk-JS7UI73E.js → chunk-CPDPSNSB.js} +8 -8
- package/dist/{chunk-NMQCIUBE.js → chunk-CRPLPK6J.js} +10 -8
- package/dist/{chunk-PPLFDG7N.js → chunk-CVTIGS5K.js} +3 -3
- package/dist/{chunk-NKAW4RVE.js → chunk-D2LSYXLW.js} +1 -1
- package/dist/{chunk-CHQWDBUM.js → chunk-D3M5VOC5.js} +9 -14
- package/dist/{chunk-TPLO6NJI.js → chunk-DH3M5X3Y.js} +4 -4
- package/dist/{chunk-WQGQCSRY.js → chunk-DHVRVI7F.js} +5 -5
- package/dist/{chunk-KCF6Q54R.js → chunk-DL6PEJWH.js} +5 -2
- package/dist/{chunk-LGYCWN3Q.js → chunk-DWFWF6IR.js} +30 -22
- package/dist/{chunk-KVYHRUZX.js → chunk-DX5Y3L5B.js} +3 -3
- package/dist/{chunk-T5S7U5C6.js → chunk-E26Z73S3.js} +1 -1
- package/dist/{chunk-OTWFSHYH.js → chunk-E4IR34CF.js} +434 -306
- package/dist/{chunk-32IRBM3V.js → chunk-ELRE6LVJ.js} +3 -3
- package/dist/{chunk-EUJSQHIL.js → chunk-EOXNEA4Z.js} +2 -2
- package/dist/{chunk-QGQYMSYM.js → chunk-ERDQIRUL.js} +4 -4
- package/dist/{chunk-ATKA5KHE.js → chunk-EWKJDXH6.js} +3 -3
- package/dist/{chunk-FLHL32SV.js → chunk-EZJHKHWU.js} +36 -8
- package/dist/{chunk-QQLVSUO7.js → chunk-FFOFGL2O.js} +2 -2
- package/dist/{chunk-UHVKV5IF.js → chunk-FNXU56VT.js} +1 -1
- package/dist/{chunk-BMJGWQ5X.js → chunk-G3U5CUF3.js} +1 -1
- package/dist/{chunk-ON3CGL3V.js → chunk-GDIBE57N.js} +2 -2
- package/dist/{chunk-MWTOYGIJ.js → chunk-GEOJA37C.js} +3 -3
- package/dist/{chunk-MO5NTFSC.js → chunk-GIVMQDSK.js} +2 -2
- package/dist/{chunk-UCLUH5AG.js → chunk-GRSZAGJB.js} +2 -2
- package/dist/{chunk-AGTBMLNM.js → chunk-GVIJFPZV.js} +2 -2
- package/dist/{chunk-YVCPUVHV.js → chunk-H3LEOZVK.js} +1 -1
- package/dist/{chunk-OAV5ESA6.js → chunk-H7DTMLAR.js} +9 -9
- package/dist/{chunk-OYEGPK3Q.js → chunk-HFIVZJJD.js} +1 -1
- package/dist/{chunk-RBOKZ5ED.js → chunk-HFUI6LVF.js} +1 -1
- package/dist/chunk-HOIEN7O4.js +31 -0
- package/dist/{chunk-UHE44FC4.js → chunk-HTGJOOXE.js} +12 -4
- package/dist/{chunk-GWSMTN55.js → chunk-IE6BIB3L.js} +53 -1
- package/dist/{chunk-UHVB2TVW.js → chunk-IGZQYMZA.js} +7768 -7561
- package/dist/{chunk-CAYQATCT.js → chunk-J6VYWZSO.js} +1 -1
- package/dist/{chunk-OZDELWQP.js → chunk-JKLWQUSV.js} +1 -1
- package/dist/{chunk-27YDEBOP.js → chunk-JOOKM2NC.js} +2 -2
- package/dist/{chunk-XFSZ3IXC.js → chunk-JQZ5WP7L.js} +1 -1
- package/dist/{chunk-XLQUCTC2.js → chunk-JZVI2TMX.js} +3 -3
- package/dist/{chunk-NFNYYBD6.js → chunk-K2EJQ44S.js} +1 -1
- package/dist/{chunk-N4CJSWTO.js → chunk-KYKQO4VN.js} +2 -2
- package/dist/{chunk-2XZ76TF4.js → chunk-LO5USUM4.js} +1 -1
- package/dist/{chunk-TEA4ZEHB.js → chunk-M3IHARIW.js} +15 -15
- package/dist/{chunk-N7M2SNAF.js → chunk-M5TTYUZM.js} +2 -2
- package/dist/{chunk-IJYIIHGK.js → chunk-MK23FXLH.js} +1 -1
- package/dist/{chunk-AYESPEPQ.js → chunk-MPC3OODR.js} +40 -4
- package/dist/{chunk-K2VFTUAA.js → chunk-MSC5KBCE.js} +1 -1
- package/dist/{chunk-VPX4GVGQ.js → chunk-N6PAWR5C.js} +3 -3
- package/dist/{chunk-26RTKW2U.js → chunk-NJPLH762.js} +2 -2
- package/dist/{chunk-DQHFS4AE.js → chunk-NLVIE7VN.js} +4 -4
- package/dist/{chunk-3WG7IC5Z.js → chunk-O2BLY7PO.js} +1 -1
- package/dist/{chunk-SEC76O65.js → chunk-O2INZCGB.js} +1 -1
- package/dist/{chunk-2PASB3PC.js → chunk-O4K22EFS.js} +5 -5
- package/dist/{chunk-L27Z3PZT.js → chunk-O5U3Y5DX.js} +1 -1
- package/dist/{chunk-KD33HZPP.js → chunk-OD7XWF5T.js} +2 -2
- package/dist/{chunk-7QFFS657.js → chunk-OEGWTN6N.js} +1 -1
- package/dist/{chunk-Q42L7V5T.js → chunk-OL7RHRNJ.js} +1 -1
- package/dist/{chunk-AU4ZBCR3.js → chunk-OMZSPAK5.js} +1 -1
- package/dist/{chunk-3ANC4SO2.js → chunk-OPSGEOCO.js} +27 -19
- package/dist/{chunk-YU5LSWA2.js → chunk-PGITR2WX.js} +7 -4
- package/dist/{chunk-RIAH7WEL.js → chunk-PS7WBIPK.js} +10 -10
- package/dist/{chunk-TN3WGE3L.js → chunk-PYTF6VHF.js} +6 -4
- package/dist/{chunk-OIO7YMBP.js → chunk-QGQCWG7F.js} +1 -1
- package/dist/{chunk-TFVIXR6V.js → chunk-ROESFEBP.js} +79 -70
- package/dist/{chunk-YY7ZJHL3.js → chunk-RV3HR3BZ.js} +5 -5
- package/dist/{chunk-KWTTELUY.js → chunk-SALNTRJA.js} +47 -3
- package/dist/{chunk-LKWWY6WN.js → chunk-SE4NOUB6.js} +1 -1
- package/dist/{chunk-BOEEHWDX.js → chunk-SM5PNCDI.js} +1 -1
- package/dist/{chunk-ZLG2E7GC.js → chunk-SNKBI4YB.js} +2 -2
- package/dist/{chunk-EXEX7TSU.js → chunk-SV72WLBE.js} +13 -14
- package/dist/{chunk-PXLGDX2S.js → chunk-SYKUNH25.js} +39 -24
- package/dist/{chunk-MDOMSEK2.js → chunk-TAXMLPTE.js} +2 -2
- package/dist/{chunk-5BWIBP2F.js → chunk-TLDIP7Y3.js} +16 -12
- package/dist/{chunk-HLDUHLYO.js → chunk-TLGQQ324.js} +4 -4
- package/dist/{chunk-5LSMAWK5.js → chunk-U5MILT4G.js} +1 -1
- package/dist/{chunk-UV3I2TND.js → chunk-UDLWVQ74.js} +33 -40
- package/dist/{chunk-AHXRYOTC.js → chunk-UGKUGYHD.js} +1 -1
- package/dist/{chunk-EUP7ODOV.js → chunk-UJTLTFB6.js} +1 -1
- package/dist/{chunk-J424KJXV.js → chunk-V3O4AFO3.js} +9 -9
- package/dist/{chunk-FMYXLRJN.js → chunk-VBEDZGBW.js} +3 -3
- package/dist/{chunk-NRGNEP3R.js → chunk-VI2LLFW6.js} +2 -2
- package/dist/{chunk-PCNNMAUX.js → chunk-VLFBOKZX.js} +1645 -1461
- package/dist/{chunk-YSN6HPD3.js → chunk-VSM7OIG2.js} +2 -2
- package/dist/{chunk-4RPIEGL3.js → chunk-VXE46PXX.js} +1 -1
- package/dist/{chunk-B5HSHXE2.js → chunk-W2OXNTHG.js} +12 -7
- package/dist/{chunk-ND5SQJAB.js → chunk-WEU6WLVT.js} +2 -2
- package/dist/{chunk-E7GHBT2M.js → chunk-WGHJUGNU.js} +11 -9
- package/dist/{chunk-OOWZ6M75.js → chunk-WJIWXHXK.js} +8 -4
- package/dist/{chunk-NISP57R3.js → chunk-WLNHZ2OM.js} +56 -33
- package/dist/{chunk-X4KIL5BW.js → chunk-WQZQMADW.js} +14 -14
- package/dist/{chunk-DY7PQLIE.js → chunk-WTJZ5QFR.js} +42 -5
- package/dist/{chunk-O7TIBLSJ.js → chunk-X3IVUSOX.js} +80 -15
- package/dist/{chunk-2LQJHVI7.js → chunk-X3UXEB2U.js} +2 -2
- package/dist/{chunk-NFLH3TQ5.js → chunk-XMT4MG6W.js} +13 -10
- package/dist/{chunk-KHEOHL5O.js → chunk-XYP4T6TQ.js} +1 -1
- package/dist/{chunk-4S53OP2C.js → chunk-Y6CZFX5X.js} +65 -20
- package/dist/{chunk-QX4TZ2RK.js → chunk-Z642P33A.js} +72 -54
- package/dist/{chunk-6EG3W5AD.js → chunk-ZAWQJOTW.js} +8 -8
- package/dist/{chunk-FLQT2FVH.js → chunk-ZCLC3KVY.js} +1 -1
- package/dist/{chunk-CRRVULYR.js → chunk-ZFOV3R2L.js} +15 -3
- package/dist/{chunk-JAAIW4JR.js → chunk-ZO5NHAF3.js} +1 -1
- package/dist/{chunk-4ZQG3Z3J.js → chunk-ZYNNZ5DE.js} +2 -2
- package/dist/{clean-SXRW77YG.js → clean-6ODSABBF.js} +35 -33
- package/dist/cli.js +70 -70
- package/dist/{cloud-PUCWVAS2.js → cloud-IMYQB5RC.js} +4 -4
- package/dist/{cloud-LU4FVT33.js → cloud-NTKLXMBS.js} +9 -8
- package/dist/{cloudrun-SXXONVD6.js → cloudrun-JNLDP33J.js} +16 -13
- package/dist/{compare-K65FNAEA.js → compare-VLYZ6ZS4.js} +55 -53
- package/dist/{compiler-QISQISFV.js → compiler-7M2UCEWG.js} +7 -6
- package/dist/{component-YYCDOLP2.js → component-KMUHKZ4R.js} +4 -3
- package/dist/{compositions-LCQTIYIU.js → compositions-ESLWNOMS.js} +30 -29
- package/dist/{contactSheet-CCHQAZLA.js → contactSheet-4YF7U6U7.js} +5 -4
- package/dist/contract/path-policy.json +12 -2
- package/dist/{curve-T7JAY3EM.js → curve-7RPSNRPE.js} +22 -20
- package/dist/{cuts-E54SOAWH.js → cuts-KBAAZSPS.js} +23 -21
- package/dist/{delete-GLQNSOWH.js → delete-EP5Z7HKF.js} +14 -13
- package/dist/{deploy-SPMSEG67.js → deploy-MVR63JLD.js} +14 -11
- package/dist/{describeProject-YPTJWL3O.js → describeProject-NBVZT5EN.js} +16 -15
- package/dist/{destroy-FMAAH4KQ.js → destroy-DQKIT574.js} +13 -10
- package/dist/{deterministicFonts-OXGNMVJE.js → deterministicFonts-LYBMXXBW.js} +5 -4
- package/dist/{diff-OT5SHVFD.js → diff-RI3FTMOZ.js} +73 -67
- package/dist/{dist-T62DJJZX.js → dist-G7VFX23I.js} +8 -4
- package/dist/{dist-RYTNYHMF.js → dist-LRGTXDSM.js} +3 -3
- package/dist/{dist-EO7BILWH.js → dist-TOOMD57O.js} +21 -17
- package/dist/{doctor-L4SNKUBM.js → doctor-43YNRCRB.js} +25 -24
- package/dist/{energy-AXQGYZF6.js → energy-YCH36KCC.js} +23 -21
- package/dist/{events-7QP5H6PW.js → events-6RJBITYN.js} +28 -25
- package/dist/{events-5T25R4EH.js → events-JCPYG3CD.js} +6 -6
- package/dist/{events-EBA6KHJV.js → events-VUR27EF6.js} +12 -11
- package/dist/{execute-PTHC7Y5Q.js → execute-OXMKWIFI.js} +45 -44
- package/dist/{extract-76UPXPJC.js → extract-XGD2RDEX.js} +25 -23
- package/dist/{face-YZON2N2E.js → face-XCNWNTGN.js} +24 -22
- package/dist/{feedback-KAYKPPHI.js → feedback-JNFDVBFV.js} +27 -26
- package/dist/{ffmpeg-T3KK5XKT.js → ffmpeg-YQLAJUEA.js} +15 -14
- package/dist/{figma-NJ6CAJGV.js → figma-XXGHYEB3.js} +3 -3
- package/dist/fontLocalizeCli.js +23 -21
- package/dist/{frames-KNR4CSB4.js → frames-PEMWFRRY.js} +25 -23
- package/dist/{generate-ISCPAKHT.js → generate-H5M4QSJR.js} +42 -40
- package/dist/{get-X7QNC3PE.js → get-R6Y2OE5P.js} +14 -13
- package/dist/{gpuPolicy-ZXN5S3HE.js → gpuPolicy-2WVDQYZA.js} +15 -14
- package/dist/{grade-compare-XD3IONCL.js → grade-compare-KFXPZFDL.js} +58 -54
- package/dist/{gsapParserAcorn-SKGP4R4N.js → gsapParserAcorn-RODCGO2L.js} +1 -1
- package/dist/hangReport.js +2 -2
- package/dist/{heifImagePrep-EFBHDH4Z.js → heifImagePrep-VLKYA5QZ.js} +19 -17
- package/dist/{help-VUFIY5X4.js → help-T3XUX5RI.js} +2 -2
- package/dist/{history-OM3MHRB2.js → history-QJPUCUUC.js} +26 -21
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +76 -76
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{index-gen-OPMQ5WSN.js → index-gen-3DWPA4FO.js} +14 -12
- package/dist/{info-G64344ST.js → info-556DHJHJ.js} +26 -26
- package/dist/{init-2N6SDLZB.js → init-P62TPWR3.js} +61 -56
- package/dist/{ink-T5BJE4D2.js → ink-SRN65OZH.js} +23 -21
- package/dist/{inspect-6I4YSARX.js → inspect-U5FWQQFB.js} +54 -53
- package/dist/{installer-JNQKFCTN.js → installer-3TNMANQV.js} +9 -8
- package/dist/{keyframes-PT3H7WHD.js → keyframes-FPGEFGCH.js} +63 -28
- package/dist/{lambda-NEQXIHUM.js → lambda-YJY2MYWL.js} +25 -24
- package/dist/{layout-FRWUKOGX.js → layout-QIKSVA44.js} +54 -53
- package/dist/{lint-GXPONOPU.js → lint-RD33ESM5.js} +20 -20
- package/dist/{lintProject-J4YTLKPW.js → lintProject-ZWLXB3A2.js} +3 -3
- package/dist/{list-JO7WSM6Y.js → list-FFO3WOB2.js} +14 -13
- package/dist/{localPage-XDWFSE4K.js → localPage-DHIBMNJH.js} +16 -15
- package/dist/{login-XMFEIEXG.js → login-IMFRQOEQ.js} +8 -8
- package/dist/{logout-CCATTNTL.js → logout-SLBKP67J.js} +4 -4
- package/dist/{look-U77ADJ4V.js → look-ZZHJYSPC.js} +23 -21
- package/dist/{manager-ZRETV4LQ.js → manager-U4WEPCLV.js} +5 -5
- package/dist/{manager-RNMX2WTR.js → manager-V4LGD4HB.js} +16 -15
- package/dist/{manifest-QSJYVERU.js → manifest-TSKRUXZ5.js} +5 -1
- package/dist/{measure-JNJAPVVN.js → measure-ZRBVN45B.js} +11 -11
- package/dist/{media-treatment-MFNKKPM7.js → media-treatment-3I2CMQJZ.js} +30 -25
- package/dist/{media-use-ZKHL2IN2.js → media-use-2OYJ3CCN.js} +8 -8
- package/dist/{models-PGO2ERAU.js → models-PRW7EWSV.js} +20 -19
- package/dist/{motionShot-AG4LR5Q5.js → motionShot-VWILMLHQ.js} +39 -30
- package/dist/{normalize-audio-FO3JCPD3.js → normalize-audio-42XMF35K.js} +19 -17
- package/dist/{oauth-SAVP2YM4.js → oauth-V3HSFZRE.js} +2 -2
- package/dist/{open-ZI6KK3GM.js → open-D52MJZQA.js} +31 -28
- package/dist/{parakeetRunner-CBO3HRL6.js → parakeetRunner-ZR2JWQZH.js} +23 -22
- package/dist/{pipeline-VWVNH5ZC.js → pipeline-W3H4JA6H.js} +18 -17
- package/dist/{plan-UHZYW3K2.js → plan-2HQOFJO7.js} +34 -33
- package/dist/{play-IVTXE4JW.js → play-G5XDRDIZ.js} +49 -41
- package/dist/{preflight-QJNKKMPE.js → preflight-W2JDYF3T.js} +18 -17
- package/dist/{present-NB6DAJ6K.js → present-CYMTHQFM.js} +68 -51
- package/dist/{preview-FIWAZ5PX.js → preview-DTQPQZTK.js} +51 -49
- package/dist/{probe-VQJOUG65.js → probe-WZJK3YQI.js} +23 -21
- package/dist/{producer-NP6X5UBL.js → producer-2BSMSO6I.js} +1 -1
- package/dist/{progress-IY6U35WH.js → progress-KRDVC24C.js} +4 -1
- package/dist/{projectConfig-UVA26HJW.js → projectConfig-BYRVYLCC.js} +12 -11
- package/dist/{publication-LYPU7NTZ.js → publication-UCFJLELD.js} +7 -6
- package/dist/{publish-MRQ2K62E.js → publish-KXVPSWCO.js} +36 -35
- package/dist/{refresh-X5ZLKQO5.js → refresh-2GVNKDQE.js} +4 -4
- package/dist/{remove-background-RG6DCWOW.js → remove-background-O7BZNS3X.js} +19 -18
- package/dist/{render-XWBMMSC5.js → render-DGAP4Q2Z.js} +81 -67
- package/dist/{render-6B7YPN7H.js → render-QOWXGWQZ.js} +55 -54
- package/dist/{render-CM4MCNVA.js → render-TYS3LCIQ.js} +10 -8
- package/dist/{render-batch-Y3RRNDNJ.js → render-batch-TEQRGAUC.js} +10 -8
- package/dist/renderSetupWorker.js +8 -8
- package/dist/{resolver-K6VAEZVH.js → resolver-RN2JGGQL.js} +9 -8
- package/dist/{reverse-5RDRLKAP.js → reverse-FUARFEG2.js} +1 -1
- package/dist/{run-OQK3QU4I.js → run-V722HMUG.js} +12 -11
- package/dist/{sam-A4NXDWSU.js → sam-KHLM2DJA.js} +4 -4
- package/dist/{screenshotCapture-VDITRAK2.js → screenshotCapture-4BB4LUMX.js} +18 -17
- package/dist/{service-C3UT4LYP.js → service-ZPCHJY6B.js} +24 -23
- package/dist/{share-JU3IDHUV.js → share-PXUN7AH7.js} +29 -28
- package/dist/{sherpa-Z2Z4XLXV.js → sherpa-LT6Y7IGM.js} +22 -21
- package/dist/sherpaWorker.js +6 -3
- package/dist/{sites-QK3F4AUS.js → sites-WWCABDSX.js} +4 -1
- package/dist/skills/hyperframes/SKILL.md +2 -2
- package/dist/skills/hyperframes/references/format.md +11 -2
- package/dist/skills/hyperframes/references/overlays.md +1 -1
- package/dist/skills/hyperframes/references/plugin-installation.md +45 -22
- package/dist/skills/hyperframes/references/sound.md +1 -0
- package/dist/skills/hyperframes/scripts/plugin-cli.mjs +61 -18
- package/dist/skills/hyperframes-cli/SKILL.md +2 -2
- package/dist/skills/media-use/SKILL.md +1 -1
- package/dist/skills/media-use/audio/scripts/audio.mjs +24 -7
- package/dist/skills/media-use/audio/scripts/carve.mjs +10 -82
- package/dist/skills/media-use/audio/scripts/lib/audio-carve.mjs +4 -0
- package/dist/skills/media-use/audio/scripts/lib/bgm.mjs +4 -1
- package/dist/skills/media-use/audio/scripts/lib/media-record.mjs +25 -7
- package/dist/skills/media-use/audio/scripts/lib/project-path.mjs +56 -0
- package/dist/skills/media-use/audio/scripts/lib/python.mjs +9 -1
- package/dist/skills/media-use/audio/scripts/lib/recording.mjs +66 -3
- package/dist/skills/media-use/audio/scripts/wait-bgm.mjs +12 -7
- package/dist/skills/media-use/references/audio.md +2 -2
- package/dist/skills/media-use/references/mixing.md +1 -1
- package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +27 -2
- package/dist/skills/media-use/scripts/lib/index-gen.mjs +13 -11
- package/dist/skills/media-use/scripts/lib/local-media-search.mjs +52 -23
- package/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +3 -1
- package/dist/skills/media-use/scripts/lib/manifest.mjs +51 -4
- package/dist/skills/media-use/scripts/resolve.mjs +4 -14
- package/dist/skills/media-use/scripts/transcribe.mjs +19 -3
- package/dist/{skills-24YEOJGP.js → skills-G63W5GD5.js} +17 -16
- package/dist/{skillsUpdateCheck-5R4JJ27G.js → skillsUpdateCheck-2T3JVDAA.js} +6 -6
- package/dist/{snapshot-T4REEKFX.js → snapshot-EVSKTVDG.js} +90 -77
- package/dist/{src-RMJVAEKT.js → src-K5FSMLTB.js} +23 -21
- package/dist/{src-EKGFNTTY.js → src-R57EQQSI.js} +29 -20
- package/dist/{start-E5RIH3KS.js → start-XBCYKGBV.js} +41 -39
- package/dist/{state-7OIPR4BG.js → state-FO64CPYE.js} +4 -1
- package/dist/{staticProjectServer-LEM5W3S5.js → staticProjectServer-Q6VR7CXT.js} +33 -31
- package/dist/{status-CSHJWWOP.js → status-E5XIWRCQ.js} +37 -34
- package/dist/studio/assets/{hyperframes-player-BroIQA4E.js → hyperframes-player-B78JDyI_.js} +1 -1
- package/dist/studio/assets/{index-Be7DZynj.js → index-D7ICtobF.js} +190 -190
- package/dist/studio/assets/{index-CiF0D62S.js → index-ww7-RmuM.js} +1 -1
- package/dist/studio/assets/{pausedVideoDecoder-RXcvblHS.js → pausedVideoDecoder-Dbe8Cmab.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/dist/{studio-api-COJYCMRI.js → studio-api-GMJVYGET.js} +21 -17
- package/dist/{studioSelectionClient-W2S3H2VO.js → studioSelectionClient-S46TNAAZ.js} +2 -1
- package/dist/{studioServer-62ZTBLFM.js → studioServer-MIQCMK6U.js} +130 -102
- package/dist/subCompositionWorker.js +1162 -0
- package/dist/{sync-CLRYHWYE.js → sync-WJOFN6VN.js} +23 -21
- package/dist/{synthesize-Z2H32QPU.js → synthesize-FXM7ZD6J.js} +6 -5
- package/dist/{system-2YOII5LZ.js → system-DBUN5UDD.js} +3 -3
- package/dist/{telemetry-DWA36DFX.js → telemetry-HZ4P4DMC.js} +12 -11
- package/dist/{templates-LXMQR35F.js → templates-KFZZSSKW.js} +139 -46
- package/dist/{timeline-LMKTDKRT.js → timeline-5M6DPCXF.js} +38 -36
- package/dist/{tokens-VJ765KFG.js → tokens-H4NPNRFR.js} +3 -2
- package/dist/{transcribe-TICRK4IY.js → transcribe-6STI2ALX.js} +48 -46
- package/dist/{transcribe-3WASFP7Z.js → transcribe-7PE5UH7J.js} +19 -18
- package/dist/{tts-5YJV6UXX.js → tts-D7CLD3AD.js} +1 -1
- package/dist/{update-Q26QGCBW.js → update-H3T3AVVG.js} +19 -18
- package/dist/{updateCheck-7R4S46TT.js → updateCheck-TLCXUNBV.js} +5 -5
- package/dist/{upgrade-76TFHAGI.js → upgrade-BZVTMCQU.js} +9 -8
- package/dist/{urlDownloader-AE4UQI5A.js → urlDownloader-FJXNC3IM.js} +14 -13
- package/dist/{validate-BEYREWEL.js → validate-WTRVCEL5.js} +40 -38
- package/dist/{video-47AVLNWM.js → video-TVO2U5F2.js} +18 -17
- package/dist/{voices-5O6OAL6H.js → voices-F3EW43LX.js} +40 -38
- package/dist/warmCheck.js +66 -63
- package/dist/warmCheckClient.js +2 -2
- package/package.json +2 -1
- package/dist/chunk-XGEJPKRY.js +0 -5069
- package/dist/skills/hyperframes/scripts/lib/main-module.test.mjs +0 -46
- package/dist/skills/hyperframes/scripts/lib/windows-exe-search.test.mjs +0 -149
- package/dist/skills/hyperframes/scripts/plugin-cli.test.mjs +0 -207
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +0 -166
- package/dist/skills/media-use/audio/scripts/carve.test.mjs +0 -254
- package/dist/skills/media-use/audio/scripts/gemini-pipeline.test.mjs +0 -131
- package/dist/skills/media-use/audio/scripts/heygen-tts.test.mjs +0 -38
- package/dist/skills/media-use/audio/scripts/heygen-voice.test.mjs +0 -233
- package/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +0 -136
- package/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +0 -74
- package/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +0 -41
- package/dist/skills/media-use/audio/scripts/lib/gemini-auth.test.mjs +0 -86
- package/dist/skills/media-use/audio/scripts/lib/gemini-tts.test.mjs +0 -253
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +0 -627
- package/dist/skills/media-use/audio/scripts/lib/media-record.test.mjs +0 -239
- package/dist/skills/media-use/audio/scripts/lib/python.test.mjs +0 -182
- package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +0 -331
- package/dist/skills/media-use/audio/scripts/lib/tts.cleanup.test.mjs +0 -181
- package/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +0 -183
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +0 -280
- package/dist/skills/media-use/audio/scripts/lib/voice-credit.test.mjs +0 -21
- package/dist/skills/media-use/audio/scripts/recording.test.mjs +0 -139
- package/dist/skills/media-use/audio/scripts/trusted-program.test.mjs +0 -106
- package/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +0 -108
- package/dist/skills/media-use/scripts/compatibility.test.mjs +0 -41
- package/dist/skills/media-use/scripts/dither.test.mjs +0 -176
- package/dist/skills/media-use/scripts/lib/adopt.test.mjs +0 -143
- package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +0 -139
- package/dist/skills/media-use/scripts/lib/cache.test.mjs +0 -110
- package/dist/skills/media-use/scripts/lib/candidates.test.mjs +0 -155
- package/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +0 -34
- package/dist/skills/media-use/scripts/lib/config-lock.test.mjs +0 -79
- package/dist/skills/media-use/scripts/lib/coverage.test.mjs +0 -136
- package/dist/skills/media-use/scripts/lib/credit-limit.test.mjs +0 -39
- package/dist/skills/media-use/scripts/lib/cube-build.test.mjs +0 -80
- package/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +0 -130
- package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +0 -174
- package/dist/skills/media-use/scripts/lib/duck.test.mjs +0 -319
- package/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +0 -102
- package/dist/skills/media-use/scripts/lib/freeze.test.mjs +0 -138
- package/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +0 -285
- package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +0 -315
- package/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +0 -49
- package/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +0 -435
- package/dist/skills/media-use/scripts/lib/local-media-search.test.mjs +0 -23
- package/dist/skills/media-use/scripts/lib/local-models.test.mjs +0 -220
- package/dist/skills/media-use/scripts/lib/local-run.test.mjs +0 -121
- package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +0 -312
- package/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +0 -316
- package/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +0 -199
- package/dist/skills/media-use/scripts/lib/manifest.test.mjs +0 -397
- package/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +0 -197
- package/dist/skills/media-use/scripts/lib/media-home.test.mjs +0 -61
- package/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +0 -174
- package/dist/skills/media-use/scripts/lib/misses.test.mjs +0 -89
- package/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +0 -41
- package/dist/skills/media-use/scripts/lib/openverse.test.mjs +0 -219
- package/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +0 -44
- package/dist/skills/media-use/scripts/lib/prefs-store.concurrent.test.mjs +0 -173
- package/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +0 -245
- package/dist/skills/media-use/scripts/lib/probe.test.mjs +0 -221
- package/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +0 -391
- package/dist/skills/media-use/scripts/lib/registry.test.mjs +0 -261
- package/dist/skills/media-use/scripts/lib/search.test.mjs +0 -32
- package/dist/skills/media-use/scripts/lib/specs.test.mjs +0 -157
- package/dist/skills/media-use/scripts/lib/stats.test.mjs +0 -165
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +0 -550
- package/dist/skills/media-use/scripts/lib/test-home.test.mjs +0 -10
- package/dist/skills/media-use/scripts/lib/transcriptCutFade.test.mjs +0 -33
- package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +0 -59
- package/dist/skills/media-use/scripts/lib/usage.test.mjs +0 -54
- package/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +0 -46
- package/dist/skills/media-use/scripts/resolve-plugin.test.mjs +0 -86
- package/dist/skills/media-use/scripts/transcribe.test.mjs +0 -155
- package/dist/skills/media-use/scripts/transcript-cut.test.mjs +0 -341
- package/dist/{chunk-BAWGEGKD.js → chunk-XMAU5ZQX.js} +3 -3
|
@@ -18,18 +18,16 @@
|
|
|
18
18
|
* voice is analysed together, so a bed running under a narrator and an answer makes
|
|
19
19
|
* room for both.
|
|
20
20
|
*
|
|
21
|
-
* Needs `ffmpeg` on PATH (to decode the audio)
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* there.
|
|
21
|
+
* Needs `ffmpeg` on PATH (to decode the audio). The analysis ships beside this
|
|
22
|
+
* script (`lib/audio-carve.mjs`, generated from core), so nothing in the
|
|
23
|
+
* composition's project is loaded.
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
26
|
import "../../scripts/lib/windows-exe-search.mjs";
|
|
28
27
|
import { execFileSync } from "node:child_process";
|
|
29
|
-
import { createRequire } from "node:module";
|
|
30
28
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
31
29
|
import { dirname, resolve } from "node:path";
|
|
32
|
-
import
|
|
30
|
+
import * as carveApi from "./lib/audio-carve.mjs";
|
|
33
31
|
import { isMainModule } from "./lib/main-module.mjs";
|
|
34
32
|
|
|
35
33
|
/** Sample rate the analysis runs at. Matches Studio's own decode rate, so the
|
|
@@ -40,13 +38,12 @@ const SAMPLE_RATE = 48000;
|
|
|
40
38
|
export const DEFAULT_STRENGTH = 0.8;
|
|
41
39
|
|
|
42
40
|
const usage = `carve.mjs --comp <file.html> [--bed <elementId>] [--voice <elementId> ...]
|
|
43
|
-
[--strength 0..1] [--dry-run]
|
|
41
|
+
[--strength 0..1] [--dry-run]
|
|
44
42
|
|
|
45
43
|
--bed id of the music track that gets carved (detected if omitted)
|
|
46
44
|
--voice id of a voice to make room for; repeatable (detected if omitted)
|
|
47
45
|
--strength how hard to carve, 0..1 (default ${DEFAULT_STRENGTH})
|
|
48
|
-
--dry-run report what it would write, touch nothing
|
|
49
|
-
--core directory to resolve @hyperframes/core from (default: the comp's)`;
|
|
46
|
+
--dry-run report what it would write, touch nothing`;
|
|
50
47
|
|
|
51
48
|
export function parseArgs(argv) {
|
|
52
49
|
const args = { strength: DEFAULT_STRENGTH, dryRun: false, voices: [] };
|
|
@@ -62,7 +59,6 @@ export function parseArgs(argv) {
|
|
|
62
59
|
else if (flag === "--bed") args.bed = next();
|
|
63
60
|
else if (flag === "--voice") args.voices.push(next());
|
|
64
61
|
else if (flag === "--strength") args.strength = Number(next());
|
|
65
|
-
else if (flag === "--core") args.core = next();
|
|
66
62
|
else if (flag === "--dry-run") args.dryRun = true;
|
|
67
63
|
else if (flag === "-h" || flag === "--help") fail(usage, 0);
|
|
68
64
|
else fail(`unknown flag: ${flag}\n\n${usage}`);
|
|
@@ -79,73 +75,6 @@ function fail(message, code = 1) {
|
|
|
79
75
|
process.exit(code);
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
/**
|
|
83
|
-
* Load the carve analysis out of `@hyperframes/core`.
|
|
84
|
-
*
|
|
85
|
-
* Resolved from the project rather than from this script, which lives wherever
|
|
86
|
-
* the skill was installed — a sibling of the composition is what has the
|
|
87
|
-
* dependency.
|
|
88
|
-
*/
|
|
89
|
-
export async function loadCore(fromDir) {
|
|
90
|
-
const require = createRequire(pathToFileURL(resolve(fromDir, "package.json")));
|
|
91
|
-
|
|
92
|
-
/*
|
|
93
|
-
* Two constraints at once, and satisfying either alone is broken:
|
|
94
|
-
*
|
|
95
|
-
* 1. Anchored at the PROJECT, not at this script. This file lives wherever
|
|
96
|
-
* the skill was installed, which has no @hyperframes/core; the
|
|
97
|
-
* composition's project is what holds the dependency. So a bare
|
|
98
|
-
* `import("@hyperframes/core/audio-carve")` from here cannot work — bare
|
|
99
|
-
* specifiers resolve relative to the importing module.
|
|
100
|
-
* 2. Honouring the package's export CONDITIONS. `require.resolve` asks for
|
|
101
|
-
* "require"/"node". The workspace manifest declares `node`, so this
|
|
102
|
-
* resolved fine inside the monorepo — but the PUBLISHED manifest carries
|
|
103
|
-
* only `import` + `types`, so every consumer of the released package got
|
|
104
|
-
* ERR_PACKAGE_PATH_NOT_EXPORTED for a package that ships the file. That
|
|
105
|
-
* is the audience this skill is shipped to, so the script was broken
|
|
106
|
-
* everywhere except where it was developed.
|
|
107
|
-
*
|
|
108
|
-
* Keep the project anchor; fall back to the package's declared `import`
|
|
109
|
-
* target when no require-resolvable condition exists.
|
|
110
|
-
*/
|
|
111
|
-
const load = async (subpath) => {
|
|
112
|
-
const spec = `@hyperframes/core/${subpath}`;
|
|
113
|
-
try {
|
|
114
|
-
return await import(pathToFileURL(require.resolve(spec)).href);
|
|
115
|
-
} catch (error) {
|
|
116
|
-
if (error?.code !== "ERR_PACKAGE_PATH_NOT_EXPORTED") throw error;
|
|
117
|
-
// `./package.json` is exported by every manifest, so this always resolves
|
|
118
|
-
// and gives us the package root without guessing at node_modules layout.
|
|
119
|
-
const pkgPath = require.resolve("@hyperframes/core/package.json");
|
|
120
|
-
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
121
|
-
const entry = pkg.exports?.[`./${subpath}`];
|
|
122
|
-
const target = typeof entry === "string" ? entry : (entry?.import ?? entry?.default ?? null);
|
|
123
|
-
if (!target) {
|
|
124
|
-
fail(
|
|
125
|
-
`@hyperframes/core does not export ./${subpath}\n` +
|
|
126
|
-
` found at: ${pkgPath} (version ${pkg.version})\n` +
|
|
127
|
-
` update it: npm i -D @hyperframes/core`,
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
return import(pathToFileURL(resolve(dirname(pkgPath), target)).href);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
try {
|
|
135
|
-
return {
|
|
136
|
-
carve: await load("audio-carve"),
|
|
137
|
-
fx: await load("audio-fx"),
|
|
138
|
-
};
|
|
139
|
-
} catch (error) {
|
|
140
|
-
fail(
|
|
141
|
-
`cannot load @hyperframes/core from ${fromDir}\n` +
|
|
142
|
-
` is it installed there? npm i -D @hyperframes/core\n` +
|
|
143
|
-
` or point at one: --core <dir containing node_modules/@hyperframes/core>\n` +
|
|
144
|
-
` (${error.code ?? "error"}: ${error.message.split("\n")[0]})`,
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
78
|
/**
|
|
150
79
|
* The `sources` a carve should record for these voices, on this bed.
|
|
151
80
|
*
|
|
@@ -383,7 +312,6 @@ async function main() {
|
|
|
383
312
|
const args = parseArgs(process.argv.slice(2));
|
|
384
313
|
const compPath = resolve(args.comp);
|
|
385
314
|
const compDir = dirname(compPath);
|
|
386
|
-
const { carve: carveApi, fx: fxApi } = await loadCore(args.core ? resolve(args.core) : compDir);
|
|
387
315
|
|
|
388
316
|
const html = readFileSync(compPath, "utf-8");
|
|
389
317
|
const {
|
|
@@ -433,7 +361,7 @@ async function main() {
|
|
|
433
361
|
// carve's own nodes are replaced. That is what `fromCarve` is for.
|
|
434
362
|
const existingChain = attrOf(bedTag, "data-fx-chain");
|
|
435
363
|
const existingNodes = existingChain
|
|
436
|
-
?
|
|
364
|
+
? carveApi.parseAudioFxChain(unescapeAttr(existingChain)).nodes
|
|
437
365
|
: [];
|
|
438
366
|
const kept = existingNodes.filter((n) => !n.fromCarve);
|
|
439
367
|
// Lanes belonging to the carve being replaced, addressed by the ids the OLD
|
|
@@ -444,7 +372,7 @@ async function main() {
|
|
|
444
372
|
|
|
445
373
|
let claimed = { version: 1, nodes: kept };
|
|
446
374
|
const mint = (node) => {
|
|
447
|
-
const withId = { ...node, id:
|
|
375
|
+
const withId = { ...node, id: carveApi.mintAudioFxNodeId(claimed), fromCarve: true };
|
|
448
376
|
claimed = { version: 1, nodes: [...claimed.nodes, withId] };
|
|
449
377
|
return withId;
|
|
450
378
|
};
|
|
@@ -456,7 +384,7 @@ async function main() {
|
|
|
456
384
|
type: "gain",
|
|
457
385
|
enabled: true,
|
|
458
386
|
params: {
|
|
459
|
-
...
|
|
387
|
+
...carveApi.defaultAudioFxParams("gain"),
|
|
460
388
|
gain: 0,
|
|
461
389
|
},
|
|
462
390
|
})
|
|
@@ -522,7 +450,7 @@ async function main() {
|
|
|
522
450
|
}
|
|
523
451
|
const written =
|
|
524
452
|
` data-fx-carve="${escapeAttr(JSON.stringify(settings))}"` +
|
|
525
|
-
` data-fx-chain="${escapeAttr(
|
|
453
|
+
` data-fx-chain="${escapeAttr(carveApi.serializeAudioFxChain(chain))}"` +
|
|
526
454
|
(lanes.length > 0
|
|
527
455
|
? ` data-automation="${escapeAttr(JSON.stringify({ version: 1, lanes }))}"`
|
|
528
456
|
: "");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// GENERATED: do not hand-edit. Source: packages/core/src/audioCarve.ts and audioFx.ts, bundled by
|
|
2
|
+
// scripts/generate-media-use-audio-carve.mjs so carve.mjs runs the same analysis as Studio without
|
|
3
|
+
// loading @hyperframes/core from the project. Regenerate: node scripts/generate-media-use-audio-carve.mjs
|
|
4
|
+
var Z="data-fx-chain",Ne=Z.slice(5),D=1,C=(e="frequency",n="Frequency",t=1e3,a=20,r=2e4)=>({kind:"number",key:e,label:n,unit:"Hz",min:a,max:r,step:1,default:t,scale:"log",automatable:!0}),I=(e=.707,n="Bandwidth: higher is narrower.")=>({kind:"number",key:"q",label:"Q",unit:"",min:.1,max:20,step:.01,default:e,scale:"log",automatable:!0,hint:n}),E=(e=-40,n=40,t=0)=>({kind:"number",key:"gain",label:"Gain",unit:"dB",min:e,max:n,step:.1,default:t,automatable:!0}),L={kind:"enum",key:"poles",label:"Slope",options:[{value:"1",label:"6 dB/oct"},{value:"2",label:"12 dB/oct"}],default:"2",hint:"Two poles is the usual biquad; one pole is gentler."},V=[{id:"gain",label:"Gain",group:"dynamics",description:"Raise or lower the whole signal. Automate it to duck under something else.",params:[E(-60,12,0)],web:"gain-node"},{id:"peaking",label:"Peaking EQ",group:"filter",description:"Boost or cut a band, leaving everything either side alone.",params:[C("frequency","Frequency",1e3),E(-40,40,0),I(1)],web:"biquad-peaking"},{id:"lowshelf",label:"Low Shelf",group:"filter",description:"Lift or drop everything below the corner frequency.",params:[C("frequency","Frequency",200,20,2e3),E(-40,40,0)],web:"biquad-lowshelf"},{id:"highshelf",label:"High Shelf",group:"filter",description:"Lift or drop everything above the corner frequency.",params:[C("frequency","Frequency",4e3,500,2e4),E(-40,40,0)],web:"biquad-highshelf"},{id:"highpass",label:"High-pass",group:"filter",description:"Remove low frequencies: the usual fix for rumble on a voice.",params:[C("frequency","Cutoff",300,20,2e4),I(.707),L],web:"biquad-highpass"},{id:"lowpass",label:"Low-pass",group:"filter",description:"Remove high frequencies, which darkens or muffles a track.",params:[C("frequency","Cutoff",8e3,100,2e4),I(.707),L],web:"biquad-lowpass"},{id:"compressor",label:"Compressor",group:"dynamics",description:"Pull loud parts down so the quiet ones can come up.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-60,max:0,step:.5,default:-24,hint:"Level above which the compressor starts working."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:4},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:2e3,step:.1,default:20,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:250,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83,hint:"1 is a hard corner; higher eases into it."},{kind:"number",key:"makeup",label:"Makeup",unit:"dB",min:0,max:36,step:.1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1,hint:"Below 1 blends the dry signal back in."}],web:"worklet-compressor"},{id:"limiter",label:"Limiter",group:"dynamics",description:"Peak limiter that follows the signal's level. It has no lookahead, so a fast peak or an inter-sample peak can pass the ceiling; use the true-peak limiter for a delivery limit.",params:[{kind:"number",key:"limit",label:"Ceiling",unit:"dB",min:-24,max:0,step:.1,default:-1},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.1,max:80,step:.1,default:5},{kind:"number",key:"release",label:"Release",unit:"ms",min:1,max:8e3,step:1,default:50,scale:"log"},{kind:"number",key:"level_out",label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0}],web:"worklet-limiter"},{id:"truepeak",label:"True-peak limiter",group:"dynamics",description:"Lookahead limiter that holds a 4x estimate of the inter-sample peak at a dBTP ceiling; full-band noise can land up to about 1.7 dB above it. Adds lookahead plus about 0.3 ms of latency.",params:[{kind:"number",key:"ceiling",label:"Ceiling",unit:"dBTP",min:-24,max:0,step:.1,default:-1,hint:"Target true peak, measured on a 4x oversampled signal. Dense full-band sound can end up to about 1.7 dB above it."},{kind:"number",key:"lookahead",label:"Lookahead",unit:"ms",min:.5,max:10,step:.1,default:3,hint:"How far ahead the gain starts falling. Longer is smoother and adds the same latency."},{kind:"number",key:"release",label:"Release",unit:"ms",min:10,max:2e3,step:1,default:80,scale:"log"}],web:"worklet-truepeak"},{id:"gate",label:"Noise Gate",group:"dynamics",description:"Silence the track when it drops below the threshold.",params:[{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-80,max:0,step:.5,default:-35},{kind:"number",key:"range",label:"Range",unit:"dB",min:-80,max:0,step:.5,default:-24,hint:"How far down the gate pulls when closed."},{kind:"number",key:"ratio",label:"Ratio",unit:":1",min:1,max:20,step:.1,default:10},{kind:"number",key:"attack",label:"Attack",unit:"ms",min:.01,max:9e3,step:.1,default:1,scale:"log"},{kind:"number",key:"release",label:"Release",unit:"ms",min:.01,max:9e3,step:1,default:100,scale:"log"},{kind:"number",key:"knee",label:"Knee",unit:"",min:1,max:8,step:.01,default:2.83}],web:"worklet-gate"},{id:"saturate",label:"Saturation",group:"nonlinear",description:"Soft-clip the waveform for warmth or outright distortion.",params:[{kind:"enum",key:"type",label:"Curve",options:[{value:"tanh",label:"Tanh"},{value:"atan",label:"Arctan"},{value:"cubic",label:"Cubic"},{value:"exp",label:"Exponential"},{value:"alg",label:"Algebraic"},{value:"quintic",label:"Quintic"},{value:"sin",label:"Sine"},{value:"erf",label:"Error function"},{value:"hard",label:"Hard clip"}],default:"tanh"},{kind:"number",key:"threshold",label:"Threshold",unit:"dB",min:-40,max:0,step:.1,default:-6},{kind:"number",key:"output",automatable:!0,label:"Output",unit:"dB",min:-24,max:24,step:.1,default:0},{kind:"number",key:"oversample",label:"Oversample",unit:"x",min:1,max:8,step:1,default:4,hint:"Higher costs more but keeps aliasing down."}],web:"waveshaper"},{id:"bitcrush",label:"Bitcrush",group:"nonlinear",description:"Drop bit depth and sample rate for a lo-fi, digital sound.",params:[{kind:"number",key:"bits",label:"Bit depth",unit:"bit",min:1,max:32,step:.1,default:8},{kind:"number",key:"samples",label:"Sample hold",unit:"x",min:1,max:250,step:1,default:1,hint:"Repeats each sample N times, a crude downsample."},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-bitcrush"},{id:"pitchshift",label:"Pitch shift",group:"time",description:"Shifts pitch up or down without changing playback speed. Adds ~50 ms of latency.",params:[{kind:"number",key:"semitones",label:"Semitones",unit:"st",min:-12,max:12,step:1,default:0},{kind:"number",key:"mix",label:"Mix",unit:"",min:0,max:1,step:.01,default:1}],web:"worklet-pitchshift"},{id:"delay",label:"Delay",group:"time",description:"Repeating echoes behind the dry signal.",params:[{kind:"number",key:"time",automatable:!0,label:"Time",unit:"ms",min:1,max:5e3,step:1,default:250,scale:"log"},{kind:"number",key:"feedback",automatable:!0,label:"Feedback",unit:"",min:.01,max:.95,step:.01,default:.35},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.4}],web:"delay-feedback"},{id:"chorus",label:"Chorus",group:"time",description:"Detuned copies of the signal for width and thickness.",params:[{kind:"number",key:"delay",automatable:!0,label:"Delay",unit:"ms",min:1,max:100,step:.1,default:7},{kind:"number",key:"depth",automatable:!0,label:"Depth",unit:"ms",min:0,max:10,step:.01,default:2},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.01,max:10,step:.01,default:1},{kind:"number",key:"mix",automatable:!0,label:"Mix",unit:"",min:0,max:1,step:.01,default:.5}],web:"chorus-lfo"},{id:"phaser",label:"Phaser",group:"time",description:"Sweeping notches moving through the spectrum.",params:[{kind:"number",key:"in_gain",automatable:!0,label:"Input",unit:"",min:0,max:1,step:.01,default:.4},{kind:"number",key:"out_gain",automatable:!0,label:"Output",unit:"",min:0,max:2,step:.01,default:.74},{kind:"number",key:"delay",label:"Delay",unit:"ms",min:.1,max:5,step:.1,default:3},{kind:"number",key:"decay",label:"Decay",unit:"",min:0,max:.99,step:.01,default:.4},{kind:"number",key:"speed",automatable:!0,label:"Rate",unit:"Hz",min:.1,max:2,step:.01,default:.5},{kind:"enum",key:"type",label:"Waveform",options:[{value:"0",label:"Triangular"},{value:"1",label:"Sinusoidal"}],default:"0"}],web:"allpass-phaser"},{id:"reverb",label:"Reverb",group:"time",description:"Room tail. Both ends convolve the same generated impulse, so preview matches render.",params:[{kind:"number",key:"size",label:"Room size",unit:"",min:.05,max:1,step:.01,default:.7},{kind:"number",key:"damping",label:"Damping",unit:"",min:0,max:1,step:.01,default:.5,hint:"Higher rolls the top off the tail faster."},{kind:"number",key:"wet",automatable:!0,label:"Wet",unit:"",min:0,max:1,step:.01,default:.35},{kind:"number",key:"dry",automatable:!0,label:"Dry",unit:"",min:0,max:1,step:.01,default:.7}],web:"convolver"}],T=new Map(V.map(e=>[e.id,e]));var He=V.map(e=>e.id);function B(e){let n=T.get(e);if(!n)return{};let t={};for(let a of n.params)t[a.key]=a.default;return t}function U(e,n){let t=T.get(e);if(!t)return{};let a={};for(let r of t.params){let o=n?.[r.key];if(r.kind==="enum"){let i=r.options.some(u=>u.value===o);a[r.key]=i?o:r.default;continue}let s=typeof o=="number"?o:typeof o=="string"&&o.trim()!==""?Number(o):Number.NaN;a[r.key]=Number.isFinite(s)?Math.min(r.max,Math.max(r.min,s)):r.default}return a}var y=class extends Error{constructor(n){super(n),this.name="AudioFxChainError"}};function ee(e){let n;try{n=JSON.parse(e)}catch(r){throw new y(`Chain file is not valid JSON: ${r.message}`)}if(typeof n!="object"||n===null)throw new y("Chain file must be a JSON object.");let t=n;if(t.version!==D)throw new y(`Unsupported chain version: ${String(t.version)}`);if(!Array.isArray(t.nodes))throw new y("Chain file is missing a `nodes` array.");let a=t.nodes.map(ae);return{version:D,nodes:a}}function te(e){return JSON.stringify({version:D,nodes:e.nodes.map(re)})}function ne(e){let n=new Set(e.nodes.map(t=>t.id).filter(Boolean));for(let t=1;;t+=1){let a=`n${t}`;if(!n.has(a))return a}}function ae(e,n){if(typeof e!="object"||e===null)throw new y(`Node ${n} is not an object.`);let t=e;if(typeof t.type!="string"||!T.has(t.type))throw new y(`Node ${n} has unknown effect type: ${String(t.type)}`);return z({type:t.type,id:A(t.id),fromCarve:S(t.fromCarve),fromPreset:A(t.fromPreset),label:A(t.label),fromEq:A(t.fromEq),fromLeveller:S(t.fromLeveller),presetAmount:$(t.presetAmount),enabled:t.enabled!==!1,params:U(t.type,t.params??void 0)})}function re(e){return z({type:e.type,id:A(e.id),fromCarve:S(e.fromCarve),fromPreset:A(e.fromPreset),label:A(e.label),fromEq:A(e.fromEq),fromLeveller:S(e.fromLeveller),presetAmount:e.presetAmount===1?void 0:$(e.presetAmount),enabled:e.enabled===!1?!1:void 0,params:U(e.type,e.params)})}function A(e){return typeof e=="string"&&e?e:void 0}function S(e){return e===!0?!0:void 0}function $(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(1,Math.max(0,e))}function z(e){for(let n of Object.keys(e))e[n]===void 0&&delete e[n];return e}function O(e,n){let t=e.length;for(let a=1,r=0;a<t;a++){let o=t>>1;for(;r&o;o>>=1)r^=o;r^=o,a<r&&([e[a],e[r]]=[e[r],e[a]],[n[a],n[r]]=[n[r],n[a]])}for(let a=2;a<=t;a<<=1){let r=-2*Math.PI/a,o=Math.cos(r),s=Math.sin(r);for(let i=0;i<t;i+=a){let u=1,l=0;for(let f=0;f<a/2;f++){let h=e[i+f],c=n[i+f],b=e[i+f+a/2]*u-n[i+f+a/2]*l,m=e[i+f+a/2]*l+n[i+f+a/2]*u;e[i+f]=h+b,n[i+f]=c+m,e[i+f+a/2]=h-b,n[i+f+a/2]=c-m;let x=u*o-l*s;l=u*s+l*o,u=x}}}}var oe=[160,250,400,630,1e3,1600,2500,4e3,6e3],d=4096,ie=2048,se=/sfx|foley|whoosh|impact|riser|stinger|swoosh|thud|boom|click|ding|beep|ambien|room[-_ ]?tone/i,ue="(?<![a-z0-9])",le="(?![a-z0-9])",M=e=>`${ue}${e}${le}`,me=new RegExp(`music|bgm|${M("bed")}|soundtrack|score|${M("song")}|theme|instrumental|track\\d`,"i"),de=new RegExp(`voice|${M("vo")}|${M("vox")}|narrat|speech|dialog|monolog|announce|${M("tts")}|talk|interview|podcast|recap|script`,"i");function fe(...e){let n=e.filter(Boolean).join(" ");return de.test(n)?"voice":se.test(n)?"sfx":me.test(n)?"music":"unknown"}function ce(e,n){let t=a=>typeof a.duration=="number"&&Number.isFinite(a.duration)?a.start+Math.max(0,a.duration):Number.POSITIVE_INFINITY;return e.start<t(n)&&n.start<t(e)}function be(e){let n=Number.isFinite(e)?Math.min(1,Math.max(0,e)):.5;return{maxCutDb:Number((2+n*16).toFixed(2)),bands:Math.max(1,Math.min(6,Math.round(1+n*6))),q:Number((1.1+n*1.2).toFixed(2)),intelligibilityBias:Number(Math.min(1,.6+n*.4).toFixed(2)),duckDb:Number((n*24).toFixed(2)),headroomDb:Number((6+n*12).toFixed(2))}}function pe(e,n){let t=e.map(o=>({samples:o.samples,at:Math.round(o.offsetSeconds*n)})),a=t.reduce((o,s)=>Math.max(o,s.at+s.samples.length),0);if(a<=0)return new Float32Array(0);let r=new Float32Array(a);for(let{samples:o,at:s}of t){let i=s<0?-s:0;for(let u=i;u<o.length;u+=1){let l=s+u;l<0||l>=a||(r[l]=(r[l]??0)+(o[u]??0))}}return r}function he(e,n){let t=Math.max(e.length,d),a=e.length>=d?e:(()=>{let c=new Float32Array(d);return c.set(e),c})(),r=new Float32Array(d);for(let c=0;c<d;c++)r[c]=.5-.5*Math.cos(2*Math.PI*c/(d-1));let o=d/2+1,s=new Float64Array(o),i=new Float64Array(d),u=new Float64Array(d),l=0;for(let c=0;c+d<=t;c+=ie){u.fill(0);for(let b=0;b<d;b++)i[b]=(a[c+b]??0)*r[b];O(i,u);for(let b=0;b<o;b++)s[b]+=i[b]*i[b]+u[b]*u[b];l++}l===0&&(l=1);let f=[],h=[];for(let c=0;c<o;c++)f.push(c*n/d),h.push(s[c]/l);return{freqs:f,power:h}}function Y(e,n,t){let a=t/Math.pow(2,.16666666666666666),r=t*Math.pow(2,1/6),o=0,s=0;for(let i=0;i<e.length;i++)e[i]>=a&&e[i]<r&&(o+=n[i],s++);return s>0?o/s:0}var xe=30;function ke(e,n){let t=Math.log2(e/2e3),a=Math.exp(-(t*t)/2);return n*xe*(1-a)}function ge(e,n,t){if(e.length===0)return[];let{freqs:a,power:r}=he(e,n),s=oe.map(u=>{let l=Y(a,r,u);return{center:u,hasEnergy:l>0,scoreDb:l>0?10*Math.log10(l)-ke(u,t.intelligibilityBias):Number.NEGATIVE_INFINITY}}).sort((u,l)=>l.scoreDb-u.scoreDb).slice(0,Math.max(1,t.bands)).filter(u=>u.hasEnergy);if(s.length===0)return[];let i=s[0].scoreDb;return s.map(({center:u,scoreDb:l})=>{let f=Math.pow(10,(l-i)/10),h=Math.min(t.maxCutDb,Math.max(t.maxCutDb/2,t.maxCutDb*f));return{freq:u,gainDb:-Number(h.toFixed(2)),q:t.q}}).sort((u,l)=>u.freq-l.freq)}var K=30,X=.05,ye=.25,Ae=2.4,j=400,_=.2,J=.5;function W(e,n){let t=[{t:0,v:0}],a=0,r=-1;return e.forEach((o,s)=>{s!==e.length-1&&Math.abs(o.v-a)<n||(s>0&&r!==s-1&&t.push(e[s-1]),t.push(o),a=o.v,r=s)}),t}function we(e,n,t){if(e.length===0||t.length===0)return[];let a=new Float32Array(d);for(let m=0;m<d;m++)a[m]=.5-.5*Math.cos(2*Math.PI*m/(d-1));let r=Math.max(d,Math.ceil(e.length/j)),o=d/2+1,s=[];for(let m=0;m<o;m++)s.push(m*n/d);let i=[],u=t.map(()=>[]),l=new Float64Array(d),f=new Float64Array(d);for(let m=0;m<e.length;m+=r){f.fill(0);for(let p=0;p<d;p++)l[p]=(e[m+p]??0)*a[p];O(l,f);let x=[];for(let p=0;p<o;p++)x.push(l[p]*l[p]+f[p]*f[p]);i.push((m+d/2)/n),t.forEach((p,w)=>u[w].push(Y(s,x,p.freq)))}let h=e.length/n,c=1-Math.exp(-(r/n)/X),b=1-Math.exp(-(r/n)/ye);return t.map((m,x)=>{let p=u[x],w=Math.max(...p),g=0,P=[];p.forEach((F,k)=>{let N=F>0&&w>0?Math.max(0,1+10*Math.log10(F/w)/K):0;g+=(N>g?c:b)*(N-g);let H=m.gainDb*g,q=Math.abs(H)<_?0:Number(H.toFixed(1));P.push({t:Number(i[k].toFixed(3)),v:q})});let v=W(P,J);return v.push({t:Number(Math.max(h,v.at(-1).t).toFixed(3)),v:0}),{freq:m.freq,points:v}})}function G(e,n,t){let a=0,r=0;for(let s=n;s<n+t;s++){let i=e[s];if(i===void 0)break;a+=i*i,r+=1}if(r===0)return Number.NEGATIVE_INFINITY;let o=Math.sqrt(a/r);return o>0?20*Math.log10(o):Number.NEGATIVE_INFINITY}function ve(e,n,t,a,r){if(e.length===0||a.duckDb<=0)return[];let o=Math.max(d,Math.ceil(e.length/j)),s=Math.round(r*t),i=[],u=[],l=[];for(let k=0;k<e.length;k+=o)i.push(G(e,k,d)),u.push(G(n,k+s,d)),l.push((k+d/2)/t);let h=Math.max(...i)-K,c=1-Math.exp(-(o/t)/X),b=1-Math.exp(-(o/t)/Ae),m=0,x=[];i.forEach((k,N)=>{let H=u[N]??Number.NEGATIVE_INFINITY,q=k>h&&Number.isFinite(H)?H-(k-a.headroomDb):0,R=Math.min(a.duckDb,Math.max(0,q));m+=(R>m?c:b)*(R-m);let Q=m<_?0:-Number(m.toFixed(1));x.push({t:Number(l[N].toFixed(3)),v:Q})});let p=o/t,w=l.at(-1)??0;for(;m>=_;)m+=b*-m,w+=p,x.push({t:Number(w.toFixed(3)),v:m<_?0:-Number(m.toFixed(1))});let g=W(x,J),P=e.length/t,v=g.at(-1),F=Number(Math.max(P,v.t).toFixed(3));return v.v===0&&v.t>=F||g.push({t:F,v:0}),g}function Fe(e){let n=e.map(t=>({type:"peaking",enabled:!0,params:{...B("peaking"),frequency:t.freq,gain:t.gainDb,q:t.q}}));return{version:D,nodes:n}}export{ge as analyseCarveBands,ve as analyseCarveDuck,we as analyseCarveDynamics,Fe as carveBandsToChain,be as carveProfile,fe as classifyAudioName,ce as clipsOverlap,B as defaultAudioFxParams,ne as mintAudioFxNodeId,pe as mixCarveSources,ee as parseAudioFxChain,te as serializeAudioFxChain};
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import "../../../scripts/lib/windows-exe-search.mjs";
|
|
15
15
|
import { spawn, spawnSync } from "node:child_process";
|
|
16
16
|
import { existsSync, mkdirSync, openSync, closeSync, rmSync } from "node:fs";
|
|
17
|
+
import { homedir } from "node:os";
|
|
17
18
|
import { join } from "node:path";
|
|
18
19
|
import { downloadTo, searchSounds } from "./heygen.mjs";
|
|
19
20
|
import { agentWritePath } from "./media-record.mjs";
|
|
@@ -164,7 +165,9 @@ export function generateBgmDetached({
|
|
|
164
165
|
const script = musicgenScript({ prompt, abs, targetS, seedS });
|
|
165
166
|
const { cmd, args } = pythonInvocation(["-c", script]);
|
|
166
167
|
rmSync(abs, { force: true });
|
|
167
|
-
|
|
168
|
+
// transformers reads "facebook/musicgen-small" as a folder when one exists in the working
|
|
169
|
+
// directory, so the model is never looked up in the project.
|
|
170
|
+
const proc = spawn(cmd, args, { cwd: homedir(), detached: true, stdio: ["ignore", fd, fd] });
|
|
168
171
|
proc.unref();
|
|
169
172
|
closeSync(fd);
|
|
170
173
|
return {
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { extname, join } from "node:path";
|
|
1
|
+
import { existsSync, lstatSync } from "node:fs";
|
|
2
|
+
import { dirname, extname, join } from "node:path";
|
|
3
3
|
import { AGENT_SOURCES, latestRecordFor, recordInPlace } from "../../../scripts/lib/manifest.mjs";
|
|
4
4
|
import { regenerateIndex } from "../../../scripts/lib/index-gen.mjs";
|
|
5
|
+
import { isPlainProjectPath } from "./project-path.mjs";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
|
-
* Where the engine may write `rel`: there, unless another file of this run has `taken` it
|
|
8
|
-
* the person's (not `reusable` and not recorded as agent-made). Then the first free
|
|
8
|
+
* Where the engine may write `rel`: there, unless another file of this run has `taken` it, a link sits there, or
|
|
9
|
+
* the file there is the person's (not `reusable` and not recorded as agent-made). Then the first free
|
|
10
|
+
* `name-2.ext`, with an anomaly. Throws when `rel`'s folder is not its own real folder in the project.
|
|
9
11
|
*/
|
|
10
12
|
export function agentWritePath(
|
|
11
13
|
hyperframesDir,
|
|
12
14
|
rel,
|
|
13
15
|
{ anomalies, taken = new Set(), reusable = () => false },
|
|
14
16
|
) {
|
|
17
|
+
if (!isPlainProjectPath(hyperframesDir, dirname(rel))) {
|
|
18
|
+
throw new Error(`${dirname(rel)} leads outside the project folder; nothing was written there`);
|
|
19
|
+
}
|
|
15
20
|
const free = (path) =>
|
|
16
21
|
!taken.has(path) &&
|
|
22
|
+
!lstatSync(join(hyperframesDir, path), { throwIfNoEntry: false })?.isSymbolicLink() &&
|
|
17
23
|
(!existsSync(join(hyperframesDir, path)) ||
|
|
18
24
|
reusable(path) ||
|
|
19
25
|
AGENT_SOURCES.includes(latestRecordFor(hyperframesDir, path)?.source));
|
|
@@ -31,14 +37,26 @@ export function agentWritePath(
|
|
|
31
37
|
return path;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
// A line id names its voice file, so it must be one plain file name: no folder, drive or `..`.
|
|
41
|
+
const isPlainFileName = (id) => id !== "" && id !== "." && id !== ".." && !/[/\\:]/.test(id);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Each spoken line's file, picked before lines synthesize concurrently so two never land on one free name.
|
|
45
|
+
* Throws for a line whose id is not a plain file name.
|
|
46
|
+
*/
|
|
35
47
|
export function voicePaths(hyperframesDir, lines, anomalies) {
|
|
36
48
|
const taken = new Set();
|
|
37
49
|
const paths = new Map();
|
|
38
50
|
for (const line of lines.filter((l) => String(l.text ?? "").trim() || l.audio)) {
|
|
39
|
-
const
|
|
51
|
+
const id = String(line.id);
|
|
52
|
+
if (!isPlainFileName(id)) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
`line id ${JSON.stringify(id)} names its voice file, so it must be a plain name: no "/", "\\" or ":", and not empty, "." or ".."`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const rel = agentWritePath(hyperframesDir, `assets/voice/${id}.wav`, { anomalies, taken });
|
|
40
58
|
taken.add(rel);
|
|
41
|
-
paths.set(
|
|
59
|
+
paths.set(id, rel);
|
|
42
60
|
}
|
|
43
61
|
return paths;
|
|
44
62
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Paths taken from project files (audio_request.json, audio_meta.json), resolved the way the
|
|
2
|
+
// filesystem will: through every link, so a name inside the project cannot lead outside it.
|
|
3
|
+
import { lstatSync, realpathSync } from "node:fs";
|
|
4
|
+
import { basename, dirname, isAbsolute, join, resolve, sep, win32 } from "node:path";
|
|
5
|
+
|
|
6
|
+
// Where `abs` lands: its nearest existing part resolved through links, plus the parts not made
|
|
7
|
+
// yet. Null when a link on the way leads nowhere.
|
|
8
|
+
function realLocation(abs) {
|
|
9
|
+
const missing = [];
|
|
10
|
+
let at = abs;
|
|
11
|
+
while (!lstatSync(at, { throwIfNoEntry: false })) {
|
|
12
|
+
missing.unshift(basename(at));
|
|
13
|
+
at = dirname(at);
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
return join(realpathSync(at), ...missing);
|
|
17
|
+
} catch {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const within = (dir, path) => path === dir || path.startsWith(dir + sep);
|
|
23
|
+
|
|
24
|
+
/** `rel` (relative to the project) where it really lands, or null when it is absolute or lands outside the project. */
|
|
25
|
+
export function projectPath(hyperframesDir, rel) {
|
|
26
|
+
if (typeof rel !== "string" || isAbsolute(rel) || win32.isAbsolute(rel)) return null;
|
|
27
|
+
const root = realpathSync(hyperframesDir);
|
|
28
|
+
const real = realLocation(resolve(root, rel));
|
|
29
|
+
return real && within(root, real) ? real : null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** True when `rel` reaches its own place in the project with no link on the way. */
|
|
33
|
+
export function isPlainProjectPath(hyperframesDir, rel) {
|
|
34
|
+
return projectPath(hyperframesDir, rel) === join(realpathSync(hyperframesDir), rel);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const BGM_LOG_NAME = /^bgm-\d+\.log$/;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The detached BGM renderer's log named by `value` (audio_meta.json `bgm_log`), or null. Only a
|
|
41
|
+
* regular file directly in <project>/assets/bgm named bgm-<digits>.log counts: the engine writes
|
|
42
|
+
* its logs there and nowhere else.
|
|
43
|
+
*/
|
|
44
|
+
export function engineBgmLog(hyperframesDir, value) {
|
|
45
|
+
if (typeof value !== "string" || !BGM_LOG_NAME.test(basename(value))) return null;
|
|
46
|
+
const bgmDir = join("assets", "bgm");
|
|
47
|
+
if (!isPlainProjectPath(hyperframesDir, bgmDir)) return null;
|
|
48
|
+
const abs = resolve(hyperframesDir, value);
|
|
49
|
+
if (!lstatSync(abs, { throwIfNoEntry: false })?.isFile()) return null;
|
|
50
|
+
const expected = join(realpathSync(hyperframesDir), bgmDir, basename(value));
|
|
51
|
+
try {
|
|
52
|
+
return realpathSync(abs) === expected ? expected : null;
|
|
53
|
+
} catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import "../../../scripts/lib/windows-exe-search.mjs";
|
|
19
19
|
import { spawnSync } from "node:child_process";
|
|
20
|
+
import { resolve } from "node:path";
|
|
20
21
|
|
|
21
22
|
// Accept only an interpreter whose `--version` reports Python 3, as the CLI's
|
|
22
23
|
// `validatePythonOverride()` does. Exit status alone would take a Python 2
|
|
@@ -45,7 +46,9 @@ export function resolvePythonCommand(
|
|
|
45
46
|
probe = defaultProbe,
|
|
46
47
|
env = process.env,
|
|
47
48
|
) {
|
|
48
|
-
|
|
49
|
+
// A path with a folder in it means the caller's folder, so it still names the same file when a
|
|
50
|
+
// child runs elsewhere, as MusicGen does; a bare name keeps its PATH lookup.
|
|
51
|
+
const override = env.HYPERFRAMES_PYTHON && withFolder(env.HYPERFRAMES_PYTHON);
|
|
49
52
|
if (override && probe(override, ["--version"])) return [override];
|
|
50
53
|
const candidates =
|
|
51
54
|
platform === "win32" ? [["python3"], ["python"], ["py", "-3"]] : [["python3"], ["python"]];
|
|
@@ -55,6 +58,11 @@ export function resolvePythonCommand(
|
|
|
55
58
|
return candidates[0];
|
|
56
59
|
}
|
|
57
60
|
|
|
61
|
+
/** `value` made absolute against the working folder when it names a folder, as is otherwise. */
|
|
62
|
+
function withFolder(value) {
|
|
63
|
+
return /[\\/]/.test(value) ? resolve(value) : value;
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
let cached = null;
|
|
59
67
|
|
|
60
68
|
/** Cached `resolvePythonCommand()` — probing spawns, so resolve at most once. */
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// time-stretched by `speed` with the pitch kept, with word timings scaled to match.
|
|
3
3
|
import "../../../scripts/lib/windows-exe-search.mjs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
|
-
import { existsSync, mkdirSync } from "node:fs";
|
|
5
|
+
import { existsSync, mkdirSync, statSync } from "node:fs";
|
|
6
6
|
import { dirname } from "node:path";
|
|
7
|
+
import { projectPath } from "./project-path.mjs";
|
|
7
8
|
|
|
8
9
|
// ffmpeg's atempo takes 0.5..2 per stage; chain stages for the rest of the 0.1..3 speed range.
|
|
9
10
|
export function atempoChain(speed) {
|
|
@@ -21,14 +22,76 @@ export function atempoChain(speed) {
|
|
|
21
22
|
return stages.map((s) => `atempo=${Number(s.toFixed(6))}`).join(",");
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
/** The recording a request line names, as a path inside the project. Throws when it is absolute or leads outside. */
|
|
26
|
+
export function recordingSource(hyperframesDir, audio) {
|
|
27
|
+
const src = projectPath(hyperframesDir, String(audio));
|
|
28
|
+
if (src) return src;
|
|
29
|
+
throw new Error(
|
|
30
|
+
`recording ${JSON.stringify(String(audio))} is outside the project folder; copy it into the project and give its path there`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Formats whose file is a list, playlist or script naming other media or programs, which ffmpeg would then
|
|
35
|
+
// open. A recording must be the audio itself, so these are refused.
|
|
36
|
+
const INDIRECT_FORMATS = new Set([
|
|
37
|
+
"hls",
|
|
38
|
+
"applehttp",
|
|
39
|
+
"concat",
|
|
40
|
+
"dash",
|
|
41
|
+
"webm_dash_manifest",
|
|
42
|
+
"imf",
|
|
43
|
+
"sdp",
|
|
44
|
+
"rtp",
|
|
45
|
+
"rtsp",
|
|
46
|
+
"ffmetadata",
|
|
47
|
+
"image2",
|
|
48
|
+
"avisynth",
|
|
49
|
+
"vapoursynth",
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
// The demuxer name for src, such as "mp3" or "mov,mp4,m4a,3gp,3g2,mj2"; null when it cannot tell. Some
|
|
53
|
+
// Windows installs ship ffmpeg without ffprobe, so ffmpeg's input banner is the fallback.
|
|
54
|
+
function probeFormat(src) {
|
|
55
|
+
const r = spawnSync(
|
|
56
|
+
"ffprobe",
|
|
57
|
+
["-v", "error", "-protocol_whitelist", "file", "-show_entries", "format=format_name"].concat([
|
|
58
|
+
"-of",
|
|
59
|
+
"default=nw=1:nk=1",
|
|
60
|
+
"--",
|
|
61
|
+
src,
|
|
62
|
+
]),
|
|
63
|
+
{ encoding: "utf8" },
|
|
64
|
+
);
|
|
65
|
+
if (r.error?.code === "ENOENT") {
|
|
66
|
+
const banner = spawnSync("ffmpeg", ["-hide_banner", "-protocol_whitelist", "file", "-i", src], {
|
|
67
|
+
encoding: "utf8",
|
|
68
|
+
});
|
|
69
|
+
return /^Input #0, (.+?), from /m.exec(banner.stderr ?? "")?.[1] ?? null;
|
|
70
|
+
}
|
|
71
|
+
const name = r.status === 0 ? String(r.stdout).trim() : "";
|
|
72
|
+
return name || null;
|
|
73
|
+
}
|
|
74
|
+
|
|
24
75
|
/** src -> 44.1k mono wav at wavAbs, played `speed` times faster. Returns { ok, error? }. */
|
|
25
76
|
export function stretchToWav(src, wavAbs, speed = 1) {
|
|
26
|
-
|
|
77
|
+
const stat = statSync(src, { throwIfNoEntry: false });
|
|
78
|
+
if (!stat) return { ok: false, error: `recording not found: ${src}` };
|
|
79
|
+
if (!stat.isFile()) return { ok: false, error: `recording is not a file: ${src}` };
|
|
80
|
+
const format = probeFormat(src);
|
|
81
|
+
if (!format) return { ok: false, error: `ffmpeg cannot read ${src} as audio` };
|
|
82
|
+
if (format.split(",").some((name) => INDIRECT_FORMATS.has(name))) {
|
|
83
|
+
return {
|
|
84
|
+
ok: false,
|
|
85
|
+
error: `${src} is a ${format} list that points at other files; give the audio file itself`,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
27
88
|
mkdirSync(dirname(wavAbs), { recursive: true });
|
|
28
89
|
const filter = speed === 1 ? [] : ["-af", atempoChain(speed)];
|
|
90
|
+
// The probed format pins the input: ffmpeg opens only that one local file, with no nested inputs.
|
|
91
|
+
const input = ["-format_whitelist", format, "-protocol_whitelist", "file", "-i", src];
|
|
29
92
|
const r = spawnSync(
|
|
30
93
|
"ffmpeg",
|
|
31
|
-
["-y", "-loglevel", "error",
|
|
94
|
+
["-y", "-loglevel", "error", ...input, ...filter, "-ar", "44100", "-ac", "1", wavAbs],
|
|
32
95
|
{ encoding: "utf8" },
|
|
33
96
|
);
|
|
34
97
|
if (r.error || r.status !== 0 || !existsSync(wavAbs)) {
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
// node wait-bgm.mjs --audio-meta ./audio_meta.json --hyperframes . \
|
|
14
14
|
// [--timeout-ms 120000] [--interval-ms 2000] [--out ./bgm_status.json]
|
|
15
15
|
|
|
16
|
-
import { existsSync, readFileSync, statSync
|
|
16
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
17
17
|
import { join, resolve } from "node:path";
|
|
18
|
+
import { replaceFile } from "../../scripts/lib/manifest.mjs";
|
|
18
19
|
import { recordInManifest } from "./lib/media-record.mjs";
|
|
20
|
+
import { engineBgmLog, projectPath } from "./lib/project-path.mjs";
|
|
19
21
|
|
|
20
22
|
const argv = process.argv.slice(2);
|
|
21
23
|
const flag = (name, def) => {
|
|
@@ -80,17 +82,20 @@ function writeStatus(status) {
|
|
|
80
82
|
generated_at: new Date().toISOString(),
|
|
81
83
|
...status,
|
|
82
84
|
};
|
|
83
|
-
|
|
85
|
+
// Renamed into place, so a link planted at the status file is replaced, never written through.
|
|
86
|
+
replaceFile(outPath, JSON.stringify(payload, null, 2) + "\n");
|
|
84
87
|
return payload;
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
if (!existsSync(audioMetaPath)) die(`audio_meta.json missing at ${audioMetaPath}`);
|
|
88
91
|
|
|
89
92
|
const audioMeta = JSON.parse(readFileSync(audioMetaPath, "utf8"));
|
|
90
|
-
|
|
91
|
-
const bgmAbsPath =
|
|
92
|
-
const
|
|
93
|
-
|
|
93
|
+
// A track path that leads outside the project counts as no track.
|
|
94
|
+
const bgmAbsPath = (audioMeta.bgm?.path && projectPath(hyperframesDir, audioMeta.bgm.path)) || "";
|
|
95
|
+
const bgmPath = bgmAbsPath ? audioMeta.bgm.path : "";
|
|
96
|
+
// Only the engine's own log in assets/bgm is read; any other bgm_log counts as no log, and its pid goes with it.
|
|
97
|
+
const logPath = engineBgmLog(hyperframesDir, audioMeta.bgm_log) || "";
|
|
98
|
+
const pid = (logPath && audioMeta.bgm_pid) || null;
|
|
94
99
|
|
|
95
100
|
const base = {
|
|
96
101
|
enabled: Boolean(audioMeta.bgm_pending && bgmPath),
|
|
@@ -153,7 +158,7 @@ while (Date.now() - started <= timeoutMs) {
|
|
|
153
158
|
waited_ms: Date.now() - started,
|
|
154
159
|
process_alive: alive,
|
|
155
160
|
message,
|
|
156
|
-
error_tail: lastFailure || lastTail.slice(-2000),
|
|
161
|
+
error_tail: (lastFailure || lastTail).slice(-2000),
|
|
157
162
|
});
|
|
158
163
|
console.log(`! bgm: failed (${status.message})`);
|
|
159
164
|
process.exit(0);
|
|
@@ -11,8 +11,8 @@ node <SKILL_DIR>/audio/scripts/audio.mjs --request ./audio_request.json --out ./
|
|
|
11
11
|
|
|
12
12
|
Kokoro voices and word timings by transcription run the HyperFrames CLI. Helpers never look it up in the project: run them through the plugin launcher's `--script`, or set `HYPERFRAMES_CLI_ENTRY` to the absolute path of your installed CLI's `bin/hyperframes.mjs`. Without one, those steps stop and say so.
|
|
13
13
|
|
|
14
|
-
- **Request** `{ provider?, voice?, lang?, speed?, tts_model?, style?, lines: [{ id, text, style?, sfx?: [names] }], bgm: { mode?, query?, prompt? } }`: `id` joins each line back to your model
|
|
15
|
-
- **Your own recording**: a line with `audio` (a path
|
|
14
|
+
- **Request** `{ provider?, voice?, lang?, speed?, tts_model?, style?, lines: [{ id, text, style?, sfx?: [names] }], bgm: { mode?, query?, prompt? } }`: `id` joins each line back to your model and names its voice file `assets/voice/<id>.wav`, so it is a plain file name: no `/`, `\` or `:`, and not empty, `.` or `..`; `bgm.mode` = `retrieve | generate | none` (omit for auto). `--only tts,bgm,sfx` runs a subset and merges into an existing `--out`.
|
|
15
|
+
- **Your own recording**: a line with `audio` (a path inside the project folder; copy a recording from elsewhere into the project first) instead of `text` is used as the voice: `{ id, audio: "take.m4a", words?: [{ text, start, end }] }`. It is converted to `assets/voice/<id>.wav`, `speed` stretches it with the pitch kept and scales `words` the same (without `words` the recording is transcribed). Its `audio_meta.json` voice has `source: "recording"`; with only recording lines `tts_provider` is `"recording"` and no provider or HeyGen sign-in is needed.
|
|
16
16
|
- **Gemini narration** is opt-in with `provider: "gemini"` and an API key or service-account credentials. `tts_model` defaults to `gemini-3.8-flash-tts`; 3.8 Flash-Lite, 3.1 Flash Preview, and 2.5 Pro/Flash Preview TTS are also supported. `style` directs delivery; a line's style overrides the request's style. CLI overrides: `--tts-model`, `--style`. See `audio/references/tts.md` for a complete request. The existing automatic provider order is unchanged.
|
|
17
17
|
- **Output** `audio_meta.json` (id-keyed): `voice_credit` (the credits line for the voices, naming where they really came from: your recording or the vendor; use it as is), `voices[].{path,duration_s,words[]}` (word timestamps for captions), `sfx[]`, `bgm`, `total_duration_s`.
|
|
18
18
|
- **HeyGen free-usage path**: HeyGen CLI auth unlocks TTS plus music retrieval; SFX come from Openverse with no account (`audio/references/sfx.md`). Local/provider-specific generators are explicit alternatives where installed; run `npx hyperframes media-use resolve --doctor` before assuming retrieval or TTS will work.
|
|
@@ -65,7 +65,7 @@ A crossfade is two clips on different tracks that overlap, each with a fade.
|
|
|
65
65
|
|
|
66
66
|
## Music under a voice
|
|
67
67
|
|
|
68
|
-
Duck the bed with a `volume` lane on the music: full level before the voice, down to about 0.3–0.4 while anyone speaks (word timings from `npx hyperframes transcribe` or the voiceover give the times), back up after. Then carve the bed, which dips only the bands the voice uses: `node <SKILL_DIR>/audio/scripts/carve.mjs --comp index.html` (needs `ffmpeg
|
|
68
|
+
Duck the bed with a `volume` lane on the music: full level before the voice, down to about 0.3–0.4 while anyone speaks (word timings from `npx hyperframes transcribe` or the voiceover give the times), back up after. Then carve the bed, which dips only the bands the voice uses: `node <SKILL_DIR>/audio/scripts/carve.mjs --comp index.html` (needs `ffmpeg`; `--dry-run` to see the plan). It is the same analysis as Studio's carve panel. It reads only double-quoted attributes (JSON quotes as `"`), so write the bed's chain and lanes that way or it overwrites them. Never put a carve on a voice track.
|
|
69
69
|
|
|
70
70
|
## Group buses
|
|
71
71
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { extname, join } from "node:path";
|
|
1
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
2
|
+
import { extname, isAbsolute, join, relative } from "node:path";
|
|
3
3
|
import { rankMediaRows } from "./media-search.mjs";
|
|
4
4
|
|
|
5
5
|
const LIB_DIR =
|
|
@@ -80,6 +80,31 @@ export function extensionForBundledSfxFile(filename) {
|
|
|
80
80
|
return extname(filename) || ".mp3";
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
const INDEX_FILE_PREFIX = "skills/media-use/audio/assets/sfx/";
|
|
84
|
+
const AUDIO_FILE_NAME =
|
|
85
|
+
/^[A-Za-z0-9][A-Za-z0-9_-]*(?:\.[A-Za-z0-9_-]+)*\.(?:mp3|wav|ogg|m4a|aac|flac)$/i;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Map a media index row's `file` to an audio file inside the bundled SFX folder, or null.
|
|
89
|
+
* The only accepted form is `skills/media-use/audio/assets/sfx/<name>` with a plain audio
|
|
90
|
+
* file name; the result must still be a regular file inside the folder after realpath.
|
|
91
|
+
*/
|
|
92
|
+
export function bundledSfxAssetPath(file, libraryDir = LIB_DIR) {
|
|
93
|
+
if (typeof file !== "string" || !file.startsWith(INDEX_FILE_PREFIX)) return null;
|
|
94
|
+
const name = file.slice(INDEX_FILE_PREFIX.length);
|
|
95
|
+
if (!AUDIO_FILE_NAME.test(name)) return null;
|
|
96
|
+
try {
|
|
97
|
+
const root = realpathSync(libraryDir);
|
|
98
|
+
const asset = realpathSync(join(root, name));
|
|
99
|
+
const inside = relative(root, asset);
|
|
100
|
+
if (!inside || inside.startsWith("..") || isAbsolute(inside)) return null;
|
|
101
|
+
if (!AUDIO_FILE_NAME.test(inside) || !statSync(asset).isFile()) return null;
|
|
102
|
+
return asset;
|
|
103
|
+
} catch {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
83
108
|
export const bundledSfxProvider = {
|
|
84
109
|
async search(intent, ctx = {}) {
|
|
85
110
|
const libraryDir = ctx.libraryDir || LIB_DIR;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { currentRecords, indexPath, ownMediaDir, replaceFile } from "./manifest.mjs";
|
|
2
|
+
|
|
3
|
+
// One table cell: a line break in a record would start a new line of the index, so it becomes a space.
|
|
4
|
+
function cell(value) {
|
|
5
|
+
return String(value ?? "").replace(/\s*[\r\n]+\s*/g, " ");
|
|
6
|
+
}
|
|
4
7
|
|
|
5
8
|
function pad(str, len) {
|
|
6
|
-
return
|
|
9
|
+
return cell(str).padEnd(len);
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
function formatDur(record) {
|
|
@@ -24,11 +27,11 @@ export function generateIndexContent(records) {
|
|
|
24
27
|
|
|
25
28
|
const cols = { id: 4, type: 5, dur: 4, dims: 5, path: 5, desc: 11 };
|
|
26
29
|
for (const r of records) {
|
|
27
|
-
cols.id = Math.max(cols.id, (r.id
|
|
28
|
-
cols.type = Math.max(cols.type, (r.type
|
|
30
|
+
cols.id = Math.max(cols.id, cell(r.id).length);
|
|
31
|
+
cols.type = Math.max(cols.type, cell(r.type).length);
|
|
29
32
|
cols.dur = Math.max(cols.dur, formatDur(r).length);
|
|
30
33
|
cols.dims = Math.max(cols.dims, formatDims(r).length);
|
|
31
|
-
cols.path = Math.max(cols.path, (r.path
|
|
34
|
+
cols.path = Math.max(cols.path, cell(r.path).length);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
const heading =
|
|
@@ -47,7 +50,7 @@ export function generateIndexContent(records) {
|
|
|
47
50
|
pad(formatDur(r), cols.dur + 2) +
|
|
48
51
|
pad(formatDims(r), cols.dims + 2) +
|
|
49
52
|
pad(r.path, cols.path + 2) +
|
|
50
|
-
(r.description
|
|
53
|
+
cell(r.description),
|
|
51
54
|
);
|
|
52
55
|
}
|
|
53
56
|
return lines.join("\n") + "\n";
|
|
@@ -56,8 +59,7 @@ export function generateIndexContent(records) {
|
|
|
56
59
|
export function regenerateIndex(projectDir) {
|
|
57
60
|
const records = currentRecords(projectDir);
|
|
58
61
|
const content = generateIndexContent(records);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
writeFileSync(p, content);
|
|
62
|
+
ownMediaDir(projectDir);
|
|
63
|
+
replaceFile(indexPath(projectDir), content);
|
|
62
64
|
return content;
|
|
63
65
|
}
|