{"id":59760,"date":"2026-01-14T12:50:21","date_gmt":"2026-01-14T04:50:21","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/59760.html"},"modified":"2026-01-14T12:50:21","modified_gmt":"2026-01-14T04:50:21","slug":"%e8%83%bd%e5%90%a6%e7%a6%bb%e7%ba%bf%e4%bd%bf%e7%94%a8%ef%bc%9f%e5%ae%8c%e5%85%a8%e6%94%af%e6%8c%81%e5%86%85%e7%bd%91%e9%83%a8%e7%bd%b2%ef%bc%8c%e6%97%a0%e9%9c%80%e8%bf%9e%e6%8e%a5%e5%a4%96%e9%83%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/59760.html","title":{"rendered":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668"},"content":{"rendered":"<h2>\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528&#xff1f;\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72&#xff0c;\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668<\/h2>\n<h3>&#x1f399;\ufe0f Sambert-HifiGan \u4e2d\u6587\u591a\u60c5\u611f\u8bed\u97f3\u5408\u6210\u670d\u52a1 (WebUI &#043; API)<\/h3>\n<h4>&#x1f4d6; \u9879\u76ee\u7b80\u4ecb<\/h4>\n<p>\u5728\u667a\u80fd\u8bed\u97f3\u4ea4\u4e92\u3001\u6709\u58f0\u5185\u5bb9\u751f\u6210\u3001\u8f85\u52a9\u9605\u8bfb\u7b49\u573a\u666f\u4e2d&#xff0c;\u9ad8\u8d28\u91cf\u7684\u4e2d\u6587\u8bed\u97f3\u5408\u6210&#xff08;TTS&#xff09;\u80fd\u529b\u6b63\u53d8\u5f97\u4e0d\u53ef\u6216\u7f3a\u3002\u7136\u800c&#xff0c;\u8bb8\u591a\u73b0\u6210\u7684\u8bed\u97f3\u5408\u6210\u670d\u52a1\u4f9d\u8d56\u4e91\u7aefAPI&#xff0c;\u5b58\u5728\u6570\u636e\u5916\u6cc4\u98ce\u9669\u3001\u7f51\u7edc\u5ef6\u8fdf\u9ad8\u3001\u65e0\u6cd5\u79bb\u7ebf\u4f7f\u7528\u7b49\u95ee\u9898\u3002\u4e3a\u6b64&#xff0c;\u6211\u4eec\u63a8\u51fa\u57fa\u4e8e ModelScope \u7684 Sambert-Hifigan \u591a\u60c5\u611f\u4e2d\u6587\u8bed\u97f3\u5408\u6210\u6a21\u578b \u7684\u672c\u5730\u5316\u90e8\u7f72\u89e3\u51b3\u65b9\u6848\u2014\u2014\u5b8c\u5168\u652f\u6301\u5185\u7f51\u8fd0\u884c&#xff0c;\u65e0\u9700\u8054\u7f51&#xff0c;\u4e0d\u8c03\u7528\u4efb\u4f55\u5916\u90e8\u670d\u52a1\u5668\u3002<\/p>\n<p>\u672c\u9879\u76ee\u5c01\u88c5\u4e86 ModelScope \u5e73\u53f0\u4e0a\u7684\u7ecf\u5178 Sambert-Hifigan&#xff08;\u4e2d\u6587\u591a\u60c5\u611f&#xff09; \u6a21\u578b&#xff0c;\u7ed3\u5408 Flask \u6784\u5efa\u4e86\u8f7b\u91cf\u7ea7 Web \u670d\u52a1&#xff0c;\u96c6\u6210\u53ef\u89c6\u5316\u754c\u9762\u4e0e\u6807\u51c6 HTTP API&#xff0c;\u5b9e\u73b0\u201c\u5f00\u7bb1\u5373\u7528\u201d\u7684\u672c\u5730\u8bed\u97f3\u5408\u6210\u80fd\u529b\u3002\u65e0\u8bba\u662f\u4f01\u4e1a\u5185\u90e8\u7cfb\u7edf\u96c6\u6210\u3001\u6559\u80b2\u4ea7\u54c1\u5d4c\u5165&#xff0c;\u8fd8\u662f\u9690\u79c1\u654f\u611f\u573a\u666f\u4e0b\u7684\u8bed\u97f3\u64ad\u62a5&#xff0c;\u5747\u53ef\u5b89\u5168\u3001\u9ad8\u6548\u5730\u8fd0\u884c\u4e8e\u9694\u79bb\u7f51\u7edc\u73af\u5883\u3002<\/p>\n<p>&#x1f4a1; \u6838\u5fc3\u4eae\u70b9&#xff1a;<br \/>\n&#8211; 100% \u79bb\u7ebf\u8fd0\u884c&#xff1a;\u6240\u6709\u6a21\u578b\u4e0e\u4f9d\u8d56\u5747\u6253\u5305\u5728\u955c\u50cf\u4e2d&#xff0c;\u65e0\u9700\u8bbf\u95ee\u4e92\u8054\u7f51\u3002<br \/>\n&#8211; \u591a\u60c5\u611f\u8868\u8fbe&#xff1a;\u652f\u6301\u559c\u3001\u6012\u3001\u54c0\u3001\u5e73\u7b49\u591a\u79cd\u8bed\u8c03&#xff0c;\u63d0\u5347\u8bed\u97f3\u81ea\u7136\u5ea6\u4e0e\u8868\u73b0\u529b\u3002<br \/>\n&#8211; \u53cc\u6a21\u8f93\u51fa&#xff1a;\u63d0\u4f9b\u56fe\u5f62\u5316 WebUI \u548c RESTful API \u63a5\u53e3&#xff0c;\u6ee1\u8db3\u5f00\u53d1\u4e0e\u6f14\u793a\u53cc\u91cd\u9700\u6c42\u3002<br \/>\n&#8211; \u73af\u5883\u7eaf\u51c0\u7a33\u5b9a&#xff1a;\u5df2\u4fee\u590d datasets(2.13.0)\u3001numpy(1.23.5) \u4e0e scipy(&lt;1.13) \u7684\u7248\u672c\u51b2\u7a81\u95ee\u9898&#xff0c;\u675c\u7edd\u5e38\u89c1\u62a5\u9519\u3002<br \/>\n&#8211; CPU \u53cb\u597d\u4f18\u5316&#xff1a;\u65e0\u9700 GPU \u5373\u53ef\u6d41\u7545\u63a8\u7406&#xff0c;\u9002\u7528\u4e8e\u666e\u901a\u670d\u52a1\u5668\u6216\u8fb9\u7f18\u8bbe\u5907\u3002<\/p>\n<hr \/>\n<h3>&#x1f50d; \u6280\u672f\u539f\u7406&#xff1a;Sambert-Hifigan \u662f\u5982\u4f55\u5de5\u4f5c\u7684&#xff1f;<\/h3>\n<p>\u8981\u7406\u89e3\u4e3a\u4f55\u8be5\u65b9\u6848\u80fd\u5b9e\u73b0\u9ad8\u8d28\u91cf\u4e14\u53ef\u672c\u5730\u90e8\u7f72\u7684\u8bed\u97f3\u5408\u6210&#xff0c;\u9700\u6df1\u5165\u5176\u6280\u672f\u67b6\u6784\u3002Sambert-Hifigan \u5b9e\u9645\u4e0a\u662f\u4e24\u4e2a\u5173\u952e\u6a21\u578b\u7684\u7ea7\u8054\u7ec4\u5408&#xff1a;Sambert&#xff08;\u6587\u672c\u5230\u6885\u5c14\u8c31&#xff09; \u4e0e Hifigan&#xff08;\u6885\u5c14\u8c31\u5230\u6ce2\u5f62&#xff09;\u3002<\/p>\n<h4>1. Sambert&#xff1a;\u8bed\u4e49\u5230\u58f0\u5b66\u7279\u5f81\u7684\u6620\u5c04<\/h4>\n<p>Sambert \u662f\u4e00\u79cd\u57fa\u4e8e Transformer \u7ed3\u6784\u7684\u7aef\u5230\u7aef\u8bed\u97f3\u5408\u6210\u6a21\u578b&#xff0c;\u5168\u79f0\u4e3a Semantic-Aware Non-Attentive Background for End-to-End Text-to-Speech Synthesis\u3002\u5b83\u8d1f\u8d23\u5c06\u8f93\u5165\u6587\u672c\u8f6c\u6362\u4e3a\u4e2d\u95f4\u58f0\u5b66\u8868\u793a\u2014\u2014\u6885\u5c14\u9891\u8c31\u56fe&#xff08;Mel-spectrogram&#xff09;\u3002<\/p>\n<p>\u5176\u6838\u5fc3\u4f18\u52bf\u5728\u4e8e&#xff1a;<br \/>\n&#8211; \u975e\u6ce8\u610f\u529b\u673a\u5236&#xff08;Non-Attentive&#xff09;&#xff1a;\u907f\u514d\u4f20\u7edf Tacotron \u7c7b\u6a21\u578b\u56e0\u6ce8\u610f\u529b\u5bf9\u9f50\u5931\u8d25\u5bfc\u81f4\u7684\u91cd\u590d\u53d1\u97f3\u6216\u8df3\u5b57\u95ee\u9898\u3002<br \/>\n&#8211; \u8bed\u4e49\u611f\u77e5\u5efa\u6a21&#xff1a;\u901a\u8fc7\u663e\u5f0f\u5efa\u6a21\u97f3\u7d20\u6301\u7eed\u65f6\u95f4\u548c\u97f5\u5f8b\u8fb9\u754c&#xff0c;\u589e\u5f3a\u8bed\u97f3\u8282\u594f\u611f\u3002<br \/>\n&#8211; \u591a\u60c5\u611f\u63a7\u5236&#xff1a;\u652f\u6301\u901a\u8fc7\u60c5\u611f\u6807\u7b7e&#xff08;emotion token&#xff09;\u8c03\u8282\u8f93\u51fa\u8bed\u97f3\u7684\u60c5\u611f\u8272\u5f69&#xff0c;\u5982\u6b22\u5feb\u3001\u60b2\u4f24\u3001\u6124\u6012\u7b49\u3002<\/p>\n<p># \u793a\u4f8b&#xff1a;Sambert \u6a21\u578b\u524d\u5411\u8fc7\u7a0b&#xff08;\u7b80\u5316\u7248&#xff09;<br \/>\ndef sambert_forward(text_input, emotion_label):<br \/>\n    # \u6587\u672c\u7f16\u7801<br \/>\n    text_emb &#061; self.phoneme_encoder(text_input)<br \/>\n    # \u52a0\u5165\u60c5\u611f\u5d4c\u5165<br \/>\n    emotion_emb &#061; self.emotion_embedding(emotion_label)<br \/>\n    combined_emb &#061; text_emb &#043; emotion_emb<br \/>\n    # \u751f\u6210\u6885\u5c14\u8c31\u4e0e\u6301\u7eed\u65f6\u95f4<br \/>\n    mel_output, duration &#061; self.decoder(combined_emb)<br \/>\n    return mel_output<\/p>\n<h4>2. Hifigan&#xff1a;\u9ad8\u8d28\u91cf\u6ce2\u5f62\u8fd8\u539f<\/h4>\n<p>Hifigan \u662f\u4e00\u79cd\u751f\u6210\u5bf9\u6297\u7f51\u7edc&#xff08;GAN&#xff09;\u7ed3\u6784\u7684\u58f0\u7801\u5668&#xff0c;\u4e13\u7528\u4e8e\u4ece\u6885\u5c14\u9891\u8c31\u56fe\u91cd\u5efa\u9ad8\u4fdd\u771f\u97f3\u9891\u6ce2\u5f62\u3002\u76f8\u6bd4\u4f20\u7edf\u7684 Griffin-Lim \u6216 WaveNet&#xff0c;Hifigan \u5728\u97f3\u8d28\u548c\u63a8\u7406\u901f\u5ea6\u4e4b\u95f4\u53d6\u5f97\u4e86\u6781\u4f73\u5e73\u8861\u3002<\/p>\n<p>\u5176\u8bbe\u8ba1\u7279\u70b9\u5305\u62ec&#xff1a;<br \/>\n&#8211; \u591a\u5468\u671f\u5224\u522b\u5668&#xff08;MPD&#xff09; &#043; \u591a\u5c3a\u5ea6\u5224\u522b\u5668&#xff08;MSD&#xff09;&#xff1a;\u63d0\u5347\u7ec6\u8282\u771f\u5b9e\u611f\u3002<br \/>\n&#8211; \u9006\u77ed\u65f6\u5085\u91cc\u53f6\u53d8\u6362&#xff08;iSTFT&#xff09;\u5c42&#xff1a;\u76f4\u63a5\u5728\u7f51\u7edc\u4e2d\u5b8c\u6210\u9891\u57df\u5230\u65f6\u57df\u7684\u8f6c\u6362&#xff0c;\u7aef\u5230\u7aef\u8bad\u7ec3\u3002<br \/>\n&#8211; \u8f7b\u91cf\u5316\u8bbe\u8ba1&#xff1a;\u9002\u5408 CPU \u63a8\u7406&#xff0c;\u5355\u53e5\u5408\u6210\u65f6\u95f4\u63a7\u5236\u5728 1 \u79d2\u4ee5\u5185\u3002<\/p>\n<p>\u2705 \u4e3a\u4ec0\u4e48\u9009\u62e9 Sambert-Hifigan \u7ec4\u5408&#xff1f;<br \/>\n&#8211; \u97f3\u8d28\u63a5\u8fd1\u771f\u4eba\u5f55\u97f3&#xff0c;\u5c24\u5176\u5728\u4e2d\u6587\u8bed\u5883\u4e0b\u8868\u73b0\u4f18\u5f02\u3002<br \/>\n&#8211; \u6a21\u578b\u4f53\u79ef\u9002\u4e2d&#xff08;\u5408\u8ba1\u7ea6 600MB&#xff09;&#xff0c;\u4fbf\u4e8e\u6253\u5305\u90e8\u7f72\u3002<br \/>\n&#8211; \u652f\u6301\u7ec6\u7c92\u5ea6\u63a7\u5236&#xff08;\u5982\u8bed\u901f\u3001\u97f3\u8c03\u3001\u60c5\u611f&#xff09;&#xff0c;\u7075\u6d3b\u6027\u5f3a\u3002<\/p>\n<hr \/>\n<h3>&#x1f6e0;\ufe0f \u5de5\u7a0b\u5b9e\u8df5&#xff1a;\u5982\u4f55\u6784\u5efa\u4e00\u4e2a\u53ef\u5185\u7f51\u8fd0\u884c\u7684 TTS \u670d\u52a1&#xff1f;<\/h3>\n<p>\u6211\u4eec\u5c06\u6574\u4e2a\u670d\u52a1\u5c01\u88c5\u4e3a Docker \u955c\u50cf&#xff0c;\u786e\u4fdd\u8de8\u5e73\u53f0\u4e00\u81f4\u6027\u4e0e\u90e8\u7f72\u4fbf\u6377\u6027\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u5de5\u7a0b\u5b9e\u73b0\u6b65\u9aa4\u3002<\/p>\n<h4>1. \u73af\u5883\u4f9d\u8d56\u7ba1\u7406&#xff1a;\u89e3\u51b3\u7248\u672c\u51b2\u7a81\u987d\u75be<\/h4>\n<p>\u539f\u59cb ModelScope \u6a21\u578b\u4f9d\u8d56 transformers\u3001datasets\u3001numpy \u7b49\u5e93&#xff0c;\u4f46\u5728\u5b9e\u9645\u8fd0\u884c\u4e2d\u5e38\u51fa\u73b0\u4ee5\u4e0b\u95ee\u9898&#xff1a;<\/p>\n<p>| \u95ee\u9898 | \u539f\u56e0 | \u89e3\u51b3\u65b9\u6848 |<br \/>\n|&#8212;&#8212;|&#8212;&#8212;|&#8212;&#8212;&#8212;-|<br \/>\n| TypeError: expected str, bytes or os.PathLike object, not NoneType | datasets&gt;&#061;2.14.0 \u4fee\u6539\u4e86\u7f13\u5b58\u8def\u5f84\u903b\u8f91 | \u9501\u5b9a datasets&#061;&#061;2.13.0 |<br \/>\n| AttributeError: module &#039;numpy&#039; has no attribute &#039;int&#039; | numpy&gt;&#061;1.24 \u79fb\u9664\u4e86\u65e7\u7c7b\u578b\u522b\u540d | \u56fa\u5b9a numpy&#061;&#061;1.23.5 |<br \/>\n| scipy.optimize.minimize \u62a5\u9519 | scipy&gt;&#061;1.13 \u66f4\u6539\u4e86\u90e8\u5206\u63a5\u53e3 | \u4f7f\u7528 &lt;1.13 \u7248\u672c |<\/p>\n<p>\u6700\u7ec8 requirements.txt \u5173\u952e\u6761\u76ee\u5982\u4e0b&#xff1a;<\/p>\n<p>numpy&#061;&#061;1.23.5<br \/>\nscipy&lt;1.13<br \/>\ntorch&#061;&#061;1.13.1<br \/>\ntransformers&#061;&#061;4.26.1<br \/>\ndatasets&#061;&#061;2.13.0<br \/>\nflask&#061;&#061;2.3.3<br \/>\ngunicorn&#061;&#061;21.2.0<\/p>\n<p>\u901a\u8fc7\u7cbe\u786e\u9501\u5b9a\u7248\u672c&#xff0c;\u5b9e\u73b0\u4e86 \u201c\u4e00\u6b21\u6784\u5efa&#xff0c;\u5904\u5904\u8fd0\u884c\u201d \u7684\u7a33\u5b9a\u6027\u4fdd\u969c\u3002<\/p>\n<h4>2. Flask WebUI \u8bbe\u8ba1&#xff1a;\u7b80\u6d01\u9ad8\u6548\u7684\u4ea4\u4e92\u4f53\u9a8c<\/h4>\n<p>\u524d\u7aef\u91c7\u7528 Bootstrap 5 \u6784\u5efa\u54cd\u5e94\u5f0f\u9875\u9762&#xff0c;\u540e\u7aef\u901a\u8fc7 Flask \u63d0\u4f9b \/tts \u63a5\u53e3\u5904\u7406\u8bf7\u6c42\u3002\u7528\u6237\u8f93\u5165\u6587\u672c\u540e&#xff0c;\u670d\u52a1\u81ea\u52a8\u5b8c\u6210\u5206\u8bcd\u3001\u60c5\u611f\u6807\u6ce8\u3001\u8bed\u97f3\u5408\u6210\u4e0e\u97f3\u9891\u8fd4\u56de\u3002<\/p>\n<h5>\u76ee\u5f55\u7ed3\u6784<\/h5>\n<p>\/sambert-hifigan-tts<br \/>\n\u251c\u2500\u2500 app.py                    # Flask \u4e3b\u7a0b\u5e8f<br \/>\n\u251c\u2500\u2500 static\/<br \/>\n\u2502   \u2514\u2500\u2500 style.css             # \u81ea\u5b9a\u4e49\u6837\u5f0f<br \/>\n\u251c\u2500\u2500 templates\/<br \/>\n\u2502   \u2514\u2500\u2500 index.html            # Web \u9875\u9762\u6a21\u677f<br \/>\n\u251c\u2500\u2500 models\/<br \/>\n\u2502   \u251c\u2500\u2500 sambert\/<br \/>\n\u2502   \u2514\u2500\u2500 hifigan\/              # \u9884\u52a0\u8f7d\u6a21\u578b<br \/>\n\u2514\u2500\u2500 core\/<br \/>\n    \u251c\u2500\u2500 tokenizer.py          # \u4e2d\u6587\u5206\u8bcd\u4e0e\u97f3\u7d20\u8f6c\u6362<br \/>\n    \u2514\u2500\u2500 synthesizer.py        # \u5408\u6210\u4e3b\u903b\u8f91<\/p>\n<h5>\u6838\u5fc3 Flask \u8def\u7531\u5b9e\u73b0<\/h5>\n<p># app.py<br \/>\nfrom flask import Flask, request, render_template, send_file<br \/>\nimport io<br \/>\nfrom core.synthesizer import Synthesizer<\/p>\n<p>app &#061; Flask(__name__)<br \/>\nsynthesizer &#061; Synthesizer()<\/p>\n<p>&#064;app.route(&#034;\/&#034;, methods&#061;[&#034;GET&#034;])<br \/>\ndef index():<br \/>\n    return render_template(&#034;index.html&#034;)<\/p>\n<p>&#064;app.route(&#034;\/tts&#034;, methods&#061;[&#034;POST&#034;])<br \/>\ndef tts():<br \/>\n    text &#061; request.form.get(&#034;text&#034;, &#034;&#034;).strip()<br \/>\n    emotion &#061; request.form.get(&#034;emotion&#034;, &#034;neutral&#034;)<\/p>\n<p>    if not text:<br \/>\n        return {&#034;error&#034;: &#034;\u6587\u672c\u4e0d\u80fd\u4e3a\u7a7a&#034;}, 400<\/p>\n<p>    try:<br \/>\n        audio_data &#061; synthesizer.text_to_speech(text, emotion&#061;emotion)<br \/>\n        byte_io &#061; io.BytesIO(audio_data)<br \/>\n        byte_io.seek(0)<br \/>\n        return send_file(<br \/>\n            byte_io,<br \/>\n            mimetype&#061;&#034;audio\/wav&#034;,<br \/>\n            as_attachment&#061;True,<br \/>\n            download_name&#061;&#034;speech.wav&#034;<br \/>\n        )<br \/>\n    except Exception as e:<br \/>\n        return {&#034;error&#034;: str(e)}, 500<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    app.run(host&#061;&#034;0.0.0.0&#034;, port&#061;5000)<\/p>\n<h5>\u524d\u7aef\u4ea4\u4e92\u903b\u8f91&#xff08;HTML &#043; JS&#xff09;<\/h5>\n<p>&lt;!&#8211; templates\/index.html &#8211;&gt;<br \/>\n&lt;form id&#061;&#034;ttsForm&#034;&gt;<br \/>\n  &lt;textarea name&#061;&#034;text&#034; placeholder&#061;&#034;\u8bf7\u8f93\u5165\u8981\u5408\u6210\u7684\u4e2d\u6587\u6587\u672c&#8230;&#034; required&gt;&lt;\/textarea&gt;<br \/>\n  &lt;select name&#061;&#034;emotion&#034;&gt;<br \/>\n    &lt;option value&#061;&#034;happy&#034;&gt;\u5f00\u5fc3&lt;\/option&gt;<br \/>\n    &lt;option value&#061;&#034;sad&#034;&gt;\u60b2\u4f24&lt;\/option&gt;<br \/>\n    &lt;option value&#061;&#034;angry&#034;&gt;\u6124\u6012&lt;\/option&gt;<br \/>\n    &lt;option value&#061;&#034;neutral&#034; selected&gt;\u5e73\u9759&lt;\/option&gt;<br \/>\n  &lt;\/select&gt;<br \/>\n  &lt;button type&#061;&#034;submit&#034;&gt;\u5f00\u59cb\u5408\u6210\u8bed\u97f3&lt;\/button&gt;<br \/>\n&lt;\/form&gt;<\/p>\n<p>&lt;audio id&#061;&#034;player&#034; controls&gt;&lt;\/audio&gt;<\/p>\n<p>&lt;script&gt;<br \/>\ndocument.getElementById(&#034;ttsForm&#034;).onsubmit &#061; async (e) &#061;&gt; {<br \/>\n  e.preventDefault();<br \/>\n  const formData &#061; new FormData(e.target);<\/p>\n<p>  const res &#061; await fetch(&#034;\/tts&#034;, {<br \/>\n    method: &#034;POST&#034;,<br \/>\n    body: formData<br \/>\n  });<\/p>\n<p>  if (res.ok) {<br \/>\n    const blob &#061; await res.blob();<br \/>\n    const url &#061; URL.createObjectURL(blob);<br \/>\n    document.getElementById(&#034;player&#034;).src &#061; url;<br \/>\n  } else {<br \/>\n    alert(&#034;\u5408\u6210\u5931\u8d25&#xff1a;&#034; &#043; await res.text());<br \/>\n  }<br \/>\n};<br \/>\n&lt;\/script&gt;<\/p>\n<p>&#x1f4a1; \u4eae\u70b9\u8bf4\u660e&#xff1a;<br \/>\n&#8211; \u6240\u6709\u8d44\u6e90\u672c\u5730\u52a0\u8f7d&#xff0c;\u65e0 CDN \u4f9d\u8d56\u3002<br \/>\n&#8211; \u97f3\u9891\u901a\u8fc7 Blob URL \u5b9e\u73b0\u6d4f\u89c8\u5668\u5185\u5b9e\u65f6\u64ad\u653e\u3002<br \/>\n&#8211; \u652f\u6301\u957f\u6587\u672c\u81ea\u52a8\u5206\u6bb5\u5904\u7406&#xff0c;\u907f\u514d\u5185\u5b58\u6ea2\u51fa\u3002<\/p>\n<hr \/>\n<h3>&#x1f680; \u4f7f\u7528\u8bf4\u660e&#xff1a;\u4e09\u6b65\u542f\u52a8\u4f60\u7684\u672c\u5730\u8bed\u97f3\u670d\u52a1<\/h3>\n<h4>\u6b65\u9aa4 1&#xff1a;\u542f\u52a8\u5bb9\u5668<\/h4>\n<p>\u5047\u8bbe\u4f60\u5df2\u83b7\u53d6\u9884\u6784\u5efa\u7684 Docker \u955c\u50cf&#xff08;\u5982 tts-sambert-hifigan:latest&#xff09;&#xff0c;\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>docker run -d -p 5000:5000 &#8211;name tts-service tts-sambert-hifigan:latest<\/p>\n<p>\u5bb9\u5668\u542f\u52a8\u540e&#xff0c;Flask \u670d\u52a1\u5c06\u5728 http:\/\/localhost:5000 \u76d1\u542c\u8bf7\u6c42\u3002<\/p>\n<h4>\u6b65\u9aa4 2&#xff1a;\u8bbf\u95ee WebUI<\/h4>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8fdb\u5165\u670d\u52a1\u5730\u5740&#xff1a;<\/p>\n<p><img decoding=\"async\" alt=\"\u56fe\u7247\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114045020-6967208ccbfb8.png\" \/><\/p>\n<p>\u70b9\u51fb\u5e73\u53f0\u63d0\u4f9b\u7684 HTTP \u8bbf\u95ee\u6309\u94ae&#xff0c;\u5373\u53ef\u8fdb\u5165\u4ea4\u4e92\u754c\u9762\u3002<\/p>\n<h4>\u6b65\u9aa4 3&#xff1a;\u8f93\u5165\u6587\u672c\u5e76\u5408\u6210\u8bed\u97f3<\/h4>\n<li>\u5728\u6587\u672c\u6846\u4e2d\u8f93\u5165\u4efb\u610f\u4e2d\u6587\u5185\u5bb9&#xff08;\u4f8b\u5982&#xff1a;\u201c\u4eca\u5929\u5929\u6c14\u771f\u597d&#xff0c;\u9002\u5408\u51fa\u53bb\u6563\u6b65\u3002\u201d&#xff09;<\/li>\n<li>\u9009\u62e9\u60c5\u611f\u6a21\u5f0f&#xff08;\u5982\u201c\u5f00\u5fc3\u201d&#xff09;<\/li>\n<li>\u70b9\u51fb \u201c\u5f00\u59cb\u5408\u6210\u8bed\u97f3\u201d<\/li>\n<li>\u7b49\u5f85 1~3 \u79d2&#xff0c;\u97f3\u9891\u5c06\u81ea\u52a8\u64ad\u653e&#xff0c;\u5e76\u53ef\u70b9\u51fb\u4e0b\u8f7d .wav \u6587\u4ef6<\/li>\n<hr \/>\n<h3>&#x1f50c; API \u63a5\u53e3\u8c03\u7528&#xff1a;\u65e0\u7f1d\u96c6\u6210\u5230\u81ea\u6709\u7cfb\u7edf<\/h3>\n<p>\u9664 WebUI \u5916&#xff0c;\u8be5\u670d\u52a1\u8fd8\u63d0\u4f9b\u6807\u51c6 HTTP API&#xff0c;\u4fbf\u4e8e\u96c6\u6210\u81f3\u5176\u4ed6\u5e94\u7528\u3002<\/p>\n<h4>\u8bf7\u6c42\u65b9\u5f0f<\/h4>\n<p>POST \/tts<br \/>\nContent-Type: multipart\/form-data<\/p>\n<h4>\u53c2\u6570\u8bf4\u660e<\/h4>\n<p>| \u5b57\u6bb5 | \u7c7b\u578b | \u5fc5\u586b | \u8bf4\u660e |<br \/>\n|&#8212;&#8212;|&#8212;&#8212;|&#8212;&#8212;|&#8212;&#8212;|<br \/>\n| text | string | \u662f | \u8981\u5408\u6210\u7684\u4e2d\u6587\u6587\u672c&#xff08;UTF-8 \u7f16\u7801&#xff09; |<br \/>\n| emotion | string | \u5426 | \u60c5\u611f\u7c7b\u578b&#xff1a;happy, sad, angry, neutral&#xff08;\u9ed8\u8ba4&#xff09; |<\/p>\n<h4>\u8c03\u7528\u793a\u4f8b&#xff08;Python&#xff09;<\/h4>\n<p>import requests<\/p>\n<p>url &#061; &#034;http:\/\/localhost:5000\/tts&#034;<br \/>\ndata &#061; {<br \/>\n    &#034;text&#034;: &#034;\u6b22\u8fce\u4f7f\u7528\u672c\u5730\u8bed\u97f3\u5408\u6210\u670d\u52a1&#xff0c;\u73b0\u5728\u652f\u6301\u591a\u60c5\u611f\u8868\u8fbe\u4e86&#xff01;&#034;,<br \/>\n    &#034;emotion&#034;: &#034;happy&#034;<br \/>\n}<\/p>\n<p>response &#061; requests.post(url, data&#061;data)<\/p>\n<p>if response.status_code &#061;&#061; 200:<br \/>\n    with open(&#034;output.wav&#034;, &#034;wb&#034;) as f:<br \/>\n        f.write(response.content)<br \/>\n    print(&#034;\u8bed\u97f3\u5df2\u4fdd\u5b58\u4e3a output.wav&#034;)<br \/>\nelse:<br \/>\n    print(&#034;\u9519\u8bef:&#034;, response.json())<\/p>\n<h4>\u8fd4\u56de\u7ed3\u679c<\/h4>\n<ul>\n<li>\u6210\u529f&#xff1a;\u8fd4\u56de .wav \u97f3\u9891\u6587\u4ef6\u6d41&#xff0c;Content-Type \u4e3a audio\/wav<\/li>\n<li>\u5931\u8d25&#xff1a;\u8fd4\u56de JSON \u9519\u8bef\u4fe1\u606f&#xff0c;\u5982 {&#034;error&#034;: &#034;\u6587\u672c\u4e0d\u80fd\u4e3a\u7a7a&#034;}<\/li>\n<\/ul>\n<hr \/>\n<h3>\u2696\ufe0f \u5bf9\u6bd4\u5206\u6790&#xff1a;\u672c\u5730\u90e8\u7f72 vs \u4e91\u670d\u52a1<\/h3>\n<p>| \u7ef4\u5ea6 | \u672c\u5730\u90e8\u7f72&#xff08;\u672c\u65b9\u6848&#xff09; | \u516c\u6709\u4e91 TTS \u670d\u52a1 |<br \/>\n|&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n| \u6570\u636e\u5b89\u5168\u6027 | \u2705 \u5b8c\u5168\u79c1\u6709&#xff0c;\u6570\u636e\u4e0d\u51fa\u5185\u7f51 | \u274c \u6587\u672c\u4e0a\u4f20\u81f3\u7b2c\u4e09\u65b9\u670d\u52a1\u5668 |<br \/>\n| \u7f51\u7edc\u4f9d\u8d56 | \u274c \u65e0\u9700\u8054\u7f51 | \u2705 \u5fc5\u987b\u7a33\u5b9a\u7f51\u7edc |<br \/>\n| \u5ef6\u8fdf\u8868\u73b0 | \u2705 \u5c40\u57df\u7f51\u6beb\u79d2\u7ea7\u54cd\u5e94 | \u26a0\ufe0f \u53d7\u516c\u7f51\u5e26\u5bbd\u5f71\u54cd |<br \/>\n| \u6210\u672c\u63a7\u5236 | \u2705 \u4e00\u6b21\u6027\u90e8\u7f72&#xff0c;\u957f\u671f\u514d\u8d39 | \u2705 \u6309\u8c03\u7528\u91cf\u8ba1\u8d39 |<br \/>\n| \u5b9a\u5236\u80fd\u529b | \u2705 \u53ef\u4fee\u6539\u6a21\u578b\u3001\u6dfb\u52a0\u65b0\u97f3\u8272 | \u274c \u9ed1\u76d2\u670d\u52a1&#xff0c;\u6269\u5c55\u53d7\u9650 |<br \/>\n| \u7ef4\u62a4\u96be\u5ea6 | \u26a0\ufe0f \u9700\u4e00\u5b9a\u8fd0\u7ef4\u80fd\u529b | \u2705 \u5b8c\u5168\u6258\u7ba1 |<\/p>\n<p>&#x1f4cc; \u9009\u578b\u5efa\u8bae&#xff1a;<br \/>\n&#8211; \u82e5\u6d89\u53ca\u91d1\u878d\u3001\u533b\u7597\u3001\u653f\u52a1\u7b49\u654f\u611f\u9886\u57df \u2192 \u9996\u9009\u672c\u5730\u90e8\u7f72<br \/>\n&#8211; \u82e5\u8ffd\u6c42\u5feb\u901f\u4e0a\u7ebf\u3001\u4f4e\u7ef4\u62a4\u6210\u672c \u2192 \u53ef\u8003\u8651\u4e91\u670d\u52a1<br \/>\n&#8211; \u82e5\u9700\u591a\u8bed\u8a00\u3001\u591a\u65b9\u8a00\u652f\u6301 \u2192 \u53ef\u7ed3\u5408\u4e24\u8005\u6df7\u5408\u67b6\u6784<\/p>\n<hr \/>\n<h3>&#x1f9e9; \u5e94\u7528\u573a\u666f\u4e3e\u4f8b<\/h3>\n<li>\n<p>\u667a\u80fd\u5ba2\u670d\u64ad\u62a5\u7cfb\u7edf<br \/>\n   \u5728\u94f6\u884c ATM \u6216\u533b\u9662\u5bfc\u8bca\u673a\u4e2d&#xff0c;\u4f7f\u7528\u672c\u5730 TTS \u5b9e\u73b0\u8bed\u97f3\u63d0\u793a&#xff0c;\u907f\u514d\u56e0\u65ad\u7f51\u5bfc\u81f4\u670d\u52a1\u4e2d\u65ad\u3002<\/p>\n<\/li>\n<li>\n<p>\u65e0\u969c\u788d\u9605\u8bfb\u5de5\u5177<br \/>\n   \u4e3a\u89c6\u969c\u4eba\u58eb\u63d0\u4f9b\u79bb\u7ebf\u6717\u8bfb\u529f\u80fd&#xff0c;\u4fdd\u62a4\u4e2a\u4eba\u9605\u8bfb\u9690\u79c1\u3002<\/p>\n<\/li>\n<li>\n<p>\u6559\u80b2\u7c7b\u8f6f\u4ef6\u914d\u97f3<br \/>\n   \u5c06\u6559\u6750\u6587\u5b57\u81ea\u52a8\u8f6c\u4e3a\u5e26\u60c5\u611f\u7684\u8bed\u97f3\u8bb2\u89e3&#xff0c;\u63d0\u5347\u5b66\u4e60\u8da3\u5473\u6027\u3002<\/p>\n<\/li>\n<li>\n<p>\u5de5\u4e1a\u81ea\u52a8\u5316\u8bed\u97f3\u62a5\u8b66<br \/>\n   \u5728\u5de5\u5382\u63a7\u5236\u7cfb\u7edf\u4e2d&#xff0c;\u96c6\u6210\u5f02\u5e38\u72b6\u6001\u8bed\u97f3\u64ad\u62a5\u6a21\u5757&#xff0c;\u5b9e\u73b0\u5b9e\u65f6\u63d0\u9192\u3002<\/p>\n<\/li>\n<hr \/>\n<h3>&#x1f4ca; \u6027\u80fd\u6d4b\u8bd5\u6570\u636e&#xff08;Intel Xeon E5-2680 v4 &#064; 2.4GHz, 16GB RAM&#xff09;<\/h3>\n<p>| \u6587\u672c\u957f\u5ea6 | \u5e73\u5747\u5408\u6210\u65f6\u95f4 | \u8f93\u51fa\u91c7\u6837\u7387 | \u6587\u4ef6\u5927\u5c0f |<br \/>\n|&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;&#8212;&#8211;|&#8212;&#8212;&#8212;&#8212;|&#8212;&#8212;&#8212;-|<br \/>\n| 50 \u5b57 | 0.8s | 24kHz | ~120KB |<br \/>\n| 100 \u5b57 | 1.5s | 24kHz | ~230KB |<br \/>\n| 500 \u5b57 | 7.2s | 24kHz | ~1.1MB |<\/p>\n<p>\u2705 \u652f\u6301\u5e76\u53d1\u8bf7\u6c42&#xff08;Gunicorn &#043; 4 workers&#xff09;&#xff0c;QPS \u8fbe 8&#043;&#xff08;\u60c5\u611f\u6a21\u5f0f\u56fa\u5b9a&#xff09;<\/p>\n<hr \/>\n<h3>&#x1f3af; \u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae<\/h3>\n<h4>\u2705 \u672c\u6587\u6838\u5fc3\u4ef7\u503c\u603b\u7ed3<\/h4>\n<ul>\n<li>\u771f\u6b63\u79bb\u7ebf\u53ef\u7528&#xff1a;\u4ece\u6a21\u578b\u5230\u63a5\u53e3\u5168\u7a0b\u672c\u5730\u5316&#xff0c;\u5f7b\u5e95\u6446\u8131\u5bf9\u5916\u90e8\u670d\u52a1\u7684\u4f9d\u8d56\u3002<\/li>\n<li>\u591a\u60c5\u611f\u8868\u8fbe&#xff1a;\u7a81\u7834\u4f20\u7edf\u201c\u673a\u68b0\u97f3\u201d\u5c40\u9650&#xff0c;\u8ba9\u8bed\u97f3\u66f4\u5177\u4eba\u6027\u5316\u3002<\/li>\n<li>\u53cc\u901a\u9053\u670d\u52a1&#xff1a;WebUI \u4fbf\u4e8e\u6f14\u793a&#xff0c;API \u6613\u4e8e\u96c6\u6210&#xff0c;\u8986\u76d6\u5168\u573a\u666f\u9700\u6c42\u3002<\/li>\n<li>\u73af\u5883\u96f6\u62a5\u9519&#xff1a;\u6df1\u5ea6\u4fee\u590d\u4f9d\u8d56\u51b2\u7a81&#xff0c;\u6781\u5927\u964d\u4f4e\u90e8\u7f72\u95e8\u69db\u3002<\/li>\n<\/ul>\n<h4>&#x1f6e0;\ufe0f \u6700\u4f73\u5b9e\u8df5\u5efa\u8bae<\/h4>\n<li>\u751f\u4ea7\u73af\u5883\u63a8\u8350\u4f7f\u7528 Nginx &#043; Gunicorn \u66ff\u4ee3 Flask \u5185\u7f6e\u670d\u52a1\u5668&#xff0c;\u63d0\u5347\u5e76\u53d1\u80fd\u529b\u3002<\/li>\n<li>\u5b9a\u671f\u5907\u4efd\u6a21\u578b\u6587\u4ef6&#xff0c;\u9632\u6b62\u610f\u5916\u635f\u574f\u3002<\/li>\n<li>\u9650\u5236\u5355\u6b21\u8f93\u5165\u957f\u5ea6&#xff08;\u5efa\u8bae \u22641000 \u5b57&#xff09;&#xff0c;\u907f\u514d\u5185\u5b58\u5360\u7528\u8fc7\u9ad8\u3002<\/li>\n<li>\u53ef\u6269\u5c55\u65b9\u5411&#xff1a;\u52a0\u5165\u81ea\u5b9a\u4e49\u97f3\u8272\u8bad\u7ec3\u3001\u8bed\u901f\u8c03\u8282\u3001SSML \u63a7\u5236\u7b49\u529f\u80fd\u3002<\/li>\n<hr \/>\n<p>&#x1f4e2; \u7ed3\u8bed&#xff1a;<br \/>\n\u5728 AI \u6a21\u578b\u65e5\u76ca\u5f3a\u5927\u7684\u4eca\u5929&#xff0c;\u201c\u53ef\u63a7\u3001\u53ef\u89e3\u91ca\u3001\u53ef\u79c1\u6709\u5316\u201d \u7684\u672c\u5730\u5316\u90e8\u7f72\u65b9\u6848\u6b63\u6210\u4e3a\u4f01\u4e1a\u7ea7\u5e94\u7528\u7684\u521a\u9700\u3002Sambert-Hifigan \u4e2d\u6587\u591a\u60c5\u611f\u8bed\u97f3\u5408\u6210\u670d\u52a1&#xff0c;\u4e0d\u4ec5\u662f\u4e00\u5957\u6280\u672f\u5b9e\u73b0&#xff0c;\u66f4\u662f\u4e00\u79cd\u5bf9\u6570\u636e\u4e3b\u6743\u4e0e\u7528\u6237\u4f53\u9a8c\u7684\u5c0a\u91cd\u3002<br \/>\n\u65e0\u8bba\u4f60\u662f\u5f00\u53d1\u8005\u3001\u4ea7\u54c1\u7ecf\u7406\u8fd8\u662f\u7cfb\u7edf\u67b6\u6784\u5e08&#xff0c;\u90fd\u53ef\u4ee5\u57fa\u4e8e\u6b64\u65b9\u6848&#xff0c;\u5feb\u901f\u6784\u5efa\u5c5e\u4e8e\u81ea\u5df1\u7684\u5b89\u5168\u3001\u7a33\u5b9a\u3001\u667a\u80fd\u7684\u8bed\u97f3\u4ea4\u4e92\u7cfb\u7edf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528&#xff1f;\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72&#xff0c;\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668<br \/>\n&#x1f399;\ufe0f Sambert-HifiGan \u4e2d\u6587\u591a\u60c5\u611f\u8bed\u97f3\u5408\u6210\u670d\u52a1 (WebUI  API)<br \/>\n&#x1f4d6; \u9879\u76ee\u7b80\u4ecb<br \/>\n\u5728\u667a\u80fd\u8bed\u97f3\u4ea4\u4e92\u3001\u6709\u58f0\u5185\u5bb9\u751f\u6210\u3001\u8f85\u52a9\u9605\u8bfb\u7b49\u573a\u666f\u4e2d&#xff0c;\u9ad8\u8d28\u91cf\u7684\u4e2d\u6587\u8bed\u97f3\u5408\u6210&#xff08;TTS&#xff09;\u80fd\u529b\u6b63\u53d8\u5f97\u4e0d\u53ef\u6216\u7f3a\u3002\u7136\u800c&#xff0c;\u8bb8\u591a\u73b0\u6210\u7684\u8bed\u97f3\u5408\u6210\u670d\u52a1\u4f9d\u8d56\u4e91\u7aefAPI&#xff0c;\u5b58\u5728\u6570\u636e\u5916\u6cc4\u98ce\u9669\u3001\u7f51\u7edc\u5ef6\u8fdf\u9ad8\u3001\u65e0\u6cd5\u79bb\u7ebf\u4f7f\u7528\u7b49\u95ee\u9898\u3002\u4e3a\u6b64<\/p>\n","protected":false},"author":2,"featured_media":59759,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-59760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/59760.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528&#xff1f;\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72&#xff0c;\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 &#x1f399;\ufe0f Sambert-HifiGan \u4e2d\u6587\u591a\u60c5\u611f\u8bed\u97f3\u5408\u6210\u670d\u52a1 (WebUI API) &#x1f4d6; \u9879\u76ee\u7b80\u4ecb \u5728\u667a\u80fd\u8bed\u97f3\u4ea4\u4e92\u3001\u6709\u58f0\u5185\u5bb9\u751f\u6210\u3001\u8f85\u52a9\u9605\u8bfb\u7b49\u573a\u666f\u4e2d&#xff0c;\u9ad8\u8d28\u91cf\u7684\u4e2d\u6587\u8bed\u97f3\u5408\u6210&#xff08;TTS&#xff09;\u80fd\u529b\u6b63\u53d8\u5f97\u4e0d\u53ef\u6216\u7f3a\u3002\u7136\u800c&#xff0c;\u8bb8\u591a\u73b0\u6210\u7684\u8bed\u97f3\u5408\u6210\u670d\u52a1\u4f9d\u8d56\u4e91\u7aefAPI&#xff0c;\u5b58\u5728\u6570\u636e\u5916\u6cc4\u98ce\u9669\u3001\u7f51\u7edc\u5ef6\u8fdf\u9ad8\u3001\u65e0\u6cd5\u79bb\u7ebf\u4f7f\u7528\u7b49\u95ee\u9898\u3002\u4e3a\u6b64\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/59760.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-14T04:50:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114045020-6967208ccbfb8.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59760.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/59760.html\",\"name\":\"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-14T04:50:21+00:00\",\"dateModified\":\"2026-01-14T04:50:21+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/59760.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/59760.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59760.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/59760.html","og_locale":"zh_CN","og_type":"article","og_title":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528&#xff1f;\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72&#xff0c;\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 &#x1f399;\ufe0f Sambert-HifiGan \u4e2d\u6587\u591a\u60c5\u611f\u8bed\u97f3\u5408\u6210\u670d\u52a1 (WebUI API) &#x1f4d6; \u9879\u76ee\u7b80\u4ecb \u5728\u667a\u80fd\u8bed\u97f3\u4ea4\u4e92\u3001\u6709\u58f0\u5185\u5bb9\u751f\u6210\u3001\u8f85\u52a9\u9605\u8bfb\u7b49\u573a\u666f\u4e2d&#xff0c;\u9ad8\u8d28\u91cf\u7684\u4e2d\u6587\u8bed\u97f3\u5408\u6210&#xff08;TTS&#xff09;\u80fd\u529b\u6b63\u53d8\u5f97\u4e0d\u53ef\u6216\u7f3a\u3002\u7136\u800c&#xff0c;\u8bb8\u591a\u73b0\u6210\u7684\u8bed\u97f3\u5408\u6210\u670d\u52a1\u4f9d\u8d56\u4e91\u7aefAPI&#xff0c;\u5b58\u5728\u6570\u636e\u5916\u6cc4\u98ce\u9669\u3001\u7f51\u7edc\u5ef6\u8fdf\u9ad8\u3001\u65e0\u6cd5\u79bb\u7ebf\u4f7f\u7528\u7b49\u95ee\u9898\u3002\u4e3a\u6b64","og_url":"https:\/\/www.wsisp.com\/helps\/59760.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-14T04:50:21+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260114045020-6967208ccbfb8.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/59760.html","url":"https:\/\/www.wsisp.com\/helps\/59760.html","name":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-14T04:50:21+00:00","dateModified":"2026-01-14T04:50:21+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/59760.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/59760.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/59760.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u80fd\u5426\u79bb\u7ebf\u4f7f\u7528\uff1f\u5b8c\u5168\u652f\u6301\u5185\u7f51\u90e8\u7f72\uff0c\u65e0\u9700\u8fde\u63a5\u5916\u90e8\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=59760"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59760\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/59759"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=59760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=59760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=59760"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=59760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}