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,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Podcast command — LLM dialogue generation (legacy + ai-sdk engines).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
const { PODCAST_DEFAULTS } = require('../../core/config');
|
|
8
|
+
const { request, throwApiError, throwNetworkError } = require('../../core/http');
|
|
9
|
+
const { startSpinner } = require('../../core/spinner');
|
|
10
|
+
const { parseDialogueText, parseStructuredScript } = require('./dialogue');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Determine which engine to use.
|
|
14
|
+
*/
|
|
15
|
+
function resolveEngine(engine) {
|
|
16
|
+
if (engine === 'legacy') {
|
|
17
|
+
console.warn('\x1b[33m⚠ Warning: the legacy podcast engine is deprecated and will be removed in a future release.\x1b[0m');
|
|
18
|
+
console.warn('\x1b[33m Use --engine ai-sdk (default) for better quality and more features.\x1b[0m\n');
|
|
19
|
+
return 'legacy';
|
|
20
|
+
}
|
|
21
|
+
if (engine === 'ai-sdk') return 'ai-sdk';
|
|
22
|
+
return 'ai-sdk';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Generate dialogue via the legacy engine.
|
|
27
|
+
*/
|
|
28
|
+
async function generateDialogueLegacy(apiBase, token, opts) {
|
|
29
|
+
const spinner = startSpinner('\n[1/3] Generating dialogue text (legacy)...');
|
|
30
|
+
|
|
31
|
+
let status, data;
|
|
32
|
+
try {
|
|
33
|
+
({ status, data } = await request(`${apiBase}/api/llm/generate-dialogue`, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json',
|
|
37
|
+
'Authorization': `Bearer ${token}`,
|
|
38
|
+
},
|
|
39
|
+
timeoutMs: 180_000,
|
|
40
|
+
}, {
|
|
41
|
+
prompt: opts.topic,
|
|
42
|
+
style: opts.style || opts.template,
|
|
43
|
+
length: opts.length,
|
|
44
|
+
dialogueMode: true,
|
|
45
|
+
autoSpeakerNames: true,
|
|
46
|
+
exchanges: opts.exchanges,
|
|
47
|
+
}));
|
|
48
|
+
} catch (err) {
|
|
49
|
+
spinner.stop('FAIL');
|
|
50
|
+
throwNetworkError(err, apiBase);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (status !== 200 || data.code !== 'success') {
|
|
54
|
+
spinner.stop('FAIL');
|
|
55
|
+
throwApiError(status, data, 'Dialogue generation');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const text = data.text;
|
|
59
|
+
const voiceMapping = data.voiceMapping || {};
|
|
60
|
+
const quota = data.quota;
|
|
61
|
+
spinner.stop('OK');
|
|
62
|
+
|
|
63
|
+
const segments = parseDialogueText(text);
|
|
64
|
+
const speakers = [...new Set(segments.map(s => s.speaker))];
|
|
65
|
+
|
|
66
|
+
console.log(` ${text.length} 字, ${segments.length} 段, ${speakers.length} 位说话者`);
|
|
67
|
+
console.log(` 说话者: ${speakers.join(', ')}`);
|
|
68
|
+
console.log(` 配额剩余: ${quota?.remaining ?? '?'}`);
|
|
69
|
+
|
|
70
|
+
return { text, segments, voiceMapping, speakers, quota, script: null };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Generate dialogue via the ai-sdk engine.
|
|
75
|
+
*/
|
|
76
|
+
async function generateDialogueAiSdk(apiBase, token, opts) {
|
|
77
|
+
const spinner = startSpinner('\n[1/3] Generating dialogue text (ai-sdk)...');
|
|
78
|
+
|
|
79
|
+
const durationMap = { short: '1-3', medium: '3-5', long: '5-10' };
|
|
80
|
+
|
|
81
|
+
let status, data;
|
|
82
|
+
try {
|
|
83
|
+
({ status, data } = await request(`${apiBase}/api/podcast/generate-script`, {
|
|
84
|
+
method: 'POST',
|
|
85
|
+
headers: {
|
|
86
|
+
'Content-Type': 'application/json',
|
|
87
|
+
'Authorization': `Bearer ${token}`,
|
|
88
|
+
},
|
|
89
|
+
timeoutMs: 180_000,
|
|
90
|
+
}, {
|
|
91
|
+
topic: opts.topic,
|
|
92
|
+
speakerCount: opts.speakers || PODCAST_DEFAULTS.speakers,
|
|
93
|
+
colloquialLevel: opts.colloquial || 'medium',
|
|
94
|
+
language: opts.language || 'zh-CN',
|
|
95
|
+
duration: durationMap[opts.length] || '3-5',
|
|
96
|
+
autoMatchVoices: true
|
|
97
|
+
}));
|
|
98
|
+
} catch (err) {
|
|
99
|
+
spinner.stop('FAIL');
|
|
100
|
+
throwNetworkError(err, apiBase);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (status !== 200 || data.code !== 'success') {
|
|
104
|
+
spinner.stop('FAIL');
|
|
105
|
+
throwApiError(status, data, 'Podcast script generation');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const podcastScript = data.script;
|
|
109
|
+
const voiceMapping = data.voiceMapping || {};
|
|
110
|
+
const quota = data.quota;
|
|
111
|
+
spinner.stop('OK');
|
|
112
|
+
|
|
113
|
+
const segments = parseStructuredScript(podcastScript);
|
|
114
|
+
const speakers = [...new Set(segments.map(s => s.speaker))];
|
|
115
|
+
const text = segments.map(s => `${s.speaker}: ${s.text}`).join('\n');
|
|
116
|
+
|
|
117
|
+
console.log(` ${text.length} chars, ${segments.length} segments, ${speakers.length} speakers`);
|
|
118
|
+
console.log(` Speakers: ${speakers.join(', ')}`);
|
|
119
|
+
if (podcastScript?.quality_score?.overall) {
|
|
120
|
+
console.log(` Quality score: ${podcastScript.quality_score.overall}/10`);
|
|
121
|
+
}
|
|
122
|
+
console.log(` Quota remaining: ${quota?.remaining ?? '?'}`);
|
|
123
|
+
|
|
124
|
+
return { text, segments, voiceMapping, speakers, quota, script: podcastScript };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
module.exports = { resolveEngine, generateDialogueLegacy, generateDialogueAiSdk };
|
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoxFlow CLI — Podcast command
|
|
3
|
+
*
|
|
4
|
+
* Thin orchestrator: delegates to submodules for dialogue generation,
|
|
5
|
+
* multi-voice TTS synthesis, and audio assembly.
|
|
6
|
+
*
|
|
7
|
+
* Submodules:
|
|
8
|
+
* ./dialogue.js — script loading, text parsing
|
|
9
|
+
* ./generate.js — LLM engines (legacy, ai-sdk)
|
|
10
|
+
* ./synthesize.js — multi-voice TTS + assembly
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
const { PODCAST_DEFAULTS } = require('../../core/config');
|
|
18
|
+
const { ApiError } = require('../../core/http');
|
|
19
|
+
const { buildWav } = require('../../core/audio');
|
|
20
|
+
const { computeGapsMs, VALID_PACE } = require('../../core/podcast-pacing');
|
|
21
|
+
const { loadScript, parseStructuredScript } = require('./dialogue');
|
|
22
|
+
const { resolveEngine, generateDialogueLegacy, generateDialogueAiSdk } = require('./generate');
|
|
23
|
+
const { synthesizeAll } = require('./synthesize');
|
|
24
|
+
|
|
25
|
+
// ─── Public API ─────────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
async function podcast(opts) {
|
|
28
|
+
const sigintHandler = () => {
|
|
29
|
+
console.log('\n\nGeneration cancelled.');
|
|
30
|
+
process.exit(130);
|
|
31
|
+
};
|
|
32
|
+
process.on('SIGINT', sigintHandler);
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
return await _podcast(opts);
|
|
36
|
+
} finally {
|
|
37
|
+
process.removeListener('SIGINT', sigintHandler);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function _podcast(opts) {
|
|
42
|
+
const style = opts.style || opts.template || PODCAST_DEFAULTS.template;
|
|
43
|
+
const length = opts.length || PODCAST_DEFAULTS.length;
|
|
44
|
+
const exchanges = opts.exchanges || PODCAST_DEFAULTS.exchanges;
|
|
45
|
+
const speed = opts.speed ?? PODCAST_DEFAULTS.speed;
|
|
46
|
+
const silence = opts.silence ?? PODCAST_DEFAULTS.silence;
|
|
47
|
+
const pace = opts.pace || 'natural';
|
|
48
|
+
const silenceExplicit = opts.silence != null;
|
|
49
|
+
const api = opts.api;
|
|
50
|
+
const token = opts.token;
|
|
51
|
+
const engine = resolveEngine(opts.engine || 'auto');
|
|
52
|
+
const colloquial = opts.colloquial || 'medium';
|
|
53
|
+
const speakers = opts.speakers || PODCAST_DEFAULTS.speakers;
|
|
54
|
+
const language = opts.language || 'zh-CN';
|
|
55
|
+
const formatJson = opts.format === 'json';
|
|
56
|
+
const noTts = opts.noTts || false;
|
|
57
|
+
const voiceOverride = opts.voice || null;
|
|
58
|
+
const scriptPath = opts.script || null;
|
|
59
|
+
|
|
60
|
+
const topic = opts.topic || 'Latest trends in technology';
|
|
61
|
+
|
|
62
|
+
// ── Input mode: read from .podcast.json ──
|
|
63
|
+
if (opts.input) {
|
|
64
|
+
return _podcastFromFile(opts);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Default output path
|
|
68
|
+
let outputPath = opts.output;
|
|
69
|
+
if (!outputPath) {
|
|
70
|
+
const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
71
|
+
const ext = noTts ? '.txt' : '.wav';
|
|
72
|
+
outputPath = path.resolve(`podcast-${ts}${ext}`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
console.log('\n=== VoxFlow Podcast Generator ===');
|
|
76
|
+
console.log(`Topic: ${topic}`);
|
|
77
|
+
if (scriptPath) {
|
|
78
|
+
console.log(`Script: ${scriptPath}`);
|
|
79
|
+
} else {
|
|
80
|
+
console.log(`Engine: ${engine}`);
|
|
81
|
+
console.log(`Template: ${style}`);
|
|
82
|
+
console.log(`Length: ${length}`);
|
|
83
|
+
console.log(`Colloquial: ${colloquial}`);
|
|
84
|
+
console.log(`Speakers: ${speakers}`);
|
|
85
|
+
console.log(`Language: ${language}`);
|
|
86
|
+
}
|
|
87
|
+
console.log(`Speed: ${speed}`);
|
|
88
|
+
if (voiceOverride) console.log(`Voice: ${voiceOverride}`);
|
|
89
|
+
if (opts.bgm) console.log(`BGM: ${opts.bgm} (ducking: ${opts.ducking ?? PODCAST_DEFAULTS.ducking})`);
|
|
90
|
+
console.log(`API: ${api}`);
|
|
91
|
+
if (!noTts) console.log(`Output: ${outputPath}`);
|
|
92
|
+
|
|
93
|
+
// Step 1: Get dialogue
|
|
94
|
+
let text, segments, voiceMapping, detectedSpeakers, podcastScript;
|
|
95
|
+
|
|
96
|
+
if (scriptPath) {
|
|
97
|
+
console.log('\n[1/3] 加载脚本文件...');
|
|
98
|
+
const script = loadScript(scriptPath);
|
|
99
|
+
segments = script.segments;
|
|
100
|
+
voiceMapping = script.voiceMapping;
|
|
101
|
+
detectedSpeakers = [...new Set(segments.map(s => s.speaker))];
|
|
102
|
+
text = segments.map(s => `${s.speaker}:${s.text}`).join('\n');
|
|
103
|
+
podcastScript = null;
|
|
104
|
+
|
|
105
|
+
console.log(` ${text.length} chars, ${segments.length} segments, ${detectedSpeakers.length} speakers`);
|
|
106
|
+
console.log(` Speakers: ${detectedSpeakers.join(', ')}`);
|
|
107
|
+
} else if (engine === 'ai-sdk') {
|
|
108
|
+
const result = await generateDialogueAiSdk(api, token, {
|
|
109
|
+
topic, style, length, exchanges, colloquial, speakers, language
|
|
110
|
+
});
|
|
111
|
+
text = result.text;
|
|
112
|
+
segments = result.segments;
|
|
113
|
+
voiceMapping = result.voiceMapping;
|
|
114
|
+
detectedSpeakers = result.speakers;
|
|
115
|
+
podcastScript = result.script;
|
|
116
|
+
} else {
|
|
117
|
+
const result = await generateDialogueLegacy(api, token, {
|
|
118
|
+
topic, style, length, exchanges, template: style
|
|
119
|
+
});
|
|
120
|
+
text = result.text;
|
|
121
|
+
segments = result.segments;
|
|
122
|
+
voiceMapping = result.voiceMapping;
|
|
123
|
+
detectedSpeakers = result.speakers;
|
|
124
|
+
podcastScript = result.script;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (segments.length === 0) {
|
|
128
|
+
throw new Error('No dialogue segments found in generated text');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Output .podcast.json if requested
|
|
132
|
+
if (formatJson) {
|
|
133
|
+
const jsonPath = outputPath.replace(/\.\w+$/, '.podcast.json');
|
|
134
|
+
const jsonContent = {
|
|
135
|
+
version: 1,
|
|
136
|
+
engine,
|
|
137
|
+
topic,
|
|
138
|
+
script: podcastScript || { dialogue: segments.map(s => ({ speaker: s.speaker, text: s.text, intent: s.intent || null, pauseAfterMs: s.pauseAfterMs ?? null })) },
|
|
139
|
+
voiceMapping,
|
|
140
|
+
meta: { colloquial, speakers, language, length, style }
|
|
141
|
+
};
|
|
142
|
+
const outDir = path.dirname(jsonPath);
|
|
143
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
144
|
+
fs.writeFileSync(jsonPath, JSON.stringify(jsonContent, null, 2), 'utf8');
|
|
145
|
+
console.log(`\n JSON exported: ${jsonPath}`);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// --no-tts: script only
|
|
149
|
+
if (noTts) {
|
|
150
|
+
const textPath = outputPath.endsWith('.txt') ? outputPath : outputPath.replace(/\.\w+$/, '.txt');
|
|
151
|
+
const textContent = segments.map((s, i) => `[${i + 1}] ${s.speaker}:${s.text}`).join('\n\n');
|
|
152
|
+
const outDir = path.dirname(textPath);
|
|
153
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
154
|
+
fs.writeFileSync(textPath, textContent, 'utf8');
|
|
155
|
+
|
|
156
|
+
console.log(`\n=== Done (script only) ===`);
|
|
157
|
+
console.log(`Script: ${textPath}`);
|
|
158
|
+
return { outputPath: textPath, textPath, duration: 0, quotaUsed: 1 };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Show voice assignments
|
|
162
|
+
console.log('\n Voice assignments:');
|
|
163
|
+
for (const speaker of detectedSpeakers) {
|
|
164
|
+
if (voiceOverride) {
|
|
165
|
+
console.log(` ${speaker} → ${voiceOverride} (override)`);
|
|
166
|
+
} else {
|
|
167
|
+
const mapping = voiceMapping[speaker];
|
|
168
|
+
if (mapping) {
|
|
169
|
+
console.log(` ${speaker} → ${mapping.voiceId}`);
|
|
170
|
+
} else {
|
|
171
|
+
console.log(` ${speaker} → (default)`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Step 2: Multi-voice TTS — within-turn pause markers split + splice (pace-aware)
|
|
177
|
+
const { pcmBuffers, quota: lastQuota, ttsCallCount } = await synthesizeAll(
|
|
178
|
+
api, token, segments, voiceMapping, speed, voiceOverride, { pace }
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
// Step 3: Build WAV — per-segment intent-driven gaps, applied with pace preset.
|
|
182
|
+
// --silence flag (when explicitly set) overrides intent gaps with a uniform value.
|
|
183
|
+
const stepLabel = opts.bgm ? '[3/4]' : '[3/3]';
|
|
184
|
+
console.log(`\n${stepLabel} 拼接音频...`);
|
|
185
|
+
const gapsMs = silenceExplicit
|
|
186
|
+
? null
|
|
187
|
+
: computeGapsMs(segments, { pace });
|
|
188
|
+
const { wav, duration } = buildWav(pcmBuffers, gapsMs ? { gapsMs, fadeIn: true } : silence);
|
|
189
|
+
|
|
190
|
+
const outDir = path.dirname(outputPath);
|
|
191
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
192
|
+
|
|
193
|
+
const outputExt = path.extname(outputPath).toLowerCase();
|
|
194
|
+
const needsConvert = outputExt !== '.wav';
|
|
195
|
+
const wavWorkPath = needsConvert
|
|
196
|
+
? outputPath.slice(0, -outputExt.length) + '.tmp.wav'
|
|
197
|
+
: outputPath;
|
|
198
|
+
|
|
199
|
+
fs.writeFileSync(wavWorkPath, wav);
|
|
200
|
+
|
|
201
|
+
const textPath = outputPath.slice(0, -outputExt.length) + '.txt';
|
|
202
|
+
const textContent = segments.map((s, i) => `[${i + 1}] ${s.speaker}:${s.text}`).join('\n\n');
|
|
203
|
+
fs.writeFileSync(textPath, textContent, 'utf8');
|
|
204
|
+
|
|
205
|
+
// Step 4 (optional): Mix BGM
|
|
206
|
+
if (opts.bgm) {
|
|
207
|
+
const { checkFfmpeg, mixWithBgm } = require('../../core/ffmpeg');
|
|
208
|
+
const ffmpegInfo = await checkFfmpeg();
|
|
209
|
+
if (!ffmpegInfo.available) {
|
|
210
|
+
throw new Error(
|
|
211
|
+
'ffmpeg is required for BGM mixing. Install it:\n' +
|
|
212
|
+
' macOS: brew install ffmpeg\n' +
|
|
213
|
+
' Ubuntu: sudo apt install ffmpeg\n' +
|
|
214
|
+
' Windows: https://ffmpeg.org/download.html'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
console.log(`\n[4/4] 混合背景音乐 (ducking: ${opts.ducking ?? PODCAST_DEFAULTS.ducking})...`);
|
|
219
|
+
const mixedPath = wavWorkPath.replace('.tmp.wav', '-mixed.tmp.wav').replace(/(?<!\.tmp)\.wav$/, '-mixed.wav');
|
|
220
|
+
await mixWithBgm(wavWorkPath, opts.bgm, mixedPath, {
|
|
221
|
+
ducking: opts.ducking ?? PODCAST_DEFAULTS.ducking,
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
fs.copyFileSync(mixedPath, wavWorkPath);
|
|
225
|
+
try { fs.unlinkSync(mixedPath); } catch { /* ignore */ }
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Convert to target format if needed
|
|
229
|
+
if (needsConvert) {
|
|
230
|
+
const { checkFfmpeg, convertAudioFormat } = require('../../core/ffmpeg');
|
|
231
|
+
const ffmpegInfo = await checkFfmpeg();
|
|
232
|
+
if (!ffmpegInfo.available) {
|
|
233
|
+
fs.renameSync(wavWorkPath, outputPath);
|
|
234
|
+
console.log(`\n Warning: ffmpeg not found, saved as WAV in ${outputPath}`);
|
|
235
|
+
} else {
|
|
236
|
+
await convertAudioFormat(wavWorkPath, outputPath);
|
|
237
|
+
try { fs.unlinkSync(wavWorkPath); } catch { /* ignore */ }
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const quotaUsed = (scriptPath ? 0 : 2) + (ttsCallCount ?? segments.length);
|
|
242
|
+
console.log(`\n=== Done ===`);
|
|
243
|
+
console.log(`Output: ${outputPath} (${(fs.statSync(outputPath).size / 1024).toFixed(1)} KB, ${duration.toFixed(1)}s)`);
|
|
244
|
+
console.log(`Script: ${textPath}`);
|
|
245
|
+
console.log(`Quota: ${quotaUsed} used, ${lastQuota?.remaining ?? '?'} remaining`);
|
|
246
|
+
|
|
247
|
+
return { outputPath, textPath, duration, quotaUsed };
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Load a .podcast.json and synthesize from it.
|
|
252
|
+
*/
|
|
253
|
+
async function _podcastFromFile(opts) {
|
|
254
|
+
if (!opts.token) {
|
|
255
|
+
throw new Error('Authentication required. Run `voxflow login` first.');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const inputPath = path.resolve(opts.input);
|
|
259
|
+
if (!fs.existsSync(inputPath)) {
|
|
260
|
+
throw new Error(`Input file not found: ${inputPath}`);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
console.log(`\n=== Loading podcast from ${inputPath} ===`);
|
|
264
|
+
let raw;
|
|
265
|
+
try {
|
|
266
|
+
raw = JSON.parse(fs.readFileSync(inputPath, 'utf8'));
|
|
267
|
+
} catch (err) {
|
|
268
|
+
throw new Error(`Invalid JSON in input file ${inputPath}: ${err.message}`);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const script = raw.script;
|
|
272
|
+
const voiceMapping = raw.voiceMapping || {};
|
|
273
|
+
const segments = parseStructuredScript(script) ||
|
|
274
|
+
(script?.dialogue || []).map(s => ({ speaker: s.speaker, text: s.text }));
|
|
275
|
+
|
|
276
|
+
if (segments.length === 0) {
|
|
277
|
+
throw new Error('No dialogue segments found in input file');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const speed = opts.speed ?? PODCAST_DEFAULTS.speed;
|
|
281
|
+
const silence = opts.silence ?? PODCAST_DEFAULTS.silence;
|
|
282
|
+
const pace = opts.pace || 'natural';
|
|
283
|
+
const silenceExplicit = opts.silence != null;
|
|
284
|
+
|
|
285
|
+
let outputPath = opts.output;
|
|
286
|
+
if (!outputPath) {
|
|
287
|
+
const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
|
288
|
+
outputPath = path.resolve(`podcast-${ts}.wav`);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const speakers = [...new Set(segments.map(s => s.speaker))];
|
|
292
|
+
console.log(` ${segments.length} segments, ${speakers.length} speakers`);
|
|
293
|
+
|
|
294
|
+
const { pcmBuffers, quota: lastQuota, ttsCallCount } = await synthesizeAll(opts.api, opts.token, segments, voiceMapping, speed, undefined, { pace });
|
|
295
|
+
|
|
296
|
+
console.log('\n[3/3] Building audio...');
|
|
297
|
+
const gapsMs = silenceExplicit
|
|
298
|
+
? null
|
|
299
|
+
: computeGapsMs(segments, { pace });
|
|
300
|
+
const { wav, duration } = buildWav(pcmBuffers, gapsMs ? { gapsMs, fadeIn: true } : silence);
|
|
301
|
+
|
|
302
|
+
const outDir = path.dirname(outputPath);
|
|
303
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
304
|
+
|
|
305
|
+
const outputExt = path.extname(outputPath).toLowerCase();
|
|
306
|
+
const needsConvert = outputExt !== '.wav';
|
|
307
|
+
|
|
308
|
+
if (needsConvert) {
|
|
309
|
+
const tempWavPath = outputPath.slice(0, -outputExt.length) + '.tmp.wav';
|
|
310
|
+
fs.writeFileSync(tempWavPath, wav);
|
|
311
|
+
|
|
312
|
+
const { checkFfmpeg, convertAudioFormat } = require('../../core/ffmpeg');
|
|
313
|
+
const ffmpegInfo = await checkFfmpeg();
|
|
314
|
+
if (!ffmpegInfo.available) {
|
|
315
|
+
fs.renameSync(tempWavPath, outputPath);
|
|
316
|
+
console.log(`\n Warning: ffmpeg not found, saved as WAV in ${outputPath}`);
|
|
317
|
+
} else {
|
|
318
|
+
await convertAudioFormat(tempWavPath, outputPath);
|
|
319
|
+
try { fs.unlinkSync(tempWavPath); } catch { /* ignore */ }
|
|
320
|
+
}
|
|
321
|
+
} else {
|
|
322
|
+
fs.writeFileSync(outputPath, wav);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const textPath = outputPath.slice(0, -outputExt.length) + '.txt';
|
|
326
|
+
const textContent = segments.map((s, i) => `[${i + 1}] ${s.speaker}:${s.text}`).join('\n\n');
|
|
327
|
+
fs.writeFileSync(textPath, textContent, 'utf8');
|
|
328
|
+
|
|
329
|
+
console.log(`\n=== Done ===`);
|
|
330
|
+
console.log(`Output: ${outputPath} (${(fs.statSync(outputPath).size / 1024).toFixed(1)} KB, ${duration.toFixed(1)}s)`);
|
|
331
|
+
console.log(`Script: ${textPath}`);
|
|
332
|
+
const calls = ttsCallCount ?? segments.length;
|
|
333
|
+
console.log(`Quota: ${calls} TTS calls, ${lastQuota?.remaining ?? '?'} remaining`);
|
|
334
|
+
|
|
335
|
+
return { outputPath, textPath, duration, quotaUsed: calls };
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// ─── CLI Handler ────────────────────────────────────────────────────────────
|
|
339
|
+
|
|
340
|
+
async function handle(args) {
|
|
341
|
+
const { parseFlag, parseIntFlag, parseFloatFlag, parseBoolFlag, validateSpeed, validateSilence, runWithRetry } = require('../../core/args');
|
|
342
|
+
const { getToken, getTokenInfo } = require('../../core/auth');
|
|
343
|
+
const { API_BASE } = require('../../core/config');
|
|
344
|
+
|
|
345
|
+
const api = parseFlag(args, '--api') || API_BASE;
|
|
346
|
+
const explicitToken = parseFlag(args, '--token');
|
|
347
|
+
|
|
348
|
+
const noTts = parseBoolFlag(args, '--no-tts');
|
|
349
|
+
const inputFile = parseFlag(args, '--input');
|
|
350
|
+
|
|
351
|
+
const exchanges = parseIntFlag(args, '--exchanges');
|
|
352
|
+
const speed = parseFloatFlag(args, '--speed');
|
|
353
|
+
const silence = parseFloatFlag(args, '--silence');
|
|
354
|
+
const pace = parseFlag(args, '--pace');
|
|
355
|
+
const ducking = parseFloatFlag(args, '--ducking');
|
|
356
|
+
const output = parseFlag(args, '--output', '-o');
|
|
357
|
+
const speakersCount = parseIntFlag(args, '--speakers');
|
|
358
|
+
|
|
359
|
+
if (pace && !VALID_PACE.includes(pace)) {
|
|
360
|
+
console.error(`Error: --pace must be one of: ${VALID_PACE.join(', ')} (got: "${pace}")`);
|
|
361
|
+
process.exit(1);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (exchanges !== undefined) {
|
|
365
|
+
if (isNaN(exchanges) || exchanges < 2 || exchanges > 30) {
|
|
366
|
+
console.error(`Error: --exchanges must be an integer between 2 and 30 (got: "${parseFlag(args, '--exchanges')}")`);
|
|
367
|
+
process.exit(1);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
validateSpeed(args, speed);
|
|
372
|
+
validateSilence(args, silence);
|
|
373
|
+
|
|
374
|
+
if (output) {
|
|
375
|
+
const validExts = ['.wav', '.mp3', '.txt', '.json'];
|
|
376
|
+
const hasValidExt = validExts.some(ext => output.toLowerCase().endsWith(ext));
|
|
377
|
+
if (!hasValidExt) {
|
|
378
|
+
console.error(`Error: --output path must end with ${validExts.join(', ')}`);
|
|
379
|
+
process.exit(1);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const length = parseFlag(args, '--length');
|
|
384
|
+
if (length && !['short', 'medium', 'long'].includes(length)) {
|
|
385
|
+
console.error(`Error: --length must be one of: short, medium, long (got: "${length}")`);
|
|
386
|
+
process.exit(1);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const engine = parseFlag(args, '--engine');
|
|
390
|
+
if (engine && !['auto', 'legacy', 'ai-sdk'].includes(engine)) {
|
|
391
|
+
console.error(`Error: --engine must be one of: auto, legacy, ai-sdk (got: "${engine}")`);
|
|
392
|
+
process.exit(1);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const colloquial = parseFlag(args, '--colloquial');
|
|
396
|
+
if (colloquial && !['low', 'medium', 'high'].includes(colloquial)) {
|
|
397
|
+
console.error(`Error: --colloquial must be one of: low, medium, high (got: "${colloquial}")`);
|
|
398
|
+
process.exit(1);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (speakersCount !== undefined) {
|
|
402
|
+
if (isNaN(speakersCount) || speakersCount < 1 || speakersCount > 3) {
|
|
403
|
+
console.error(`Error: --speakers must be 1, 2, or 3 (got: "${parseFlag(args, '--speakers')}")`);
|
|
404
|
+
process.exit(1);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const languageRaw = parseFlag(args, '--language', '--lang');
|
|
409
|
+
const langAlias = { zh: 'zh-CN', 'en-US': 'en', 'ja-JP': 'ja' };
|
|
410
|
+
const language = languageRaw ? (langAlias[languageRaw] || languageRaw) : null;
|
|
411
|
+
if (language && !['zh-CN', 'en', 'ja'].includes(language)) {
|
|
412
|
+
console.error(`Error: --language must be one of: zh-CN, en, ja (got: "${languageRaw}")`);
|
|
413
|
+
process.exit(1);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const template = parseFlag(args, '--template');
|
|
417
|
+
if (template && !['interview', 'discussion', 'news', 'story', 'tutorial'].includes(template)) {
|
|
418
|
+
console.error(`Error: --template must be one of: interview, discussion, news, story, tutorial (got: "${template}")`);
|
|
419
|
+
process.exit(1);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const format = parseFlag(args, '--format');
|
|
423
|
+
if (format && !['json'].includes(format)) {
|
|
424
|
+
console.error(`Error: --format must be: json (got: "${format}")`);
|
|
425
|
+
process.exit(1);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (inputFile) {
|
|
429
|
+
const resolved = path.resolve(inputFile);
|
|
430
|
+
if (!fs.existsSync(resolved)) {
|
|
431
|
+
console.error(`Error: Input file not found: ${resolved}`);
|
|
432
|
+
process.exit(1);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const script = parseFlag(args, '--script');
|
|
437
|
+
if (script) {
|
|
438
|
+
const resolved = path.resolve(script);
|
|
439
|
+
if (!fs.existsSync(resolved)) {
|
|
440
|
+
console.error(`Error: Script file not found: ${resolved}`);
|
|
441
|
+
process.exit(1);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const bgm = parseFlag(args, '--bgm');
|
|
446
|
+
if (bgm) {
|
|
447
|
+
const resolved = path.resolve(bgm);
|
|
448
|
+
if (!fs.existsSync(resolved)) {
|
|
449
|
+
console.error(`Error: BGM file not found: ${resolved}`);
|
|
450
|
+
process.exit(1);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (ducking !== undefined) {
|
|
455
|
+
if (isNaN(ducking) || ducking < 0 || ducking > 1.0) {
|
|
456
|
+
console.error(`Error: --ducking must be between 0 and 1.0 (got: "${parseFlag(args, '--ducking')}")`);
|
|
457
|
+
process.exit(1);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
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
|
+
let topic = parseFlag(args, '--topic');
|
|
473
|
+
if (!topic) {
|
|
474
|
+
const valuedFlags = new Set([
|
|
475
|
+
'--topic', '--engine', '--template', '--style', '--colloquial',
|
|
476
|
+
'--speakers', '--language', '--lang', '--length', '--exchanges',
|
|
477
|
+
'--format', '--input', '--script', '--voice', '--bgm', '--ducking',
|
|
478
|
+
'--output', '-o', '--speed', '--silence', '--pace', '--api', '--token',
|
|
479
|
+
]);
|
|
480
|
+
for (let i = 0; i < args.length; i++) {
|
|
481
|
+
if (args[i].startsWith('-')) {
|
|
482
|
+
if (valuedFlags.has(args[i])) i++;
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
topic = args[i];
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const podcastOpts = {
|
|
491
|
+
token, api,
|
|
492
|
+
topic,
|
|
493
|
+
style: parseFlag(args, '--style') || template,
|
|
494
|
+
template,
|
|
495
|
+
length,
|
|
496
|
+
exchanges,
|
|
497
|
+
output, speed, silence,
|
|
498
|
+
pace: pace || undefined,
|
|
499
|
+
engine: engine || undefined,
|
|
500
|
+
colloquial: colloquial || undefined,
|
|
501
|
+
speakers: speakersCount || undefined,
|
|
502
|
+
language: language || undefined,
|
|
503
|
+
format: format || undefined,
|
|
504
|
+
input: inputFile || undefined,
|
|
505
|
+
noTts,
|
|
506
|
+
voice: parseFlag(args, '--voice'),
|
|
507
|
+
script,
|
|
508
|
+
bgm,
|
|
509
|
+
ducking,
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
await runWithRetry(podcast, podcastOpts, api, explicitToken);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const meta = {
|
|
516
|
+
podcast: {
|
|
517
|
+
usage: '[topic] [opts]',
|
|
518
|
+
description: 'Generate a multi-speaker podcast/dialogue',
|
|
519
|
+
options: [
|
|
520
|
+
`<topic> Podcast topic (positional arg or --topic)`,
|
|
521
|
+
`--topic <text> Podcast topic (alternative to positional, default: tech trends)`,
|
|
522
|
+
`--engine <type> auto | legacy | ai-sdk (default: auto → ai-sdk)`,
|
|
523
|
+
`--template <name> interview | discussion | news | story | tutorial`,
|
|
524
|
+
`--colloquial <lvl> low | medium | high (default: medium)`,
|
|
525
|
+
`--speakers <n> Speaker count: 1, 2, or 3 (default: ${PODCAST_DEFAULTS.speakers})`,
|
|
526
|
+
`--language <code> zh-CN | en | ja (alias: --lang; accepts zh, en-US, ja-JP)`,
|
|
527
|
+
`--style <style> Legacy: dialogue style (maps to --template)`,
|
|
528
|
+
`--length <len> short | medium | long (default: ${PODCAST_DEFAULTS.length})`,
|
|
529
|
+
`--exchanges <n> Number of exchanges, 2-30 (legacy, default: ${PODCAST_DEFAULTS.exchanges})`,
|
|
530
|
+
`--format json Output .podcast.json alongside audio`,
|
|
531
|
+
`--input <file> Load .podcast.json and synthesize from it`,
|
|
532
|
+
`--no-tts Generate script only, skip TTS synthesis`,
|
|
533
|
+
`--script <file> Pre-written script JSON (skips LLM generation)`,
|
|
534
|
+
`--voice <id> Override TTS voice for all speakers`,
|
|
535
|
+
`--bgm <file> Background music file to mix in`,
|
|
536
|
+
`--ducking <n> BGM volume ducking 0-1.0 (default: ${PODCAST_DEFAULTS.ducking})`,
|
|
537
|
+
`--output <path> Output WAV path (default: ./podcast-<timestamp>.wav)`,
|
|
538
|
+
`--speed <n> TTS speed 0.5-2.0 (default: ${PODCAST_DEFAULTS.speed})`,
|
|
539
|
+
`--silence <sec> Uniform silence override between segments, 0-5.0 (legacy)`,
|
|
540
|
+
`--pace <preset> Pacing preset: tight | natural | relaxed (default: natural).`,
|
|
541
|
+
` Multiplies intent-driven per-segment gaps. Ignored if --silence is set.`,
|
|
542
|
+
],
|
|
543
|
+
examples: [
|
|
544
|
+
'voxflow podcast "远程工作让人更累的三个原因"',
|
|
545
|
+
'voxflow podcast --topic "AI in healthcare"',
|
|
546
|
+
'voxflow podcast "climate change" --colloquial high --speakers 3',
|
|
547
|
+
'voxflow podcast "tech news" --template news --lang en',
|
|
548
|
+
'voxflow podcast --topic "AI" --format json --no-tts',
|
|
549
|
+
'voxflow podcast --input podcast.podcast.json',
|
|
550
|
+
'voxflow podcast --topic "debate" --engine legacy --length long --exchanges 20',
|
|
551
|
+
'voxflow podcast --script dialogue.json --voice v-male-Bk7vD3xP',
|
|
552
|
+
'voxflow podcast --topic "music history" --bgm background.mp3 --ducking 0.15',
|
|
553
|
+
'voxflow podcast "AI" --pace relaxed # slower, more breathing room',
|
|
554
|
+
'voxflow podcast "AI" --pace tight # snappy, tighter cadence',
|
|
555
|
+
],
|
|
556
|
+
},
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
const { parseDialogueText } = require('./dialogue');
|
|
560
|
+
|
|
561
|
+
module.exports = { podcast, handle, meta, ApiError, _test: { parseDialogueText, parseStructuredScript, resolveEngine, loadScript } };
|