voxflow 1.15.0 → 1.15.2
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/README.md +34 -0
- package/bin/voxflow.js +27 -0
- package/dist/index.js +1 -1
- package/dist/remotion-bundle/02a2fb2eb80bc7bf.woff2 +0 -0
- package/dist/remotion-bundle/052ca5351e5e06ba.woff2 +0 -0
- package/dist/remotion-bundle/05853dd28f4019cb.woff2 +0 -0
- package/dist/remotion-bundle/072ead3737f7c0d0.woff2 +0 -0
- package/dist/remotion-bundle/07d4248613c86a2e.woff2 +0 -0
- package/dist/remotion-bundle/0884a5c2d1d2d99b.woff2 +0 -0
- package/dist/remotion-bundle/0b0e185b2752095e.woff2 +0 -0
- package/dist/remotion-bundle/0e66c11bde067d91.woff2 +0 -0
- package/dist/remotion-bundle/0f7794cfba2c5d21.woff2 +0 -0
- package/dist/remotion-bundle/0fdbae5a4365783a.woff2 +0 -0
- package/dist/remotion-bundle/112.bundle.js +11 -0
- package/dist/remotion-bundle/112.bundle.js.map +1 -0
- package/dist/remotion-bundle/113.bundle.js +11 -0
- package/dist/remotion-bundle/113.bundle.js.map +1 -0
- package/dist/remotion-bundle/119cae0c4c16f7ed.woff2 +0 -0
- package/dist/remotion-bundle/14725f649fd1e78c.woff2 +0 -0
- package/dist/remotion-bundle/14abe9e3f95f7888.woff2 +0 -0
- package/dist/remotion-bundle/163.bundle.js +14678 -0
- package/dist/remotion-bundle/163.bundle.js.map +1 -0
- package/dist/remotion-bundle/1808c54072bf6d14.woff2 +0 -0
- package/dist/remotion-bundle/18948bec3e3012fe.woff2 +0 -0
- package/dist/remotion-bundle/1a661c60d0fc84fc.woff2 +0 -0
- package/dist/remotion-bundle/1af94941e1bc7e1e.woff2 +0 -0
- package/dist/remotion-bundle/1bee0219595f606c.woff2 +0 -0
- package/dist/remotion-bundle/1bfd5da7ce9d4ec4.woff2 +0 -0
- package/dist/remotion-bundle/1c158d56f1884f3f.woff2 +0 -0
- package/dist/remotion-bundle/1cf5e88e667610eb.woff2 +0 -0
- package/dist/remotion-bundle/1d431bd10f53c481.woff2 +0 -0
- package/dist/remotion-bundle/1d701a81a7670db2.woff2 +0 -0
- package/dist/remotion-bundle/1da0fecad4240f16.woff2 +0 -0
- package/dist/remotion-bundle/1ed14d3d0c5c63fe.woff2 +0 -0
- package/dist/remotion-bundle/1edfecf40e586f53.woff2 +0 -0
- package/dist/remotion-bundle/1f479711bc34b054.woff +0 -0
- package/dist/remotion-bundle/1f86e54a0ff5fcd1.woff2 +0 -0
- package/dist/remotion-bundle/2043ea87d9aabd11.woff2 +0 -0
- package/dist/remotion-bundle/20563c39ee8a0e40.woff2 +0 -0
- package/dist/remotion-bundle/20c231590fd12c44.woff2 +0 -0
- package/dist/remotion-bundle/20ce61713f754c07.woff2 +0 -0
- package/dist/remotion-bundle/21eb9306fce24bb1.woff2 +0 -0
- package/dist/remotion-bundle/244bf71c0cc851af.woff2 +0 -0
- package/dist/remotion-bundle/274d4cfc02bffbcb.woff2 +0 -0
- package/dist/remotion-bundle/275.bundle.js +21 -0
- package/dist/remotion-bundle/275.bundle.js.map +1 -0
- package/dist/remotion-bundle/2958f540b39513dc.woff2 +0 -0
- package/dist/remotion-bundle/2a168b98fd97722e.woff2 +0 -0
- package/dist/remotion-bundle/2d1f6373937ab55f.woff2 +0 -0
- package/dist/remotion-bundle/2d213ae47ff6daa9.woff2 +0 -0
- package/dist/remotion-bundle/2e4b1f04fcd05047.woff2 +0 -0
- package/dist/remotion-bundle/304170d98f4c4563.woff2 +0 -0
- package/dist/remotion-bundle/30d02e136e7a5642.woff2 +0 -0
- package/dist/remotion-bundle/3135562b52a714cd.woff2 +0 -0
- package/dist/remotion-bundle/313713af2c8144e9.woff2 +0 -0
- package/dist/remotion-bundle/325fa4108d2285b9.woff2 +0 -0
- package/dist/remotion-bundle/338e927ed3345e0c.woff2 +0 -0
- package/dist/remotion-bundle/35fc6b190365bc17.woff2 +0 -0
- package/dist/remotion-bundle/37a51f1122d4efc5.woff2 +0 -0
- package/dist/remotion-bundle/39a4d63e02736f5e.woff2 +0 -0
- package/dist/remotion-bundle/3a00e0d62dfc4171.woff2 +0 -0
- package/dist/remotion-bundle/3a6955e6561affe1.woff2 +0 -0
- package/dist/remotion-bundle/3c573945aef49b89.woff2 +0 -0
- package/dist/remotion-bundle/3cdbfbfa23b516a5.woff2 +0 -0
- package/dist/remotion-bundle/3e42f85a9e64ca8a.woff2 +0 -0
- package/dist/remotion-bundle/3e83eaf1ec859415.woff2 +0 -0
- package/dist/remotion-bundle/3f3c8c90de1250ee.woff2 +0 -0
- package/dist/remotion-bundle/434.bundle.js +205 -0
- package/dist/remotion-bundle/434.bundle.js.map +1 -0
- package/dist/remotion-bundle/44ffc6ca4d781692.woff2 +0 -0
- package/dist/remotion-bundle/4670d9c4580b09eb.woff2 +0 -0
- package/dist/remotion-bundle/479756881b302824.woff2 +0 -0
- package/dist/remotion-bundle/481b82134bfa9c82.woff2 +0 -0
- package/dist/remotion-bundle/48d27029626f4328.woff2 +0 -0
- package/dist/remotion-bundle/49b7b2a30329c511.woff2 +0 -0
- package/dist/remotion-bundle/4c8b25a1a9337045.woff2 +0 -0
- package/dist/remotion-bundle/4cba14788ca9259b.woff2 +0 -0
- package/dist/remotion-bundle/4cd6c589c004a6a7.woff2 +0 -0
- package/dist/remotion-bundle/4cd8d79c1021608d.woff2 +0 -0
- package/dist/remotion-bundle/4d8fa99b3f00f9f0.woff2 +0 -0
- package/dist/remotion-bundle/4e7805a643f86d53.woff2 +0 -0
- package/dist/remotion-bundle/4ff91be454542e3f.woff2 +0 -0
- package/dist/remotion-bundle/504cbcba1f63591b.woff2 +0 -0
- package/dist/remotion-bundle/5202d792e5791d6c.woff2 +0 -0
- package/dist/remotion-bundle/534db5ad4770cc1d.woff2 +0 -0
- package/dist/remotion-bundle/53b9568eb85f866b.woff2 +0 -0
- package/dist/remotion-bundle/543ad386ca171de9.woff2 +0 -0
- package/dist/remotion-bundle/54798e55bbf7976e.woff2 +0 -0
- package/dist/remotion-bundle/580.bundle.js +11 -0
- package/dist/remotion-bundle/580.bundle.js.map +1 -0
- package/dist/remotion-bundle/58d174d1193af6d1.woff2 +0 -0
- package/dist/remotion-bundle/591d29ff3ff53c80.woff2 +0 -0
- package/dist/remotion-bundle/5c28c4f4824383c6.woff2 +0 -0
- package/dist/remotion-bundle/5da9740d2ce894c8.woff2 +0 -0
- package/dist/remotion-bundle/6197735364642360.woff2 +0 -0
- package/dist/remotion-bundle/6265a4335724080f.woff2 +0 -0
- package/dist/remotion-bundle/633f5e4f6394daa7.woff2 +0 -0
- package/dist/remotion-bundle/637d95ace6a69c49.woff2 +0 -0
- package/dist/remotion-bundle/648e04a04dacff8f.woff2 +0 -0
- package/dist/remotion-bundle/64a6e83045a008b2.woff2 +0 -0
- package/dist/remotion-bundle/651.bundle.js +11 -0
- package/dist/remotion-bundle/651.bundle.js.map +1 -0
- package/dist/remotion-bundle/65e2a988c070facc.woff2 +0 -0
- package/dist/remotion-bundle/66a2f6ce5cc69105.woff2 +0 -0
- package/dist/remotion-bundle/690.bundle.js +3479 -0
- package/dist/remotion-bundle/690.bundle.js.map +1 -0
- package/dist/remotion-bundle/690ff55252ca715d.woff2 +0 -0
- package/dist/remotion-bundle/6a01a1cff49314fc.woff2 +0 -0
- package/dist/remotion-bundle/6cbc32670982986c.woff2 +0 -0
- package/dist/remotion-bundle/6d3cc42ae547f454.woff2 +0 -0
- package/dist/remotion-bundle/6d8f4cfa1ddc0830.woff2 +0 -0
- package/dist/remotion-bundle/6e4d7c6ae65e2dc3.woff2 +0 -0
- package/dist/remotion-bundle/6e86418bbcefb2e8.woff2 +0 -0
- package/dist/remotion-bundle/6ee02884b29cf7fb.woff2 +0 -0
- package/dist/remotion-bundle/6f436a74c9e3252c.woff2 +0 -0
- package/dist/remotion-bundle/78c8022f1657618b.woff2 +0 -0
- package/dist/remotion-bundle/7c5444169792bca4.woff2 +0 -0
- package/dist/remotion-bundle/7c86bddd9d997212.woff2 +0 -0
- package/dist/remotion-bundle/7e1284684767f584.woff2 +0 -0
- package/dist/remotion-bundle/7e81c17522d182b2.woff2 +0 -0
- package/dist/remotion-bundle/7eb87be198f7858c.woff2 +0 -0
- package/dist/remotion-bundle/8060c928f948aab5.woff2 +0 -0
- package/dist/remotion-bundle/80bc9dfbea2b35ae.woff2 +0 -0
- package/dist/remotion-bundle/811b83f69963bb48.woff2 +0 -0
- package/dist/remotion-bundle/813.bundle.js +117511 -0
- package/dist/remotion-bundle/813.bundle.js.map +1 -0
- package/dist/remotion-bundle/84df492e349f82e9.woff2 +0 -0
- package/dist/remotion-bundle/8501bfd73eb36f2b.woff2 +0 -0
- package/dist/remotion-bundle/854236a8376093fe.woff2 +0 -0
- package/dist/remotion-bundle/8571d74529082753.woff2 +0 -0
- package/dist/remotion-bundle/860bf44f8e6f4b5d.woff2 +0 -0
- package/dist/remotion-bundle/879.bundle.js +64 -0
- package/dist/remotion-bundle/879.bundle.js.map +1 -0
- package/dist/remotion-bundle/887dd482f848d56f.woff2 +0 -0
- package/dist/remotion-bundle/89b2132e85fbbb5a.woff2 +0 -0
- package/dist/remotion-bundle/8ba60d6c306010c2.woff2 +0 -0
- package/dist/remotion-bundle/8c7c4dadea897806.woff2 +0 -0
- package/dist/remotion-bundle/8c943f9999706f61.woff2 +0 -0
- package/dist/remotion-bundle/8f2a718c90575cc9.woff2 +0 -0
- package/dist/remotion-bundle/906b6edb3e1772c9.woff2 +0 -0
- package/dist/remotion-bundle/930ff9daccdf14eb.woff2 +0 -0
- package/dist/remotion-bundle/934db2f1c403c4d0.woff2 +0 -0
- package/dist/remotion-bundle/938.bundle.js +451 -0
- package/dist/remotion-bundle/938.bundle.js.map +1 -0
- package/dist/remotion-bundle/967.bundle.js +4462 -0
- package/dist/remotion-bundle/967.bundle.js.map +1 -0
- package/dist/remotion-bundle/9684a1093d3c02ce.woff2 +0 -0
- package/dist/remotion-bundle/973dcd0faa6116cc.woff2 +0 -0
- package/dist/remotion-bundle/9745400694e76cd8.woff2 +0 -0
- package/dist/remotion-bundle/999ef957bed3bdca.woff2 +0 -0
- package/dist/remotion-bundle/99a3d67c8b0f43e3.woff2 +0 -0
- package/dist/remotion-bundle/a0586c3e03127283.woff2 +0 -0
- package/dist/remotion-bundle/a0eb654fdae46269.woff2 +0 -0
- package/dist/remotion-bundle/a20e35d3b08f7994.woff2 +0 -0
- package/dist/remotion-bundle/a2dcaced7c8c25ab.woff2 +0 -0
- package/dist/remotion-bundle/a79255a972a2681a.woff2 +0 -0
- package/dist/remotion-bundle/a804b352cb9fec1a.woff2 +0 -0
- package/dist/remotion-bundle/aae7117164e1eabc.woff2 +0 -0
- package/dist/remotion-bundle/affd121385d0442d.woff2 +0 -0
- package/dist/remotion-bundle/b19a6083987ee0d7.woff2 +0 -0
- package/dist/remotion-bundle/b1b2bd04d8637981.woff2 +0 -0
- package/dist/remotion-bundle/b2c07f341486be87.woff2 +0 -0
- package/dist/remotion-bundle/b33d8f82e575c4ce.woff2 +0 -0
- package/dist/remotion-bundle/b366c0bed35ef491.woff2 +0 -0
- package/dist/remotion-bundle/b41e857ec1b85642.woff2 +0 -0
- package/dist/remotion-bundle/b420bb34ccf23e7f.woff2 +0 -0
- package/dist/remotion-bundle/b4f7bf4efb0c0ccf.woff2 +0 -0
- package/dist/remotion-bundle/b60fe5eca03cff93.woff2 +0 -0
- package/dist/remotion-bundle/b6bd31a336e64bce.woff2 +0 -0
- package/dist/remotion-bundle/b6d2befba3dfefeb.woff2 +0 -0
- package/dist/remotion-bundle/b75f39ab06c43bf4.woff2 +0 -0
- package/dist/remotion-bundle/b77880e8c413d4fd.woff2 +0 -0
- package/dist/remotion-bundle/b7e38ec441e4a77a.woff2 +0 -0
- package/dist/remotion-bundle/b83baa383ff0bf2b.woff2 +0 -0
- package/dist/remotion-bundle/b9ad7b6c0a11450a.woff2 +0 -0
- package/dist/remotion-bundle/baf84486e8ae3aaf.woff2 +0 -0
- package/dist/remotion-bundle/bc047b1f6869cffa.woff2 +0 -0
- package/dist/remotion-bundle/bf4f3ac6e93f33aa.woff2 +0 -0
- package/dist/remotion-bundle/bf6835ffec5897a2.woff2 +0 -0
- package/dist/remotion-bundle/bf8885f581eb1724.woff2 +0 -0
- package/dist/remotion-bundle/bundle.js +83376 -0
- package/dist/remotion-bundle/bundle.js.map +1 -0
- package/dist/remotion-bundle/c03f046bccd789d0.woff2 +0 -0
- package/dist/remotion-bundle/c0bb1f8962b73bc3.woff2 +0 -0
- package/dist/remotion-bundle/c1003f9a7db6e1cf.woff2 +0 -0
- package/dist/remotion-bundle/c15d83fb1e199515.woff2 +0 -0
- package/dist/remotion-bundle/c28e7e5d310f73ef.woff2 +0 -0
- package/dist/remotion-bundle/c2b840274db78aea.woff2 +0 -0
- package/dist/remotion-bundle/c3000e3299d4e45f.woff2 +0 -0
- package/dist/remotion-bundle/c83ce886e5288510.woff2 +0 -0
- package/dist/remotion-bundle/c87a5a64d4ac0918.woff2 +0 -0
- package/dist/remotion-bundle/c8a7e0d049e965fa.woff2 +0 -0
- package/dist/remotion-bundle/c949a35d3a3b1faf.woff2 +0 -0
- package/dist/remotion-bundle/c9618c9b9ac2bc78.woff2 +0 -0
- package/dist/remotion-bundle/ca3add3b84152d5b.woff2 +0 -0
- package/dist/remotion-bundle/cad9dd036408d707.woff2 +0 -0
- package/dist/remotion-bundle/cbb24916619df439.woff2 +0 -0
- package/dist/remotion-bundle/cc054f0b5514e177.woff2 +0 -0
- package/dist/remotion-bundle/ccc248ed9312bc71.woff2 +0 -0
- package/dist/remotion-bundle/cd9d623aa07af925.woff2 +0 -0
- package/dist/remotion-bundle/ce2ba7a321bd1247.woff2 +0 -0
- package/dist/remotion-bundle/cf72455f79a29b14.woff2 +0 -0
- package/dist/remotion-bundle/d267cbfefab452ac.woff2 +0 -0
- package/dist/remotion-bundle/d435cff46a64955f.woff +0 -0
- package/dist/remotion-bundle/d494d07f67e363f6.woff2 +0 -0
- package/dist/remotion-bundle/d7aa0cc1fa47bf38.woff2 +0 -0
- package/dist/remotion-bundle/d7c5ca93d885160a.woff2 +0 -0
- package/dist/remotion-bundle/d855d3e252db74e2.woff2 +0 -0
- package/dist/remotion-bundle/d8f13d47f02f82c2.woff2 +0 -0
- package/dist/remotion-bundle/d9567cce2ee11019.woff2 +0 -0
- package/dist/remotion-bundle/db8d4456fc75dd86.woff +0 -0
- package/dist/remotion-bundle/dc274628378c47ee.woff2 +0 -0
- package/dist/remotion-bundle/dc3e06947bb69903.woff2 +0 -0
- package/dist/remotion-bundle/dd67040ac3b6d523.woff2 +0 -0
- package/dist/remotion-bundle/e0b04bd488f953f4.woff2 +0 -0
- package/dist/remotion-bundle/e2a572ff95089370.woff2 +0 -0
- package/dist/remotion-bundle/e2e18a86b1c2b0cc.woff2 +0 -0
- package/dist/remotion-bundle/e3a78ee2fc9c6931.woff2 +0 -0
- package/dist/remotion-bundle/e654c9d547605a9f.woff2 +0 -0
- package/dist/remotion-bundle/e67a3a64c129927c.woff2 +0 -0
- package/dist/remotion-bundle/e6be28b4203cd6ce.woff2 +0 -0
- package/dist/remotion-bundle/e841907ad9b0a191.woff +0 -0
- package/dist/remotion-bundle/e889d1541c69fffa.woff2 +0 -0
- package/dist/remotion-bundle/e88ef8c76373a9e2.woff2 +0 -0
- package/dist/remotion-bundle/e9c72f4bc37defef.woff2 +0 -0
- package/dist/remotion-bundle/e9e35f863403a255.woff2 +0 -0
- package/dist/remotion-bundle/eb23b37b009375da.woff2 +0 -0
- package/dist/remotion-bundle/ee1342b741625721.woff2 +0 -0
- package/dist/remotion-bundle/f07da88543a57ec9.woff2 +0 -0
- package/dist/remotion-bundle/f522982115306f8a.woff2 +0 -0
- package/dist/remotion-bundle/f8449bd864e6d8bc.woff2 +0 -0
- package/dist/remotion-bundle/f906dd5bd95ff9ab.woff2 +0 -0
- package/dist/remotion-bundle/f9e9e9413e3c38bb.woff2 +0 -0
- package/dist/remotion-bundle/fa5a5b16280994a8.woff2 +0 -0
- package/dist/remotion-bundle/favicon.ico +0 -0
- package/dist/remotion-bundle/fb19c0517725599b.woff2 +0 -0
- package/dist/remotion-bundle/fcaf24232f684b9b.woff2 +0 -0
- package/dist/remotion-bundle/fe09e084a3eea8cf.woff2 +0 -0
- package/dist/remotion-bundle/ff38d5317df7345a.woff2 +0 -0
- package/dist/remotion-bundle/ffe7ea1ea08f455a.woff2 +0 -0
- package/dist/remotion-bundle/index.html +49 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaomei/communication/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaomei/communication/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaomei/communication/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaomei/communication/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoxin/career/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoxin/career/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoxin/career/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoxin/career/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoyue/parenting/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoyue/parenting/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoyue/parenting/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/female-kefu-xiaoyue/parenting/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/male-kefu-xiaoxu/time-trap/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/male-kefu-xiaoxu/time-trap/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/male-kefu-xiaoxu/time-trap/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/male-kefu-xiaoxu/time-trap/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/cognition/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/cognition/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/cognition/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/cognition/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/growth/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/growth/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/growth/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/growth/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/parenting/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/parenting/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/parenting/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/parenting/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/soothing/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/soothing/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/soothing/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-A6b7WpG3/soothing/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-R2s4N9qJ/cognition/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-R2s4N9qJ/cognition/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-R2s4N9qJ/cognition/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-female-R2s4N9qJ/cognition/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-Bk7vD3xP/decision/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-Bk7vD3xP/decision/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-Bk7vD3xP/decision/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-Bk7vD3xP/decision/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-W1tH9jVc/manager/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-W1tH9jVc/manager/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-W1tH9jVc/manager/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-W1tH9jVc/manager/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-W1tH9jVc/manager/4.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-s5NqE0rZ/founder/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-s5NqE0rZ/founder/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-s5NqE0rZ/founder/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide/v-male-s5NqE0rZ/founder/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/career-advice/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/career-advice/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/career-advice/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/career-advice/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/career-advice/4.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/founder-lesson/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/founder-lesson/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/founder-lesson/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/founder-lesson/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/founder-lesson/4.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/incident-review/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/incident-review/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/incident-review/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/incident-review/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/incident-review/4.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/learning-loop/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/learning-loop/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/learning-loop/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/learning-loop/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/learning-loop/4.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/meeting-closure/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/meeting-closure/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/meeting-closure/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/meeting-closure/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/product-update/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/product-update/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/product-update/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/product-update/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/research-reading/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/research-reading/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/research-reading/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/research-reading/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/sales-enablement/0.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/sales-enablement/1.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/sales-enablement/2.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/sales-enablement/3.mp3 +0 -0
- package/dist/remotion-bundle/public/paper-slide-experiments/sales-enablement/4.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-0.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-1.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-2.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-3.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-4.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/ai-life/card-5.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-0.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-1.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-2.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-3.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-4.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-5.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/coffee-science/card-6.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-0.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-1.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-2.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-3.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-4.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-5.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/reading-secrets/card-6.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-0.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-1.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-2.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-3.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-4.mp3 +0 -0
- package/dist/remotion-bundle/public/voiceover/remote-work/card-5.mp3 +0 -0
- package/dist/remotion-bundle/source-map-helper.wasm +0 -0
- package/lib/cli.js +270 -0
- package/lib/commands/_registry.js +48 -0
- package/lib/commands/add.js +242 -0
- package/lib/commands/asr/azure-transcribe.js +336 -0
- package/lib/commands/asr/cloud-transcribe.js +384 -0
- package/lib/commands/asr/helpers.js +76 -0
- package/lib/commands/asr/index.js +236 -0
- package/lib/commands/asr/local-transcribe.js +125 -0
- package/lib/commands/asr-jobs.js +257 -0
- package/lib/commands/asr.js +11 -0
- package/lib/commands/auth-cmds.js +358 -0
- package/lib/commands/dub.js +542 -0
- package/lib/commands/explain.js +512 -0
- package/lib/commands/feedback.js +152 -0
- package/lib/commands/image.js +207 -0
- package/lib/commands/mcp-key.js +166 -0
- package/lib/commands/narrate.js +639 -0
- package/lib/commands/picstory-templates.js +276 -0
- package/lib/commands/picstory.js +547 -0
- package/lib/commands/podcast/dialogue.js +109 -0
- package/lib/commands/podcast/generate.js +127 -0
- package/lib/commands/podcast/index.js +561 -0
- package/lib/commands/podcast/synthesize.js +188 -0
- package/lib/commands/podcast.js +11 -0
- package/lib/commands/present.js +519 -0
- package/lib/commands/publish.js +415 -0
- package/lib/commands/skills.js +473 -0
- package/lib/commands/slice-render.js +282 -0
- package/lib/commands/slice-stage.js +264 -0
- package/lib/commands/slice.js +346 -0
- package/lib/commands/slides/constants.js +108 -0
- package/lib/commands/slides/html-renderer.js +338 -0
- package/lib/commands/slides/index.js +345 -0
- package/lib/commands/slides.js +11 -0
- package/lib/commands/story.js +302 -0
- package/lib/commands/summarize.js +532 -0
- package/lib/commands/synthesize.js +261 -0
- package/lib/commands/translate.js +593 -0
- package/lib/commands/upgrade.js +249 -0
- package/lib/commands/video-translate.js +577 -0
- package/lib/commands/voices.js +292 -0
- package/lib/core/agent-env.js +104 -0
- package/lib/core/args.js +107 -0
- package/lib/core/asr-client.js +448 -0
- package/lib/core/asr-jobs-client.js +126 -0
- package/lib/core/asr-jobs-store.js +105 -0
- package/lib/core/asr-r2-upload.js +181 -0
- package/lib/core/asr-upload.js +132 -0
- package/lib/core/audio-extract.js +150 -0
- package/lib/core/audio.js +219 -0
- package/lib/core/auth.js +880 -0
- package/lib/core/config.js +197 -0
- package/lib/core/feedback.js +64 -0
- package/lib/core/ffmpeg.js +476 -0
- package/lib/core/http.js +188 -0
- package/lib/core/image-client.js +55 -0
- package/lib/core/intent-params.js +11 -0
- package/lib/core/llm-client.js +76 -0
- package/lib/core/logger.js +208 -0
- package/lib/core/mic-recorder.js +182 -0
- package/lib/core/pause-markers.js +94 -0
- package/lib/core/podcast-pacing.js +118 -0
- package/lib/core/spinner.js +33 -0
- package/lib/core/srt.js +394 -0
- package/lib/core/telemetry.js +100 -0
- package/lib/core/timeline.js +92 -0
- package/lib/core/tts-synthesizer.js +70 -0
- package/lib/core/update-check.js +185 -0
- package/lib/core/url-download.js +148 -0
- package/lib/core/whisper-local.js +279 -0
- package/lib/internal/deck-validator.js +488 -0
- package/lib/internal/slice-themes.json +370 -0
- package/lib/stage-core/cloud-render.js +170 -0
- package/lib/stage-core/deck-format.js +133 -0
- package/lib/stage-core/edit-prompt.js +104 -0
- package/lib/stage-core/event-bus.js +31 -0
- package/lib/stage-core/port.js +46 -0
- package/lib/stage-core/server.js +352 -0
- package/lib/stage-core/snapshot-store.js +198 -0
- package/lib/stage-core/watcher.js +106 -0
- package/lib/stage-ui/slice/template.js +1672 -0
- package/package.json +9 -4
- package/skills/.claude-plugin/marketplace.json +22 -0
- package/skills/.claude-plugin/plugin.json +25 -0
- package/skills/LICENSE +21 -0
- package/skills/README.md +120 -0
- package/skills/hub/SKILL.md +317 -0
- package/skills/podcast/SKILL.md +146 -0
- package/skills/slice/SKILL.md +205 -0
- package/skills/slice/agents/openai.yaml +4 -0
- package/skills/slice/references/deck-schema.md +183 -0
- package/skills/slice/references/example-decks.md +108 -0
- package/skills/slice/references/themes.md +172 -0
- package/skills/transcribe/SKILL.md +473 -0
- package/skills/video/SKILL.md +261 -0
- package/skills/voxflow-slice/SKILL.md +271 -0
- package/skills/voxflow-slice/examples/article.md +13 -0
- package/skills/voxflow-slice/examples/expected-deck.json +39 -0
- package/skills/voxflow-slice/examples/validate.mjs +46 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoxFlow CLI — Present command
|
|
3
|
+
*
|
|
4
|
+
* Converts text or URL content into narrated short-video cards (1080x1920).
|
|
5
|
+
*
|
|
6
|
+
* Pipeline:
|
|
7
|
+
* 1. Input → LLM generates structured card JSON (or user supplies --cards)
|
|
8
|
+
* 2. Per-card TTS narration synthesis (skipped with --no-audio)
|
|
9
|
+
* 3. Remotion renders animated card video
|
|
10
|
+
* 4. FFmpeg merges narration audio into video (if audio exists)
|
|
11
|
+
*
|
|
12
|
+
* Requires: remotion-cards/ Remotion project with `npm install` done.
|
|
13
|
+
* Optional: ffmpeg (for audio merge into MP4).
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
const path = require('path');
|
|
18
|
+
const { PRESENT_DEFAULTS } = require('../core/config');
|
|
19
|
+
const { request, throwApiError, throwNetworkError } = require('../core/http');
|
|
20
|
+
const { buildWav } = require('../core/audio');
|
|
21
|
+
const { BYTES_PER_MS } = require('../core/timeline');
|
|
22
|
+
const { startSpinner } = require('../core/spinner');
|
|
23
|
+
|
|
24
|
+
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
25
|
+
|
|
26
|
+
const STYLES = {
|
|
27
|
+
noir: 'Scheme1-CinematicNoir',
|
|
28
|
+
neon: 'Scheme2-NeonGlass',
|
|
29
|
+
editorial: 'Scheme3-EditorialLuxury',
|
|
30
|
+
aurora: 'Scheme4-GradientAurora',
|
|
31
|
+
brutalist: 'Scheme5-BoldBrutalist',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const VALID_STYLES = Object.keys(STYLES);
|
|
35
|
+
|
|
36
|
+
// Deprecated aliases for backward compatibility
|
|
37
|
+
const SCHEMES = STYLES;
|
|
38
|
+
const VALID_SCHEMES = VALID_STYLES;
|
|
39
|
+
|
|
40
|
+
const DEFAULT_CARD_DURATION_SEC = 10;
|
|
41
|
+
const AUDIO_BUFFER_SEC = 1; // small buffer for crossfade tail when using Remotion <Audio>
|
|
42
|
+
|
|
43
|
+
// ─── Remotion Discovery ─────────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
function findVideoPresentDir() {
|
|
46
|
+
let dir = __dirname;
|
|
47
|
+
for (let i = 0; i < 5; i++) {
|
|
48
|
+
const candidate = path.join(dir, 'remotion-cards');
|
|
49
|
+
if (fs.existsSync(path.join(candidate, 'package.json'))) {
|
|
50
|
+
return candidate;
|
|
51
|
+
}
|
|
52
|
+
dir = path.dirname(dir);
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function isRemotionReady() {
|
|
58
|
+
const vpDir = findVideoPresentDir();
|
|
59
|
+
if (!vpDir) return false;
|
|
60
|
+
return fs.existsSync(path.join(vpDir, 'node_modules', 'remotion'));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ─── Card Generation via Backend API ──────────────────────────────────────
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Generate cards via the backend /api/llm/generate-present-cards endpoint.
|
|
67
|
+
* This reuses the backend's prompt, JSON parsing, validation, and web search.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} apiBase - API base URL
|
|
70
|
+
* @param {string} token - JWT token
|
|
71
|
+
* @param {Object} body - { content?, url?, cardCount?, webSearch? }
|
|
72
|
+
* @returns {{ cards: Object, quota: Object }}
|
|
73
|
+
*/
|
|
74
|
+
async function generateCards(apiBase, token, body) {
|
|
75
|
+
let status, data;
|
|
76
|
+
try {
|
|
77
|
+
({ status, data } = await request(`${apiBase}/api/llm/generate-present-cards`, {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: {
|
|
80
|
+
'Content-Type': 'application/json',
|
|
81
|
+
'Authorization': `Bearer ${token}`,
|
|
82
|
+
},
|
|
83
|
+
timeoutMs: 180_000,
|
|
84
|
+
}, body));
|
|
85
|
+
} catch (err) {
|
|
86
|
+
throwNetworkError(err, apiBase);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (status !== 200 || data.code !== 'success') {
|
|
90
|
+
throwApiError(status, data, 'Card generation');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return { cards: data.data.cards, quota: data.data.quota };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ─── TTS Synthesis ──────────────────────────────────────────────────────────
|
|
97
|
+
|
|
98
|
+
async function synthesizeNarration(apiBase, token, text, voiceId, speed, index, total) {
|
|
99
|
+
process.stdout.write(` TTS card [${index + 1}/${total}]...`);
|
|
100
|
+
|
|
101
|
+
let status, data;
|
|
102
|
+
try {
|
|
103
|
+
({ status, data } = await request(`${apiBase}/api/tts/synthesize`, {
|
|
104
|
+
method: 'POST',
|
|
105
|
+
headers: {
|
|
106
|
+
'Content-Type': 'application/json',
|
|
107
|
+
'Authorization': `Bearer ${token}`,
|
|
108
|
+
},
|
|
109
|
+
}, {
|
|
110
|
+
text,
|
|
111
|
+
voiceId,
|
|
112
|
+
speed,
|
|
113
|
+
volume: 1.0,
|
|
114
|
+
}));
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.log(' FAIL');
|
|
117
|
+
throwNetworkError(err, apiBase);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (status !== 200 || data.code !== 'success') {
|
|
121
|
+
console.log(' FAIL');
|
|
122
|
+
throwApiError(status, data, `TTS card ${index + 1}`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const pcmBuffer = Buffer.from(data.audio, 'base64');
|
|
126
|
+
const durationMs = Math.round(pcmBuffer.length / BYTES_PER_MS);
|
|
127
|
+
console.log(` OK (${(pcmBuffer.length / 1024).toFixed(0)} KB, ${(durationMs / 1000).toFixed(1)}s)`);
|
|
128
|
+
return { pcm: pcmBuffer, durationMs, quota: data.quota };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ─── Duration Helpers ───────────────────────────────────────────────────────
|
|
132
|
+
|
|
133
|
+
function computeDurations(cards, audioTimings) {
|
|
134
|
+
return cards.map((_card, i) => {
|
|
135
|
+
if (audioTimings && audioTimings[i] && audioTimings[i].durationMs > 0) {
|
|
136
|
+
// Card duration = exact audio length + small buffer for crossfade tail, minimum 5s
|
|
137
|
+
return Math.max(5, Math.ceil(audioTimings[i].durationMs / 1000) + AUDIO_BUFFER_SEC);
|
|
138
|
+
}
|
|
139
|
+
return DEFAULT_CARD_DURATION_SEC;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ─── Remotion Render ────────────────────────────────────────────────────────
|
|
144
|
+
|
|
145
|
+
async function renderVideo(cardsData, style, outputPath) {
|
|
146
|
+
const vpDir = findVideoPresentDir();
|
|
147
|
+
if (!vpDir) {
|
|
148
|
+
throw new Error(
|
|
149
|
+
'remotion-cards/ directory not found.\n' +
|
|
150
|
+
' Install: cd remotion-cards && npm install'
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (!fs.existsSync(path.join(vpDir, 'node_modules', 'remotion'))) {
|
|
155
|
+
throw new Error(
|
|
156
|
+
'Remotion not installed in remotion-cards/.\n' +
|
|
157
|
+
' Run: cd remotion-cards && npm install'
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Hand cards to Remotion via --props (inputProps). Schemes pick it up
|
|
162
|
+
// through src/loadCardsData.ts, so we no longer have to mutate the
|
|
163
|
+
// bundled src/data/cards.json (issue #2364). The old write would race
|
|
164
|
+
// when two `voxflow present` runs overlapped.
|
|
165
|
+
const propsPath = path.join(
|
|
166
|
+
require('os').tmpdir(),
|
|
167
|
+
`voxflow-present-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.json`
|
|
168
|
+
);
|
|
169
|
+
fs.writeFileSync(propsPath, JSON.stringify({ cardsData }));
|
|
170
|
+
|
|
171
|
+
const compositionId = STYLES[style] || 'Scheme4-GradientAurora';
|
|
172
|
+
|
|
173
|
+
const { execFileSync } = require('child_process');
|
|
174
|
+
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
175
|
+
|
|
176
|
+
const args = [
|
|
177
|
+
'remotion', 'render', compositionId, outputPath,
|
|
178
|
+
'--props', propsPath,
|
|
179
|
+
'--codec', 'h264',
|
|
180
|
+
'--image-format', 'jpeg',
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
try {
|
|
184
|
+
execFileSync(npxCmd, args, {
|
|
185
|
+
cwd: vpDir,
|
|
186
|
+
stdio: 'pipe',
|
|
187
|
+
timeout: 600_000,
|
|
188
|
+
maxBuffer: 50 * 1024 * 1024,
|
|
189
|
+
});
|
|
190
|
+
} finally {
|
|
191
|
+
try { fs.unlinkSync(propsPath); } catch { /* non-fatal */ }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ─── Public API ─────────────────────────────────────────────────────────────
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Generate a short video from text/URL content.
|
|
199
|
+
*
|
|
200
|
+
* @param {object} opts
|
|
201
|
+
* @param {string} opts.token - JWT token
|
|
202
|
+
* @param {string} opts.api - API base URL
|
|
203
|
+
* @param {string} [opts.text] - Input text
|
|
204
|
+
* @param {string} [opts.url] - URL to fetch content from
|
|
205
|
+
* @param {string} [opts.cards] - Path to pre-generated cards.json
|
|
206
|
+
* @param {string} [opts.style] - Visual style name
|
|
207
|
+
* @param {string} [opts.voice] - TTS voice ID
|
|
208
|
+
* @param {number} [opts.speed] - TTS speed
|
|
209
|
+
* @param {boolean} [opts.noAudio] - Skip TTS, render video only
|
|
210
|
+
* @param {string} [opts.output] - Output file path
|
|
211
|
+
* @returns {Promise<{outputPath: string, cardsPath: string, duration: number}>}
|
|
212
|
+
*/
|
|
213
|
+
async function present(opts) {
|
|
214
|
+
const {
|
|
215
|
+
token,
|
|
216
|
+
api: apiBase,
|
|
217
|
+
text: inputText,
|
|
218
|
+
url: inputUrl,
|
|
219
|
+
cards: cardsPath,
|
|
220
|
+
style = PRESENT_DEFAULTS.style,
|
|
221
|
+
voice = PRESENT_DEFAULTS.voice,
|
|
222
|
+
speed = PRESENT_DEFAULTS.speed,
|
|
223
|
+
noAudio = false,
|
|
224
|
+
webSearch = false,
|
|
225
|
+
} = opts;
|
|
226
|
+
|
|
227
|
+
const sigintHandler = () => {
|
|
228
|
+
console.log('\n\nGeneration cancelled.');
|
|
229
|
+
process.exit(130);
|
|
230
|
+
};
|
|
231
|
+
process.on('SIGINT', sigintHandler);
|
|
232
|
+
|
|
233
|
+
try {
|
|
234
|
+
const totalSteps = noAudio ? 3 : 4;
|
|
235
|
+
let stepNum = 1;
|
|
236
|
+
|
|
237
|
+
// ── Step 1: Acquire card data ──────────────────────────────────────
|
|
238
|
+
let cardsData;
|
|
239
|
+
let llmQuota = null;
|
|
240
|
+
|
|
241
|
+
if (cardsPath) {
|
|
242
|
+
console.log(`\n[${stepNum}/${totalSteps}] Loading cards from ${cardsPath}...`);
|
|
243
|
+
const raw = fs.readFileSync(cardsPath, 'utf8');
|
|
244
|
+
try {
|
|
245
|
+
cardsData = JSON.parse(raw);
|
|
246
|
+
} catch (err) {
|
|
247
|
+
throw new Error(`Invalid JSON in cards file ${cardsPath}: ${err.message}`);
|
|
248
|
+
}
|
|
249
|
+
if (!cardsData.cards || !Array.isArray(cardsData.cards)) {
|
|
250
|
+
throw new Error('Invalid cards.json: missing "cards" array');
|
|
251
|
+
}
|
|
252
|
+
console.log(` Loaded ${cardsData.cards.length} cards`);
|
|
253
|
+
} else {
|
|
254
|
+
if (inputUrl) {
|
|
255
|
+
console.log(`\n[${stepNum}/${totalSteps}] Generating cards from URL...`);
|
|
256
|
+
console.log(` URL: ${inputUrl}`);
|
|
257
|
+
} else if (inputText) {
|
|
258
|
+
console.log(`\n[${stepNum}/${totalSteps}] Generating cards from text...`);
|
|
259
|
+
} else {
|
|
260
|
+
throw new Error('No input provided. Use --text, --url, or --cards');
|
|
261
|
+
}
|
|
262
|
+
if (webSearch) console.log(' Web search: enabled');
|
|
263
|
+
|
|
264
|
+
const body = {};
|
|
265
|
+
if (inputUrl) body.url = inputUrl;
|
|
266
|
+
else body.content = inputText;
|
|
267
|
+
if (webSearch) body.webSearch = true;
|
|
268
|
+
|
|
269
|
+
const spinner = startSpinner(' Generating via API...');
|
|
270
|
+
try {
|
|
271
|
+
const result = await generateCards(apiBase, token, body);
|
|
272
|
+
cardsData = result.cards;
|
|
273
|
+
llmQuota = result.quota;
|
|
274
|
+
spinner.stop(`OK (${cardsData.cards.length} cards)`);
|
|
275
|
+
} catch (err) {
|
|
276
|
+
spinner.stop('FAIL');
|
|
277
|
+
throw new Error(`Card generation failed: ${err.message}`);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
const cardCount = cardsData.cards.length;
|
|
282
|
+
const types = cardsData.cards.map(c => c.type).join(', ');
|
|
283
|
+
console.log(` Cards: ${cardCount} (${types})`);
|
|
284
|
+
|
|
285
|
+
stepNum++;
|
|
286
|
+
|
|
287
|
+
// ── Step 2: TTS narration (optional) ───────────────────────────────
|
|
288
|
+
let audioTimings = null;
|
|
289
|
+
let firstQuota = llmQuota;
|
|
290
|
+
let lastQuota = llmQuota;
|
|
291
|
+
const vpDir = findVideoPresentDir();
|
|
292
|
+
const audioFileNames = []; // per-card WAV filenames written to public/
|
|
293
|
+
|
|
294
|
+
if (!noAudio) {
|
|
295
|
+
const narrations = cardsData.cards.filter(c => c.narration);
|
|
296
|
+
console.log(`\n[${stepNum}/${totalSteps}] Synthesizing narration (${narrations.length} cards with narration)...`);
|
|
297
|
+
|
|
298
|
+
audioTimings = [];
|
|
299
|
+
|
|
300
|
+
for (let i = 0; i < cardsData.cards.length; i++) {
|
|
301
|
+
const card = cardsData.cards[i];
|
|
302
|
+
if (!card.narration) {
|
|
303
|
+
audioTimings.push({ durationMs: 0 });
|
|
304
|
+
audioFileNames.push(null);
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const result = await synthesizeNarration(
|
|
309
|
+
apiBase, token, card.narration, voice, speed, i, cardCount
|
|
310
|
+
);
|
|
311
|
+
audioTimings.push({ durationMs: result.durationMs });
|
|
312
|
+
if (!firstQuota && result.quota) firstQuota = result.quota;
|
|
313
|
+
lastQuota = result.quota;
|
|
314
|
+
|
|
315
|
+
// Write per-card WAV to remotion-cards/public/ so Remotion <Audio> can serve it
|
|
316
|
+
const audioFileName = `card-narration-${i}.wav`;
|
|
317
|
+
if (vpDir) {
|
|
318
|
+
const publicDir = path.join(vpDir, 'public');
|
|
319
|
+
fs.mkdirSync(publicDir, { recursive: true });
|
|
320
|
+
const wav = buildWav([result.pcm], 0);
|
|
321
|
+
fs.writeFileSync(path.join(publicDir, audioFileName), wav.wav);
|
|
322
|
+
}
|
|
323
|
+
audioFileNames.push(audioFileName);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
stepNum++;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Embed per-card audio filename and duration into cardsData for Remotion
|
|
330
|
+
const durationsSec = computeDurations(cardsData.cards, audioTimings);
|
|
331
|
+
cardsData.cards = cardsData.cards.map((card, i) => ({
|
|
332
|
+
...card,
|
|
333
|
+
durationSec: durationsSec[i],
|
|
334
|
+
audioFile: audioFileNames[i] || null,
|
|
335
|
+
}));
|
|
336
|
+
|
|
337
|
+
// ── Step 3: Render video ───────────────────────────────────────────
|
|
338
|
+
console.log(`\n[${stepNum}/${totalSteps}] Rendering video (style: ${style})...`);
|
|
339
|
+
|
|
340
|
+
if (!isRemotionReady()) {
|
|
341
|
+
// Fallback: save cards JSON + per-card WAV paths so the user can render later
|
|
342
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
343
|
+
const cardsOutPath = `present-${timestamp}.json`;
|
|
344
|
+
fs.writeFileSync(cardsOutPath, JSON.stringify(cardsData, null, 2));
|
|
345
|
+
console.log(' Remotion not available. Saved cards & audio for later rendering.');
|
|
346
|
+
console.log(` Cards: ${cardsOutPath}`);
|
|
347
|
+
if (audioFileNames.some(Boolean) && vpDir) {
|
|
348
|
+
audioFileNames.filter(Boolean).forEach(f => {
|
|
349
|
+
console.log(` Audio: ${path.join(vpDir, 'public', f)}`);
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
console.log('\n To install Remotion: cd remotion-cards && npm install');
|
|
353
|
+
console.log(' Then re-run with: voxflow present --cards ' + cardsOutPath);
|
|
354
|
+
const totalDurationMs = durationsSec.reduce((s, d) => s + d * 1000, 0);
|
|
355
|
+
return { outputPath: null, cardsPath: cardsOutPath, duration: totalDurationMs };
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
359
|
+
const videoPath = opts.output || `present-${timestamp}.mp4`;
|
|
360
|
+
|
|
361
|
+
const spinner = startSpinner(' Rendering...');
|
|
362
|
+
try {
|
|
363
|
+
// Remotion <Audio> components handle sync natively — no FFmpeg merge needed
|
|
364
|
+
await renderVideo(cardsData, style, videoPath);
|
|
365
|
+
spinner.stop('OK');
|
|
366
|
+
} catch (err) {
|
|
367
|
+
spinner.stop('FAIL');
|
|
368
|
+
try { fs.unlinkSync(videoPath); } catch { /* ignore */ }
|
|
369
|
+
throw new Error(`Video render failed: ${err.message}`);
|
|
370
|
+
} finally {
|
|
371
|
+
// Clean up per-card audio files from public/
|
|
372
|
+
if (vpDir) {
|
|
373
|
+
audioFileNames.forEach(f => {
|
|
374
|
+
if (f) try { fs.unlinkSync(path.join(vpDir, 'public', f)); } catch { /* ignore */ }
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
stepNum++;
|
|
380
|
+
|
|
381
|
+
// ── Final: Save cards & summary ────────────────────────────────────
|
|
382
|
+
const cardsOutPath = videoPath.replace(/\.mp4$/, '.json');
|
|
383
|
+
fs.writeFileSync(cardsOutPath, JSON.stringify(cardsData, null, 2));
|
|
384
|
+
|
|
385
|
+
const totalDurationMs = durationsSec.reduce((s, d) => s + d * 1000, 0);
|
|
386
|
+
const fileStat = fs.statSync(videoPath);
|
|
387
|
+
const fileSizeMb = (fileStat.size / (1024 * 1024)).toFixed(1);
|
|
388
|
+
|
|
389
|
+
console.log(`\n[${stepNum}/${totalSteps}] Done!`);
|
|
390
|
+
console.log('\n=== Output ===');
|
|
391
|
+
console.log(` Video: ${videoPath} (${fileSizeMb} MB, ${formatDuration(totalDurationMs)})`);
|
|
392
|
+
console.log(` Cards: ${cardsOutPath}`);
|
|
393
|
+
console.log(` Style: ${style}`);
|
|
394
|
+
console.log(` Cards: ${cardCount} (${types})`);
|
|
395
|
+
if (lastQuota) {
|
|
396
|
+
const quotaUsed = firstQuota && lastQuota
|
|
397
|
+
? (firstQuota.remaining - lastQuota.remaining)
|
|
398
|
+
: cardCount * 100;
|
|
399
|
+
console.log(` Quota: ${quotaUsed} used, ${lastQuota.remaining ?? '?'} remaining`);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
return { outputPath: videoPath, cardsPath: cardsOutPath, duration: totalDurationMs };
|
|
403
|
+
} finally {
|
|
404
|
+
process.removeListener('SIGINT', sigintHandler);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function formatDuration(ms) {
|
|
409
|
+
const totalSec = Math.round(ms / 1000);
|
|
410
|
+
const min = Math.floor(totalSec / 60);
|
|
411
|
+
const sec = totalSec % 60;
|
|
412
|
+
if (min === 0) return `${sec}s`;
|
|
413
|
+
return `${min}m${sec.toString().padStart(2, '0')}s`;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// ─── CLI Handler ────────────────────────────────────────────────────────────
|
|
417
|
+
|
|
418
|
+
async function handle(args) {
|
|
419
|
+
const { parseFlag, parseFloatFlag, parseBoolFlag, validateSpeed, runWithRetry } = require('../core/args');
|
|
420
|
+
const { getToken, getTokenInfo } = require('../core/auth');
|
|
421
|
+
const { API_BASE } = require('../core/config');
|
|
422
|
+
|
|
423
|
+
const api = parseFlag(args, '--api') || API_BASE;
|
|
424
|
+
const explicitToken = parseFlag(args, '--token');
|
|
425
|
+
|
|
426
|
+
// Validate flags before auth
|
|
427
|
+
const speed = parseFloatFlag(args, '--speed');
|
|
428
|
+
const output = parseFlag(args, '--output', '-o');
|
|
429
|
+
|
|
430
|
+
validateSpeed(args, speed);
|
|
431
|
+
|
|
432
|
+
if (output) {
|
|
433
|
+
const hasValidExt = ['.mp4', '.wav'].some(ext => output.toLowerCase().endsWith(ext));
|
|
434
|
+
if (!hasValidExt) {
|
|
435
|
+
console.error('Error: --output path must end with .mp4 or .wav');
|
|
436
|
+
process.exit(1);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const style = parseFlag(args, '--style') || parseFlag(args, '--scheme'); // --scheme is deprecated alias
|
|
441
|
+
if (style && !VALID_STYLES.includes(style)) {
|
|
442
|
+
console.error(`Error: --style must be one of: ${VALID_STYLES.join(', ')} (got: "${style}")`);
|
|
443
|
+
process.exit(1);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// Require at least one input
|
|
447
|
+
const text = parseFlag(args, '--text');
|
|
448
|
+
const url = parseFlag(args, '--url');
|
|
449
|
+
const cards = parseFlag(args, '--cards');
|
|
450
|
+
if (!text && !url && !cards) {
|
|
451
|
+
console.error('Error: provide one of --text, --url, or --cards');
|
|
452
|
+
process.exit(1);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if (cards && !require('fs').existsSync(cards)) {
|
|
456
|
+
console.error(`Error: cards file not found: ${cards}`);
|
|
457
|
+
process.exit(1);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Auth after validation
|
|
461
|
+
let token;
|
|
462
|
+
if (explicitToken) {
|
|
463
|
+
token = explicitToken;
|
|
464
|
+
} else {
|
|
465
|
+
token = await getToken({ api });
|
|
466
|
+
const info = getTokenInfo();
|
|
467
|
+
if (info) {
|
|
468
|
+
console.log(`\x1b[32mLogged in as ${info.email}\x1b[0m`);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const opts = {
|
|
473
|
+
token, api,
|
|
474
|
+
text, url, cards,
|
|
475
|
+
style: style || undefined,
|
|
476
|
+
voice: parseFlag(args, '--voice') || undefined,
|
|
477
|
+
speed, output,
|
|
478
|
+
noAudio: parseBoolFlag(args, '--no-audio'),
|
|
479
|
+
webSearch: parseBoolFlag(args, '--web-search'),
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
await runWithRetry(present, opts, api, explicitToken);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const meta = {
|
|
486
|
+
present: {
|
|
487
|
+
usage: '<--text|--url|--cards> [opts]',
|
|
488
|
+
description: 'Generate a short video from text or URL content',
|
|
489
|
+
options: [
|
|
490
|
+
`--text <text> Input text content`,
|
|
491
|
+
`--url <url> URL to fetch and convert`,
|
|
492
|
+
`--cards <path> Pre-generated cards.json (skip LLM)`,
|
|
493
|
+
`--style <name> Visual style: noir, neon, editorial, aurora (default), brutalist`,
|
|
494
|
+
`--voice <id> TTS voice ID (default: ${PRESENT_DEFAULTS.voice})`,
|
|
495
|
+
`--speed <n> TTS speed 0.5-2.0 (default: ${PRESENT_DEFAULTS.speed})`,
|
|
496
|
+
`--no-audio Skip TTS, render silent video only`,
|
|
497
|
+
`--web-search Search the web for up-to-date info on the topic`,
|
|
498
|
+
`--output <path> Output file path (default: ./present-<timestamp>.mp4)`,
|
|
499
|
+
],
|
|
500
|
+
examples: [
|
|
501
|
+
'voxflow present --text "Claude Code 是一个 AI 编程工具" --style aurora',
|
|
502
|
+
'voxflow present --url https://example.com/article --style noir',
|
|
503
|
+
'voxflow present --text "2025 AI芯片格局" --web-search --style neon',
|
|
504
|
+
'voxflow present --cards my-cards.json --no-audio',
|
|
505
|
+
'voxflow present --text "React 入门指南" --voice v-male-Bk7vD3xP --output react.mp4',
|
|
506
|
+
],
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
module.exports = {
|
|
511
|
+
present, handle, meta,
|
|
512
|
+
STYLES, VALID_STYLES,
|
|
513
|
+
// Deprecated aliases (backward compat)
|
|
514
|
+
SCHEMES, VALID_SCHEMES,
|
|
515
|
+
// Shared utilities for video rendering (used by summarize --video)
|
|
516
|
+
renderVideo, findVideoPresentDir, isRemotionReady,
|
|
517
|
+
computeDurations, synthesizeNarration,
|
|
518
|
+
_test: { computeDurations, formatDuration, STYLES, VALID_STYLES, SCHEMES, VALID_SCHEMES },
|
|
519
|
+
};
|