{"id":29941,"date":"2025-04-06T05:03:01","date_gmt":"2025-04-05T21:03:01","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=29941"},"modified":"2025-07-26T08:59:09","modified_gmt":"2025-07-26T00:59:09","slug":"text2voice","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/text2voice\/","title":{"rendered":"Text2Voice\uff1a\u57fa\u4e8e\u7845\u57fa\u6d41\u52a8API\u7684\u6587\u672c\u8f6c\u8bed\u97f3\u56fe\u5f62\u754c\u9762"},"content":{"rendered":"<p>Text2Voice \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u57fa\u4e8e\u7845\u57fa\u6d41\u52a8 API \u63d0\u4f9b\u6587\u672c\u8f6c\u8bed\u97f3\u529f\u80fd\uff0c\u6700\u5927\u7684\u7279\u70b9\u662f\u5e26\u6709\u7b80\u6d01\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u3002\u5b83\u7531\u5f00\u53d1\u8005 Sheldon Lee \u5728 GitHub \u4e0a\u521b\u5efa\uff0c\u8ba9\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u754c\u9762\u8f7b\u677e\u628a\u6587\u5b57\u53d8\u6210\u8bed\u97f3\u3002\u9879\u76ee\u4f7f\u7528 Python \u5f00\u53d1\uff0c\u7ed3\u5408 PyQt6 \u6846\u67b6\u6253\u9020\u76f4\u89c2\u7684\u64cd\u4f5c\u7a97\u53e3\u3002\u5b83\u7684\u6838\u5fc3\u662f\u5229\u7528 API \u5c06\u6587\u672c\u5b9e\u65f6\u8f6c\u4e3a\u53ef\u542c\u7684\u97f3\u9891\uff0c\u652f\u6301\u4e2d\u6587\u3001\u82f1\u6587\u7b49\u591a\u8bed\u8a00\uff0c\u8fd8\u80fd\u9009\u62e9\u4e0d\u540c\u97f3\u8272\u3002\u4ee3\u7801\u5f00\u653e\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u4e0b\u8f7d\u3001\u8fd0\u884c\u6216\u4fee\u6539\uff0c\u9002\u5408\u60f3\u5feb\u901f\u751f\u6210\u8bed\u97f3\u7684\u4eba\u6216\u5f00\u53d1\u8005\u3002\u9879\u76ee\u5df2\u6709\u7a33\u5b9a\u7248\u672c\uff0c\u529f\u80fd\u5b9e\u7528\uff0c\u5b89\u88c5\u540e\u5373\u53ef\u4e0a\u624b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-30157\" title=\"Text2Voice\uff1a\u57fa\u4e8e\u7845\u57fa\u6d41\u52a8API\u7684\u6587\u672c\u8f6c\u8bed\u97f3\u56fe\u5f62\u754c\u9762-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/cd6d3e5fa9975cd.png\" alt=\"Text2Voice\uff1a\u57fa\u4e8e\u7845\u57fa\u6d41\u52a8API\u7684\u6587\u672c\u8f6c\u8bed\u97f3\u56fe\u5f62\u754c\u9762-1\" width=\"676\" height=\"490\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/cd6d3e5fa9975cd.png 987w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/cd6d3e5fa9975cd-768x557.png 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/04\/cd6d3e5fa9975cd-18x12.png 18w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u901a\u8fc7\u56fe\u5f62\u754c\u9762\u5c06\u4e2d\u6587\u3001\u82f1\u6587\u7b49\u591a\u8bed\u8a00\u6587\u672c\u8f6c\u4e3a\u8bed\u97f3\u3002<\/li>\n<li>\u63d0\u4f9b\u591a\u79cd\u8bed\u97f3\u97f3\u8272\u9009\u62e9\u3002<\/li>\n<li>\u652f\u6301\u5b9e\u65f6\u97f3\u9891\u64ad\u653e\u63a7\u5236\uff0c\u5305\u62ec\u64ad\u653e\u3001\u6682\u505c\u548c\u505c\u6b62\u3002<\/li>\n<li>\u663e\u793a\u7b80\u6d01\u7f8e\u89c2\u7684\u56fe\u5f62\u64cd\u4f5c\u7a97\u53e3\u3002<\/li>\n<li>\u81ea\u52a8\u7ba1\u7406\u751f\u6210\u7684\u97f3\u9891\u6587\u4ef6\u3002<\/li>\n<li>\u652f\u6301\u957f\u6587\u672c\u5206\u6bb5\u8f6c\u4e3a\u8bed\u97f3\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<p>Text2Voice \u4f9d\u8d56 Python \u548c\u7845\u57fa\u6d41\u52a8 API\uff0c\u4f7f\u7528\u524d\u9700\u8981\u5b89\u88c5\u73af\u5883\u5e76\u914d\u7f6e\u5bc6\u94a5\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff0c\u5e2e\u52a9\u4f60\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<ol>\n<li><strong>\u51c6\u5907\u7cfb\u7edf\u73af\u5883<\/strong><br \/>\n\u786e\u4fdd\u7535\u8111\u6ee1\u8db3\u8981\u6c42\uff1aWindows\u3001macOS \u6216 Linux \u7cfb\u7edf\uff0c2GB \u4ee5\u4e0a\u5185\u5b58\uff0c\u7a33\u5b9a\u7684\u7f51\u7edc\u8fde\u63a5\u3002<\/p>\n<ul>\n<li>\u5b89\u88c5 Python\uff1a\u8bbf\u95ee\u00a0<code>https:\/\/www.python.org\/<\/code>\uff0c\u4e0b\u8f7d 3.8 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u5b89\u88c5\u65f6\u52fe\u9009\u201cAdd Python to PATH\u201d\u3002<\/li>\n<li>\u5b89\u88c5 Git\uff1a\u8bbf\u95ee\u00a0<code>https:\/\/git-scm.com\/<\/code>\uff0c\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u4e0b\u8f7d\u9879\u76ee\u4ee3\u7801<\/strong><br \/>\n\u6253\u5f00\u7ec8\u7aef\uff08Windows \u7528 CMD\uff0cMac\/Linux \u7528 Terminal\uff09\uff0c\u8fd0\u884c\uff1a<\/li>\n<\/ol>\n<pre><code>git clone https:\/\/github.com\/axdlee\/text2voice.git\r\n<\/code><\/pre>\n<p>\u7136\u540e\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n<pre><code>cd text2voice\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li><strong>\u8bbe\u7f6e\u865a\u62df\u73af\u5883\uff08\u63a8\u8350\uff09<\/strong><br \/>\n\u521b\u5efa\u5e76\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff0c\u907f\u514d\u4f9d\u8d56\u51b2\u7a81\uff1a<\/li>\n<\/ol>\n<pre><code>python -m venv venv\r\n<\/code><\/pre>\n<ul>\n<li>Windows:\n<pre><code>venv\\Scripts\\activate\r\n<\/code><\/pre>\n<\/li>\n<li>Mac\/Linux:\n<pre><code>source venv\/bin\/activate\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<ol start=\"4\">\n<li><strong>\u5b89\u88c5\u4f9d\u8d56<\/strong><br \/>\n\u9879\u76ee\u4f9d\u8d56\u5217\u5728\u00a0<code>requirements.txt<\/code>\u00a0\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/li>\n<\/ol>\n<pre><code>pip install -r requirements.txt\r\n<\/code><\/pre>\n<p>\u8fd9\u4f1a\u5b89\u88c5 PyQt6\u3001Requests\u3001Pygame \u7b49\u5fc5\u8981\u5e93\u3002<\/p>\n<ol start=\"5\">\n<li><strong>\u914d\u7f6e API \u5bc6\u94a5<\/strong><br \/>\n\u5728\u9879\u76ee\u6839\u76ee\u5f55\u521b\u5efa\u00a0<code>.env<\/code>\u00a0\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/li>\n<\/ol>\n<pre><code>SILICON_API_KEY=\u4f60\u7684API\u5bc6\u94a5\r\n<\/code><\/pre>\n<p>API \u5bc6\u94a5\u9700\u4ece\u7845\u57fa\u6d41\u52a8\u5b98\u7f51\u83b7\u53d6\uff0c\u586b\u5165\u540e\u4fdd\u5b58\u3002<\/p>\n<ol start=\"6\">\n<li><strong>\u8fd0\u884c\u7a0b\u5e8f<\/strong><br \/>\n\u5728\u7ec8\u7aef\u8f93\u5165\uff1a<\/li>\n<\/ol>\n<pre><code>python main.py\r\n<\/code><\/pre>\n<p>\u7a0b\u5e8f\u542f\u52a8\u540e\uff0c\u4f1a\u51fa\u73b0\u56fe\u5f62\u754c\u9762\u3002<\/p>\n<h3>\u5982\u4f55\u4f7f\u7528\u4e3b\u8981\u529f\u80fd<\/h3>\n<ol>\n<li><strong>\u542f\u52a8\u56fe\u5f62\u754c\u9762<\/strong><br \/>\n\u8fd0\u884c\u00a0<code>python main.py<\/code>\u00a0\u540e\uff0c\u4f1a\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\uff0c\u91cc\u9762\u6709\u6587\u672c\u8f93\u5165\u6846\u548c\u63a7\u5236\u6309\u94ae\u3002<\/li>\n<li><strong>\u8bbe\u7f6e API \u5bc6\u94a5<\/strong><br \/>\n\u70b9\u51fb\u754c\u9762\u4e0a\u7684\u201c\u8bbe\u7f6e\u201d\u6309\u94ae\uff0c\u8f93\u5165\u00a0<code>.env<\/code>\u00a0\u6587\u4ef6\u4e2d\u7684\u7845\u57fa\u6d41\u52a8 API \u5bc6\u94a5\uff0c\u4fdd\u5b58\u8bbe\u7f6e\u3002<\/li>\n<li><strong>\u8f93\u5165\u6587\u672c<\/strong><br \/>\n\u5728\u6587\u672c\u6846\u4e2d\u8f93\u5165\u6216\u7c98\u8d34\u60f3\u8f6c\u4e3a\u8bed\u97f3\u7684\u6587\u5b57\uff0c\u6bd4\u5982\u201c\u4f60\u597d\uff0c\u8fd9\u662f\u4e00\u4e2a\u6d4b\u8bd5\u201d\u3002<\/li>\n<li><strong>\u9009\u62e9\u97f3\u8272<\/strong><br \/>\n\u4ece\u4e0b\u62c9\u83dc\u5355\u4e2d\u6311\u9009\u8bed\u97f3\u97f3\u8272\uff0c\u6bd4\u5982\u7537\u58f0\u6216\u5973\u58f0\uff08\u5177\u4f53\u9009\u9879\u7531 API \u51b3\u5b9a\uff09\u3002<\/li>\n<li><strong>\u8f6c\u4e3a\u8bed\u97f3<\/strong><br \/>\n\u70b9\u51fb\u201c\u8f6c\u6362\u4e3a\u8bed\u97f3\u201d\u6309\u94ae\uff0c\u7a0b\u5e8f\u4f1a\u901a\u8fc7\u7845\u57fa\u6d41\u52a8 API \u5904\u7406\u6587\u672c\uff0c\u751f\u6210\u97f3\u9891\u3002<\/li>\n<li><strong>\u64ad\u653e\u97f3\u9891<\/strong><br \/>\n\u8f6c\u6362\u5b8c\u6210\u540e\uff0c\u7528\u754c\u9762\u4e0a\u7684\u201c\u64ad\u653e\u201d\u6309\u94ae\u542c\u97f3\u9891\uff0c\u53ef\u4ee5\u7528\u201c\u6682\u505c\u201d\u6216\u201c\u505c\u6b62\u201d\u63a7\u5236\u3002<\/li>\n<\/ol>\n<h3>\u7279\u8272\u529f\u80fd\u64cd\u4f5c\u6d41\u7a0b<\/h3>\n<ul>\n<li><strong>\u57fa\u4e8e\u56fe\u5f62\u754c\u9762\u7684\u957f\u6587\u672c\u5206\u6bb5\u8f6c\u6362<\/strong><br \/>\n\u5982\u679c\u6587\u672c\u8d85\u8fc7 5000 \u5b57\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u5206\u6bb5\u5904\u7406\u3002\u76f4\u63a5\u5728\u754c\u9762\u8f93\u5165\u5b8c\u6574\u6587\u672c\uff0c\u70b9\u51fb\u201c\u8f6c\u6362\u4e3a\u8bed\u97f3\u201d\uff0c\u7a0b\u5e8f\u4f1a\u9010\u6bb5\u751f\u6210\u97f3\u9891\u3002\u4f60\u53ef\u4ee5\u7528\u64ad\u653e\u6309\u94ae\u542c\u6bcf\u6bb5\u5185\u5bb9\u3002<\/li>\n<li><strong>\u97f3\u9891\u6587\u4ef6\u7ba1\u7406<\/strong><br \/>\n\u751f\u6210\u7684\u97f3\u9891\u4e34\u65f6\u5b58\u653e\u5728\u00a0<code>temp<\/code>\u00a0\u6587\u4ef6\u5939\u3002\u7a0b\u5e8f\u9000\u51fa\u65f6\uff0c\u8fd9\u4e9b\u6587\u4ef6\u4f1a\u81ea\u52a8\u5220\u9664\u3002\u5982\u679c\u60f3\u4fdd\u5b58\uff0c\u53ef\u4ee5\u5728\u9000\u51fa\u524d\u624b\u52a8\u79fb\u5230\u5176\u4ed6\u5730\u65b9\u3002<\/li>\n<li><strong>\u5b9e\u65f6\u64ad\u653e\u63a7\u5236<\/strong><br \/>\n\u8f6c\u6362\u540e\u7684\u97f3\u9891\u652f\u6301\u5b9e\u65f6\u64cd\u4f5c\u3002\u70b9\u51fb\u201c\u64ad\u653e\u201d\u5f00\u59cb\u542c\uff0c\u968f\u65f6\u201c\u6682\u505c\u201d\u6216\u201c\u505c\u6b62\u201d\uff0c\u64cd\u4f5c\u90fd\u5728\u56fe\u5f62\u754c\u9762\u5b8c\u6210\u3002<\/li>\n<\/ul>\n<h3>\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li>\u7f51\u7edc\u8981\u7a33\u5b9a\uff0c\u56e0\u4e3a\u529f\u80fd\u4f9d\u8d56\u7845\u57fa\u6d41\u52a8 API\u3002<\/li>\n<li>\u5355\u6b21\u8f6c\u6362\u5efa\u8bae\u4e0d\u8d85\u8fc7 5000 \u5b57\uff0c\u907f\u514d API \u51fa\u9519\u3002<\/li>\n<li>API \u5bc6\u94a5\u8981\u4fdd\u5bc6\uff0c\u4e0d\u8981\u516c\u5f00\u5206\u4eab\u3002<\/li>\n<li>\u5982\u679c\u754c\u9762\u6ca1\u53cd\u5e94\uff0c\u68c0\u67e5\u5bc6\u94a5\u3001\u7f51\u7edc\u548c\u4f9d\u8d56\u662f\u5426\u6b63\u786e\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4f60\u5c31\u80fd\u7528 Text2Voice \u7684\u56fe\u5f62\u754c\u9762\u628a\u6587\u672c\u8f6c\u4e3a\u8bed\u97f3\u3002\u5f00\u53d1\u8005\u8fd8\u53ef\u4ee5\u4fee\u6539\u4ee3\u7801\uff0c\u8c03\u6574\u754c\u9762\u6216\u529f\u80fd\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u5e94\u7528\u573a\u666f<\/h2>\n<ol>\n<li><strong>\u6559\u80b2\u8f85\u52a9<\/strong><br \/>\n\u7528\u56fe\u5f62\u754c\u9762\u628a\u8bfe\u6587\u8f6c\u4e3a\u8bed\u97f3\uff0c\u65b9\u4fbf\u542c\u529b\u5b66\u4e60\u3002<\/li>\n<li><strong>\u5185\u5bb9\u5236\u4f5c<\/strong><br \/>\n\u4e3a\u89c6\u9891\u6216\u64ad\u5ba2\u751f\u6210\u8bed\u97f3\uff0c\u64cd\u4f5c\u7b80\u5355\uff0c\u8282\u7701\u65f6\u95f4\u3002<\/li>\n<li><strong>\u65e0\u969c\u788d\u652f\u6301<\/strong><br \/>\n\u901a\u8fc7\u754c\u9762\u5c06\u6587\u5b57\u8f6c\u4e3a\u8bed\u97f3\uff0c\u5e2e\u52a9\u89c6\u969c\u4eba\u58eb\u83b7\u53d6\u4fe1\u606f\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>QA<\/h2>\n<ol>\n<li><strong>\u652f\u6301\u54ea\u4e9b\u8bed\u8a00\uff1f<\/strong><br \/>\n\u652f\u6301\u4e2d\u6587\u3001\u82f1\u6587\u7b49\u591a\u79cd\u8bed\u8a00\uff0c\u5177\u4f53\u7531\u7845\u57fa\u6d41\u52a8 API \u51b3\u5b9a\u3002<\/li>\n<li><strong>\u4e3a\u4ec0\u4e48\u754c\u9762\u6ca1\u53cd\u5e94\uff1f<\/strong><br \/>\n\u53ef\u80fd\u662f API \u5bc6\u94a5\u9519\u8bef\u3001\u7f51\u7edc\u95ee\u9898\u6216\u4f9d\u8d56\u6ca1\u88c5\u597d\u3002\u68c0\u67e5\u540e\u91cd\u8bd5\u3002<\/li>\n<li><strong>\u97f3\u9891\u6587\u4ef6\u5b58\u54ea\u91cc\uff1f<\/strong><br \/>\n\u4e34\u65f6\u4fdd\u5b58\u5728\u00a0<code>temp<\/code>\u00a0\u6587\u4ef6\u5939\uff0c\u7a0b\u5e8f\u5173\u95ed\u540e\u81ea\u52a8\u6e05\u7406\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Text2Voice \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u57fa\u4e8e\u7845\u57fa\u6d41\u52a8 API \u63d0\u4f9b\u6587\u672c\u8f6c\u8bed\u97f3\u529f\u80fd\uff0c\u6700\u5927\u7684\u7279\u70b9\u662f\u5e26\u6709\u7b80\u6d01\u7684\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u3002\u5b83\u7531\u5f00\u53d1\u8005 Sheldon Lee \u5728 GitHub \u4e0a\u521b\u5efa\uff0c\u8ba9\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u754c\u9762\u8f7b\u677e\u628a\u6587\u5b57\u53d8\u6210\u8bed\u97f3\u3002\u9879\u76ee\u4f7f\u7528 Py&#8230;<\/p>\n","protected":false},"author":1,"featured_media":32782,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,416,479],"tags":[230,215],"class_list":["post-29941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","category-ai-audio","category-text-to-speech","tag-aikaiyuanxiangmu","tag-aiwenbenzhuanyuyin"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/29941","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=29941"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/29941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/32782"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=29941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=29941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=29941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}