{"id":26900,"date":"2025-02-25T11:03:30","date_gmt":"2025-02-25T03:03:30","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=26900"},"modified":"2025-02-25T11:03:30","modified_gmt":"2025-02-25T03:03:30","slug":"trv","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/trv\/","title":{"rendered":"TRV\uff1a\u5c06\u5e7b\u706f\u7247\/PPT\u548c\u8bb2\u89e3\u5907\u6ce8\u5feb\u901f\u751f\u6210\u6f14\u8bb2\u89c6\u9891"},"content":{"rendered":"<p>TRV \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u6258\u7ba1\u4e8e GitHub\uff0c\u65e8\u5728\u5e2e\u52a9\u7528\u6237\u5c06\u5e7b\u706f\u7247\u548c\u6f14\u8bb2\u7b14\u8bb0\u5feb\u901f\u8f6c\u5316\u4e3a\u5e26\u6709\u65c1\u767d\u7684\u89c6\u9891\u3002\u5b83\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\uff0c\u5c06\u8f93\u5165\u7684\u6f14\u793a\u6587\u7a3f\u6587\u4ef6\u81ea\u52a8\u751f\u6210\u97f3\u9891\u548c\u89c6\u9891\u5185\u5bb9\uff0c\u9002\u5408\u9700\u8981\u5feb\u901f\u5236\u4f5c\u6f14\u793a\u89c6\u9891\u7684\u6559\u80b2\u5de5\u4f5c\u8005\u3001\u5185\u5bb9\u521b\u4f5c\u8005\u6216\u5f00\u53d1\u8005\u3002\u9879\u76ee\u7531 transformrs \u56e2\u961f\u5f00\u53d1\uff0c\u652f\u6301\u591a\u79cd\u97f3\u9891\u751f\u6210\u6a21\u578b\u548c\u683c\u5f0f\uff0c\u7528\u6237\u53ef\u901a\u8fc7\u672c\u5730\u90e8\u7f72\u6216\u5728\u7ebf\u670d\u52a1\u4f7f\u7528\u3002TRV \u7684\u8bbe\u8ba1\u6ce8\u91cd\u6548\u7387\u4e0e\u7075\u6d3b\u6027\uff0c\u5f00\u6e90\u7279\u6027\u4e5f\u8ba9\u6280\u672f\u7231\u597d\u8005\u80fd\u591f\u81ea\u7531\u5b9a\u5236\u548c\u6269\u5c55\u529f\u80fd\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-26901\" title=\"TRV\uff1a\u5c06\u5e7b\u706f\u7247\/PPT\u548c\u8bb2\u89e3\u5907\u6ce8\u5feb\u901f\u751f\u6210\u6f14\u8bb2\u89c6\u9891-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/3928e419f3df475.jpg\" alt=\"TRV\uff1a\u5c06\u5e7b\u706f\u7247\/PPT\u548c\u8bb2\u89e3\u5907\u6ce8\u5feb\u901f\u751f\u6210\u6f14\u8bb2\u89c6\u9891-1\" width=\"1200\" height=\"600\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/3928e419f3df475.jpg 1200w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/3928e419f3df475-768x384.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u5e7b\u706f\u7247\u8f6c\u89c6\u9891<\/strong>\uff1a\u5c06 Typst \u683c\u5f0f\u7684\u5e7b\u706f\u7247\u6587\u4ef6\u8f6c\u6362\u4e3a\u5e26\u6709\u65c1\u767d\u7684\u89c6\u9891\u3002<\/li>\n<li><strong>\u81ea\u52a8\u97f3\u9891\u751f\u6210<\/strong>\uff1a\u57fa\u4e8e\u6587\u672c\u751f\u6210\u8bed\u97f3\uff0c\u652f\u6301\u591a\u79cd\u8bed\u97f3\u6a21\u578b\u548c\u98ce\u683c\u3002<\/li>\n<li><strong>\u591a\u683c\u5f0f\u652f\u6301<\/strong>\uff1a\u8f93\u51fa\u97f3\u9891\u652f\u6301 WAV \u7b49\u683c\u5f0f\uff0c\u89c6\u9891\u652f\u6301 MP4\u3002<\/li>\n<li><strong>\u591a\u79cd\u670d\u52a1\u63d0\u4f9b\u5546\u517c\u5bb9<\/strong>\uff1a\u53ef\u8fde\u63a5 OpenAI\u3001DeepInfra \u7b49\u670d\u52a1\u751f\u6210\u97f3\u9891\u3002<\/li>\n<li><strong>\u81ea\u5b9a\u4e49\u914d\u7f6e<\/strong>\uff1a\u652f\u6301\u8c03\u6574\u5206\u8fa8\u7387\u3001\u8bed\u97f3\u98ce\u683c\u53ca\u5176\u4ed6\u53c2\u6570\u3002<\/li>\n<li><strong>Docker \u652f\u6301<\/strong>\uff1a\u63d0\u4f9b Docker \u955c\u50cf\uff0c\u4fbf\u4e8e\u672c\u5730\u5feb\u901f\u90e8\u7f72\u3002<\/li>\n<li><strong>\u6a2a\u7ad6\u5c4f\u9002\u914d<\/strong>\uff1a\u652f\u6301\u751f\u6210\u9002\u5408 YouTube Shorts \u7b49\u5e73\u53f0\u7684\u7ad6\u5c4f\u89c6\u9891\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<p>TRV \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u9700\u8981\u4e00\u5b9a\u7684\u6280\u672f\u57fa\u7840\u6765\u5b89\u88c5\u548c\u4f7f\u7528\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u5b89\u88c5\u6b65\u9aa4\uff1a<\/p>\n<h4>1. \u524d\u7f6e\u6761\u4ef6<\/h4>\n<ul>\n<li><strong>\u7cfb\u7edf\u8981\u6c42<\/strong>\uff1a\u652f\u6301 macOS\u3001Linux \u6216 Windows\uff08\u9700\u547d\u4ee4\u884c\u73af\u5883\uff09\u3002<\/li>\n<li><strong>\u4f9d\u8d56\u5de5\u5177<\/strong>\uff1a\n<ul>\n<li>Git\uff1a\u7528\u4e8e\u514b\u9686\u4ee3\u7801\u4ed3\u5e93\u3002<\/li>\n<li>Docker\uff08\u53ef\u9009\uff09\uff1a\u7528\u4e8e\u5bb9\u5668\u5316\u90e8\u7f72\u3002<\/li>\n<li>Python\uff08\u53ef\u9009\uff09\uff1a\u82e5\u624b\u52a8\u5b89\u88c5\u90e8\u5206\u4f9d\u8d56\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u7f51\u7edc\u8fde\u63a5<\/strong>\uff1a\u90e8\u5206\u529f\u80fd\u9700\u8bbf\u95ee\u5728\u7ebf\u670d\u52a1\u3002<\/li>\n<\/ul>\n<h4>2. \u901a\u8fc7 GitHub \u83b7\u53d6\u6e90\u7801<\/h4>\n<ol>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u514b\u9686\u4ed3\u5e93\uff1a<\/li>\n<\/ol>\n<pre><code>git clone https:\/\/github.com\/transformrs\/trv.git\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff1a<\/li>\n<\/ol>\n<pre><code>cd trv\r\n<\/code><\/pre>\n<h4>3. \u9009\u62e9\u5b89\u88c5\u65b9\u5f0f<\/h4>\n<ul>\n<li><strong>\u65b9\u5f0f\u4e00\uff1a\u4f7f\u7528 Docker\uff08\u63a8\u8350\uff09<\/strong><\/li>\n<\/ul>\n<ol>\n<li>\u786e\u4fdd Docker \u5df2\u5b89\u88c5\u5e76\u8fd0\u884c\u3002<\/li>\n<li>\u6784\u5efa Docker \u955c\u50cf\uff1a<\/li>\n<\/ol>\n<pre><code>docker build --rm -t trv .\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u8fd0\u884c\u5bb9\u5668\uff1a<\/li>\n<\/ol>\n<pre><code>docker run -it --rm trv\r\n<\/code><\/pre>\n<ol start=\"4\">\n<li>\u5728\u5bb9\u5668\u5185\u5373\u53ef\u4f7f\u7528 TRV \u547d\u4ee4\u3002<\/li>\n<\/ol>\n<ul>\n<li><strong>\u65b9\u5f0f\u4e8c\uff1a\u624b\u52a8\u5b89\u88c5\uff08\u672c\u5730\u73af\u5883\uff09<\/strong><\/li>\n<\/ul>\n<ol>\n<li>\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\uff08\u5982 FFmpeg\u3001Typst \u7b49\uff0c\u5177\u4f53\u4f9d\u8d56\u89c6\u7cfb\u7edf\u800c\u5b9a\uff09\u3002<\/li>\n<li>\u6839\u636e GitHub \u9875\u9762\u8bf4\u660e\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u548c\u5de5\u5177\u3002<\/li>\n<li>\u76f4\u63a5\u8fd0\u884c TRV \u53ef\u6267\u884c\u6587\u4ef6\uff08\u9700\u7f16\u8bd1\u6216\u4e0b\u8f7d\u9884\u6784\u5efa\u7248\u672c\uff09\u3002<\/li>\n<\/ol>\n<h4>4. \u914d\u7f6e\u670d\u52a1\u5bc6\u94a5\uff08\u53ef\u9009\uff09<\/h4>\n<p>\u82e5\u4f7f\u7528 DeepInfra \u6216\u5176\u4ed6\u5728\u7ebf\u670d\u52a1\u751f\u6210\u97f3\u9891\uff0c\u9700\u914d\u7f6e API \u5bc6\u94a5\uff1a<\/p>\n<ol>\n<li>\u83b7\u53d6\u5bc6\u94a5\uff08\u5982 DeepInfra \u7684\u00a0<code>DEEPINFRA_KEY<\/code>\uff09\u3002<\/li>\n<li>\u5728\u7ec8\u7aef\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/li>\n<\/ol>\n<pre><code>export DEEPINFRA_KEY=\"\u4f60\u7684\u5bc6\u94a5\"\r\n<\/code><\/pre>\n<h3>\u4f7f\u7528\u65b9\u6cd5<\/h3>\n<p>TRV \u7684\u6838\u5fc3\u529f\u80fd\u662f\u5c06\u5e7b\u706f\u7247\u6587\u4ef6\u8f6c\u4e3a\u89c6\u9891\uff0c\u4ee5\u4e0b\u662f\u5177\u4f53\u64cd\u4f5c\u6d41\u7a0b\uff1a<\/p>\n<h4>1. \u51c6\u5907\u8f93\u5165\u6587\u4ef6<\/h4>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a Typst \u683c\u5f0f\u7684\u6f14\u793a\u6587\u4ef6\uff08\u5982\u00a0<code>presentation.typ<\/code>\uff09\uff0c\u5305\u542b\u5e7b\u706f\u7247\u5185\u5bb9\u548c\u6f14\u8bb2\u7b14\u8bb0\u3002<\/li>\n<li>\u793a\u4f8b\u6587\u4ef6\u5185\u5bb9\uff1a<\/li>\n<\/ul>\n<pre><code>#slide[\r\n#title[\u6b22\u8fce\u4f7f\u7528 TRV]\r\n\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u6f14\u793a\u3002\r\n]\r\n#notes[\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u6f14\u793a\uff0c\u6b22\u8fce\u4f53\u9a8c TRV \u7684\u81ea\u52a8\u5316\u529f\u80fd\u3002]\r\n<\/code><\/pre>\n<h4>2. \u751f\u6210\u89c6\u9891<\/h4>\n<ul>\n<li><strong>\u57fa\u672c\u547d\u4ee4<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>trv --input=presentation.typ --output=out.mp4\r\n<\/code><\/pre>\n<p>\u8fd9\u5c06\u751f\u6210\u4e00\u4e2a\u9ed8\u8ba4\u914d\u7f6e\u7684\u89c6\u9891\u6587\u4ef6\u00a0<code>out.mp4<\/code>\u3002<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u5728\u7ebf\u670d\u52a1<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>trv --input=presentation.typ --provider=openai-compatible(kokoros.transformrs.org) --model=tts-1 --voice=bm_lewis --audio-format=wav\r\n<\/code><\/pre>\n<p>\u4f7f\u7528 Kokoros \u670d\u52a1\u751f\u6210 WAV \u97f3\u9891\u5e76\u5408\u6210\u89c6\u9891\u3002<\/p>\n<ul>\n<li><strong>\u4f7f\u7528 DeepInfra<\/strong>\uff1a<\/li>\n<\/ul>\n<pre><code>trv --input=presentation.typ --model=Zyphra\/Zonos-v0.1-hybrid --voice=american_male\r\n<\/code><\/pre>\n<p>\u9700\u786e\u4fdd\u5df2\u8bbe\u7f6e\u00a0<code>DEEPINFRA_KEY<\/code>\u3002<\/p>\n<h4>3. \u81ea\u5b9a\u4e49\u8bbe\u7f6e<\/h4>\n<ul>\n<li><strong>\u8c03\u6574\u5206\u8fa8\u7387<\/strong>\uff1a<br \/>\n\u5bf9\u4e8e\u7ad6\u5c4f\u89c6\u9891\uff08\u5982 YouTube Shorts\uff09\uff0c\u53ef\u8bbe\u7f6e\uff1a<\/li>\n<\/ul>\n<pre><code>trv --input=presentation.typ --page=1080x1920\r\n<\/code><\/pre>\n<ul>\n<li><strong>\u9009\u62e9\u8bed\u97f3\u98ce\u683c<\/strong>\uff1a<br \/>\n\u6307\u5b9a\u00a0<code>--voice<\/code>\u00a0\u53c2\u6570\uff0c\u5982\u00a0<code>american_male<\/code>\u00a0\u6216\u00a0<code>bm_lewis<\/code>\uff0c\u89c6\u670d\u52a1\u652f\u6301\u800c\u5b9a\u3002<\/li>\n<\/ul>\n<h4>4. \u67e5\u770b\u8f93\u51fa<\/h4>\n<ul>\n<li>\u751f\u6210\u7684\u89c6\u9891\u9ed8\u8ba4\u4fdd\u5b58\u5728\u00a0<code>_out\/out.mp4<\/code>\uff08\u8def\u5f84\u53ef\u901a\u8fc7\u00a0<code>--output<\/code>\u00a0\u6307\u5b9a\uff09\u3002<\/li>\n<li>\u68c0\u67e5\u65e5\u5fd7\u4fe1\u606f\uff0c\u786e\u4fdd\u6bcf\u5f20\u5e7b\u706f\u7247\u7684\u97f3\u9891\u548c\u89c6\u9891\u7247\u6bb5\u751f\u6210\u65e0\u8bef\u3002<\/li>\n<\/ul>\n<h3>\u7279\u8272\u529f\u80fd\u64cd\u4f5c<\/h3>\n<h4><strong>\u81ea\u52a8\u97f3\u9891\u751f\u6210<\/strong><\/h4>\n<ol>\n<li>\u7f16\u5199\u6f14\u8bb2\u7b14\u8bb0\uff0cTRV \u4f1a\u6839\u636e\u7b14\u8bb0\u751f\u6210\u8bed\u97f3\u3002<\/li>\n<li>\u901a\u8fc7\u00a0<code>--model<\/code>\u00a0\u6307\u5b9a\u8bed\u97f3\u6a21\u578b\uff08\u5982\u00a0<code>tts-1<\/code>\uff09\uff0c\u901a\u8fc7\u00a0<code>--voice<\/code>\u00a0\u9009\u62e9\u97f3\u8272\u3002<\/li>\n<li>\u793a\u4f8b\uff1a<\/li>\n<\/ol>\n<pre><code>trv --input=presentation.typ --model=tts-1 --voice=bm_lewis\r\n<\/code><\/pre>\n<p>\u8f93\u51fa\u5e26\u00a0<code>bm_lewis<\/code>\u00a0\u97f3\u8272\u7684\u65c1\u767d\u89c6\u9891\u3002<\/p>\n<h4><strong>Docker \u672c\u5730\u8fd0\u884c<\/strong><\/h4>\n<ol>\n<li>\u5728 Docker \u5bb9\u5668\u5185\u8fd0\u884c\uff1a<\/li>\n<\/ol>\n<pre><code>docker run -it --rm -v $(pwd):\/data trv --input=\/data\/presentation.typ\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li><code>-v<\/code>\u00a0\u53c2\u6570\u6302\u8f7d\u672c\u5730\u76ee\u5f55\uff0c\u786e\u4fdd\u6587\u4ef6\u53ef\u8bbf\u95ee\u3002<\/li>\n<\/ol>\n<h4><strong>\u7ad6\u5c4f\u89c6\u9891\u5236\u4f5c<\/strong><\/h4>\n<ol>\n<li>\u8bbe\u7f6e\u9875\u9762\u5c3a\u5bf8\u4e3a 1080&#215;1920\uff1a<\/li>\n<\/ol>\n<pre><code>trv --input=presentation.typ --page=1080x1920\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u8f93\u51fa\u9002\u5408\u77ed\u89c6\u9891\u5e73\u53f0\u7684 MP4 \u6587\u4ef6\u3002<\/li>\n<\/ol>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li><strong>\u6587\u4ef6\u683c\u5f0f<\/strong>\uff1a\u8f93\u5165\u9700\u4e3a Typst \u6587\u4ef6\uff0c\u82e5\u4e0d\u719f\u6089 Typst\uff0c\u53ef\u53c2\u8003\u5b98\u65b9\u6587\u6863\u3002<\/li>\n<li><strong>\u7f51\u7edc\u4f9d\u8d56<\/strong>\uff1a\u5728\u7ebf\u670d\u52a1\u9700\u7a33\u5b9a\u7f51\u7edc\uff0c\u5efa\u8bae\u672c\u5730\u6d4b\u8bd5\u65f6\u4f7f\u7528 Docker\u3002<\/li>\n<li><strong>\u786c\u4ef6\u8981\u6c42<\/strong>\uff1a\u5982\u4f7f\u7528\u9ad8\u7ea7\u6a21\u578b\uff08\u5982 Zyphra Zonos\uff09\uff0c\u5efa\u8bae 8GB VRAM \u6216\u501f\u52a9\u4e91\u670d\u52a1\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u7528\u6237\u53ef\u5feb\u901f\u4e0a\u624b TRV\uff0c\u5c06\u5e7b\u706f\u7247\u8f6c\u5316\u4e3a\u4e13\u4e1a\u89c6\u9891\uff0c\u63d0\u5347\u5185\u5bb9\u521b\u4f5c\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TRV \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u6258\u7ba1\u4e8e GitHub\uff0c\u65e8\u5728\u5e2e\u52a9\u7528\u6237\u5c06\u5e7b\u706f\u7247\u548c\u6f14\u8bb2\u7b14\u8bb0\u5feb\u901f\u8f6c\u5316\u4e3a\u5e26\u6709\u65c1\u767d\u7684\u89c6\u9891\u3002\u5b83\u901a\u8fc7\u7b80\u5355\u7684\u547d\u4ee4\u884c\u64cd\u4f5c\uff0c\u5c06\u8f93\u5165\u7684\u6f14\u793a\u6587\u7a3f\u6587\u4ef6\u81ea\u52a8\u751f\u6210\u97f3\u9891\u548c\u89c6\u9891\u5185\u5bb9\uff0c\u9002\u5408\u9700\u8981\u5feb\u901f\u5236\u4f5c\u6f14\u793a\u89c6\u9891\u7684\u6559\u80b2\u5de5\u4f5c\u8005\u3001\u5185\u5bb9\u521b\u4f5c\u8005\u6216\u5f00\u53d1\u8005\u3002\u9879\u76ee\u7531 tr&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61918,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,198],"class_list":["post-26900","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aishipinshengchenggongju"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/26900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=26900"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/26900\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/61918"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=26900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=26900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=26900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}