{"id":116923,"date":"2026-10-22T09:16:33","date_gmt":"2026-10-22T01:16:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/116923.html"},"modified":"2026-10-22T09:16:33","modified_gmt":"2026-10-22T01:16:33","slug":"%e7%a7%bb%e8%bf%9c%e4%ba%a7%e5%93%81%e4%bd%93%e9%aa%8c%e5%ae%98-quectel-pi-m2-%e5%ae%9e%e6%88%98%ef%bc%9a%e7%a6%bb%e7%ba%bf-tts-%e4%bb%8e-11-%e7%a7%92%e5%8e%8b%e5%88%b0-0-4-%e7%a7%92","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/116923.html","title":{"rendered":"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2"},"content":{"rendered":"<p>\u73af\u5883&#xff1a;Quectel Pi M2&#xff08;\u745e\u82af\u5fae RK3576&#xff0c;4\u00d7A72&#064;2.2GHz &#043; 4\u00d7A53&#064;2.0GHz&#xff0c;6 TOPS NPU&#xff0c;3.8 GB RAM \u65e0 swap&#xff09;\/ Debian 13 (trixie) aarch64&#xff0c;\u5185\u6838 6.1.118-rt36<br \/>\n\u76ee\u6807&#xff1a;\u628a\u300c\u5b8c\u5168\u79bb\u7ebf\u4e2d\u6587\u8bed\u97f3\u52a9\u624b\u300d\u7684\u8bed\u97f3\u64ad\u62a5\u5ef6\u8fdf\u538b\u5230\u80fd\u81ea\u7136\u5bf9\u8bdd\u7684\u7a0b\u5ea6<br \/>\n\u5173\u952e\u8bcd&#xff1a;sherpa-onnx\u3001VITS\u3001Kokoro\u3001Matcha\u3001Vocos\u3001RKNN\u3001RK3576\u3001RTF\u3001\u9996\u58f0\u5ef6\u8fdf\u3001NPU \u58f0\u7801\u5668<\/p>\n<h3>\u524d\u8a00<\/h3>\n<p>\u8fd9\u662f Quectel Pi M2 \u79bb\u7ebf\u8bed\u97f3\u52a9\u624b\u7cfb\u5217\u5b9e\u8df5\u7684\u4e00\u7bc7\u3002\u524d\u9762\u7684\u94fe\u8def\u5df2\u7ecf\u6253\u901a&#xff1a;<\/p>\n<ul>\n<li>\u7b2c\u4e00\u7bc7&#xff1a;\u677f\u8f7d\u9ea6\u514b\u98ce\u5f55\u97f3 &#043; \u84dd\u7259\u97f3\u7bb1\u64ad\u653e<\/li>\n<li>\u7b2c\u4e8c\u7bc7&#xff1a;\u4e2d\u6587\u8bed\u97f3\u5524\u9192&#xff08;KWS&#xff09;<\/li>\n<li>\u7b2c\u4e09\u7bc7&#xff1a;\u672c\u5730\u5927\u6a21\u578b RKLLM \u5728 NPU \u4e0a\u8dd1\u901a&#xff08;0.5B 26~29 tok\/s&#xff09;<\/li>\n<\/ul>\n<p>\u672c\u7bc7\u662f\u7b2c\u56db\u7bc7&#xff1a;\u79bb\u7ebf TTS \u4f4e\u5ef6\u8fdf\u4f18\u5316\u3002<\/p>\n<p>\u8bf4\u660e&#xff1a;ASR&#xff08;Paraformer&#xff09;&#043; \u610f\u56fe\u5de5\u5177\u5c42 &#043; \u6574\u673a\u95ed\u73af \u90a3\u7bc7\u8fd8\u6ca1\u53d1&#xff0c;\u653e\u5230\u540e\u9762\u5355\u72ec\u5199\u3002\u672c\u7bc7\u53ea\u501f\u7528\u5b83\u7684\u65f6\u5ef6\u6570\u636e\u505a\u6574\u673a\u9884\u7b97&#xff0c;\u4e0d\u5c55\u5f00\u8bb2\u90a3\u90e8\u5206\u7684\u5b9e\u73b0\u3002<\/p>\n<p>\u94fe\u8def\u662f&#xff1a;<\/p>\n<p>\u5524\u9192(KWS) \u2192 VAD \u5f55\u97f3 \u2192 ASR(Paraformer) \u2192 LLM(RKLLM\/NPU) \u2192 TTS \u2192 \u64ad\u653e<\/p>\n<p>\u5524\u9192\u3001ASR\u3001LLM \u90fd\u5f88\u5feb&#xff0c;\u552f\u72ec TTS \u4e00\u5f00\u53e3\u5c31\u9732\u9985&#xff1a;\u7528\u6237\u8bf4\u5b8c\u8bdd&#xff0c;\u677f\u5b50\u8981\u6c89\u9ed8 8~11 \u79d2\u624d\u51fa\u58f0&#xff0c;\u4e00\u53e5 10 \u79d2\u7684\u56de\u7b54\u8981\u5408\u6210 17 \u79d2\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u8bb0\u5f55\u4e86\u6211\u628a\u8fd9\u5757\u786c\u9aa8\u5934\u5543\u4e0b\u6765\u7684\u5168\u8fc7\u7a0b&#xff1a;\u56db\u6761\u6280\u672f\u8def\u7ebf\u3001\u6bcf\u4e00\u7248\u7684\u5b9e\u6d4b\u6570\u5b57\u3001\u4ee5\u53ca\u6700\u540e\u843d\u5730\u7684\u65b9\u6848\u3002\u5148\u8bf4\u7ed3\u8bba&#xff0c;\u65b9\u4fbf\u4f60\u5224\u65ad\u8981\u4e0d\u8981\u5f80\u4e0b\u8bfb&#xff1a;<\/p>\n<table>\n<tr>\u65b9\u6848\u8ba1\u7b97\u5355\u5143\u7aef\u5230\u7aef RTF\u9996\u58f0\u5ef6\u8fdf\u7ed3\u8bba<\/tr>\n<tbody>\n<tr>\n<td>VITS aishell3 int8&#xff08;\u6574\u53e5\u5408\u6210&#xff09;<\/td>\n<td>CPU<\/td>\n<td>1.7 ~ 1.9<\/td>\n<td>8 ~ 11 s<\/td>\n<td>\u57fa\u7ebf&#xff0c;\u4e0d\u53ef\u7528<\/td>\n<\/tr>\n<tr>\n<td>VITS &#043; \u5207\u53e5\u6d41\u6c34\u7ebf<\/td>\n<td>CPU<\/td>\n<td>1.55 ~ 1.75<\/td>\n<td>2.5 ~ 3.5 s<\/td>\n<td>\u80fd\u7528&#xff0c;\u4f46\u5757\u95f4\u6709\u9759\u97f3\u7a7a\u6863<\/td>\n<\/tr>\n<tr>\n<td>Kokoro int8<\/td>\n<td>CPU<\/td>\n<td>3.6 ~ 4.0<\/td>\n<td>\u66f4\u6162<\/td>\n<td>\u6392\u9664<\/td>\n<\/tr>\n<tr>\n<td>\u539f\u5382 RKNN TTS \/ MMS-TTS<\/td>\n<td>NPU<\/td>\n<td>\u2014<\/td>\n<td>\u2014<\/td>\n<td>flow \u7b97\u5b50\u65e0\u6cd5\u6709\u6548\u52a0\u901f&#xff0c;\u6392\u9664<\/td>\n<\/tr>\n<tr>\n<td>Matcha &#043; Vocos&#xff08;RKNN&#xff09;<\/td>\n<td>NPU<\/td>\n<td>0.099 ~ 0.104<\/td>\n<td>0.37 ~ 0.43 s<\/td>\n<td>\u6700\u7ec8\u91c7\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6700\u7ec8\u6548\u679c&#xff1a;\u6574\u673a\u94fe\u8def ASR 0.18 s \u2192 LLM 0.60 s \u2192 TTS \u9996\u58f0 0.41 s&#xff0c;RTF 0.14 ~ 0.18&#xff0c;\u5408\u6210\u901f\u5ea6\u7ea6\u4e3a\u5b9e\u65f6\u64ad\u653e\u7684 6~7 \u500d&#xff0c;\u9996\u58f0\u6bd4\u539f\u6765\u7684 VITS \u5feb\u4e86 20 \u500d\u4ee5\u4e0a\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u5148\u628a\u6307\u6807\u5b9a\u4e49\u6e05\u695a<\/h3>\n<p>\u804a TTS \u6027\u80fd\u5982\u679c\u53ea\u76ef\u300c\u4e00\u53e5\u8bdd\u5408\u6210\u8981\u51e0\u79d2\u300d&#xff0c;\u5f88\u5bb9\u6613\u88ab\u5e26\u504f\u3002\u672c\u6587\u7edf\u4e00\u7528\u4e09\u4e2a\u6307\u6807&#xff1a;<\/p>\n<table>\n<tr>\u6307\u6807\u5b9a\u4e49\u4e3a\u4ec0\u4e48\u91cd\u8981<\/tr>\n<tbody>\n<tr>\n<td>\u9996\u58f0\u5ef6\u8fdf<\/td>\n<td>\u6587\u672c\u5c31\u7eea \u2192 \u7b2c\u4e00\u4e2a\u97f3\u9891\u5e27\u8fdb\u5165\u64ad\u653e\u5668\u7684\u8017\u65f6<\/td>\n<td>\u7528\u6237\u4f53\u611f\u300c\u5361\u4e0d\u5361\u300d\u7684\u552f\u4e00\u6307\u6807<\/td>\n<\/tr>\n<tr>\n<td>RTF<\/td>\n<td>\u5408\u6210\u8017\u65f6 \u00f7 \u97f3\u9891\u65f6\u957f<\/td>\n<td>&lt; 1 \u624d\u80fd\u8ddf\u4e0a\u5b9e\u65f6\u64ad\u653e&#xff1b;&gt; 1 \u4e00\u5b9a\u79ef\u538b<\/td>\n<\/tr>\n<tr>\n<td>\u5757\u95f4\u7a7a\u6863<\/td>\n<td>\u5206\u6bb5\u5408\u6210\u65f6&#xff0c;\u4e0a\u4e00\u6bb5\u64ad\u5b8c\u5230\u4e0b\u4e00\u6bb5\u51fa\u58f0\u7684\u95f4\u9694<\/td>\n<td>\u51b3\u5b9a\u300c\u542c\u8d77\u6765\u50cf\u4e0d\u50cf\u673a\u5668\u4eba\u5598\u6c14\u300d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5173\u952e\u8ba4\u77e5&#xff1a;VITS \/ Matcha \u8fd9\u7c7b\u975e\u6d41\u5f0f\u58f0\u5b66\u6a21\u578b&#xff0c;\u5fc5\u987b\u628a\u4e00\u6574\u6bb5\u6587\u672c\u5408\u6210\u5b8c\u624d\u80fd\u51fa\u58f0\u3002\u6240\u4ee5\u5bf9\u6574\u53e5\u5408\u6210\u6765\u8bf4&#xff1a;<\/p>\n<p>\u9996\u58f0\u5ef6\u8fdf \u2248 \u6574\u6bb5\u97f3\u9891\u65f6\u957f \u00d7 RTF<\/p>\n<p>RTF &#061; 1.7 \u610f\u5473\u7740\u300c\u8bf4 10 \u79d2\u7684\u8bdd&#xff0c;\u8981\u5148\u7b97 17 \u79d2\u300d\u3002\u8fd9\u5c31\u662f 8~11 \u79d2\u6c89\u9ed8\u7684\u6570\u5b66\u89e3\u91ca \u2014\u2014 \u4e0d\u662f\u54ea\u4e00\u884c\u4ee3\u7801\u6162&#xff0c;\u662f\u6574\u6bb5\u5408\u6210 &#043; \u7b97\u529b\u4e0d\u8db3\u53e0\u52a0\u7684\u7ed3\u679c\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001\u57fa\u7ebf&#xff1a;sherpa-onnx VITS aishell3&#xff08;CPU&#xff09;<\/h3>\n<p>\u6700\u521d\u7528\u7684\u5c31\u662f sherpa-onnx \u5b98\u65b9\u73b0\u6210\u65b9\u6848&#xff1a;vits-zh-aishell3.int8.onnx&#xff0c;CPU \u63a8\u7406\u3002<\/p>\n<p><span class=\"token keyword\">import<\/span> sherpa_onnx<\/p>\n<p>cfg <span class=\"token operator\">&#061;<\/span> sherpa_onnx<span class=\"token punctuation\">.<\/span>OfflineTtsConfig<span class=\"token punctuation\">(<\/span><br \/>\n    model<span class=\"token operator\">&#061;<\/span>sherpa_onnx<span class=\"token punctuation\">.<\/span>OfflineTtsModelConfig<span class=\"token punctuation\">(<\/span><br \/>\n        vits<span class=\"token operator\">&#061;<\/span>sherpa_onnx<span class=\"token punctuation\">.<\/span>OfflineTtsVitsModelConfig<span class=\"token punctuation\">(<\/span><br \/>\n            model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;vits-aishell3.int8.onnx&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            lexicon<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;lexicon.txt&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            tokens<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;tokens.txt&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            noise_scale<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.667<\/span><span class=\"token punctuation\">,<\/span> noise_scale_w<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.8<\/span><span class=\"token punctuation\">,<\/span> length_scale<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1.0<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        provider<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;cpu&#034;<\/span><span class=\"token punctuation\">,<\/span> num_threads<span class=\"token operator\">&#061;<\/span><span class=\"token number\">8<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    rule_fsts<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;date.fst,number.fst,phone.fst,new_heteronym.fst&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    max_num_sentences<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><br \/>\ntts <span class=\"token operator\">&#061;<\/span> sherpa_onnx<span class=\"token punctuation\">.<\/span>OfflineTts<span class=\"token punctuation\">(<\/span>cfg<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5b9e\u6d4b&#xff08;RK3576&#xff0c;8 \u7ebf\u7a0b&#xff0c;22050 Hz \u8f93\u51fa&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u6587\u672c\u957f\u5ea6\u97f3\u9891\u65f6\u957f\u5408\u6210\u8017\u65f6RTF\u9996\u58f0<\/tr>\n<tbody>\n<tr>\n<td>\u77ed\u53e5&#xff08;\u7ea6 10 \u5b57&#xff09;<\/td>\n<td>2.5 s<\/td>\n<td>4.2 ~ 4.8 s<\/td>\n<td>1.7 ~ 1.9<\/td>\n<td>4 ~ 5 s<\/td>\n<\/tr>\n<tr>\n<td>\u4e24\u4e09\u53e5\u56de\u7b54&#xff08;\u7ea6 40 \u5b57&#xff09;<\/td>\n<td>9 ~ 11 s<\/td>\n<td>16 ~ 20 s<\/td>\n<td>1.7 ~ 1.9<\/td>\n<td>8 ~ 11 s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6211\u5148\u628a\u80fd\u8c03\u7684\u53c2\u6570\u90fd\u8c03\u4e86\u4e00\u904d&#xff1a;<\/p>\n<ul>\n<li>num_threads&#xff1a;4 \/ 6 \/ 8 \u7ebf\u7a0b&#xff0c;RTF \u4ece 1.9 \u53ea\u964d\u5230 1.7&#xff0c;8 \u7ebf\u7a0b\u4ee5\u540e\u4e0d\u518d\u6709\u6536\u76ca&#xff08;A72 \u53ea\u6709 4 \u4e2a&#xff0c;\u8d85\u7ebf\u7a0b\u8c03\u5ea6\u53cd\u800c\u4e92\u76f8\u62a2&#xff09;&#xff1b;<\/li>\n<li>length_scale&#xff1a;\u53ea\u662f\u6539\u53d8\u8bed\u901f&#xff0c;\u4e0d\u6539\u53d8 RTF&#xff1b;<\/li>\n<li>\u9501\u9891&#xff1a;CPU governor \u672c\u6765\u5c31\u662f performance&#xff0c;\u6ca1\u6709\u4f59\u91cf\u53ef\u6316\u3002<\/li>\n<\/ul>\n<p>\u7ed3\u8bba&#xff1a;CPU \u4fa7\u5df2\u7ecf\u5230\u9876&#xff0c;\u74f6\u9888\u662f\u6a21\u578b\u7ed3\u6784\u548c\u7b97\u529b&#xff0c;\u8c03\u53c2\u6551\u4e0d\u4e86\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u56db\u6761\u8def\u7ebf\u9010\u4e2a\u5b9e\u6d4b<\/h3>\n<h4>3.1 \u8def\u7ebf A&#xff1a;Kokoro int8 \u2014\u2014 \u540d\u6c14\u5927&#xff0c;\u4f46\u5728 RK3576 \u4e0a\u66f4\u6162<\/h4>\n<p>Kokoro \u5728 x86\/\u624b\u673a\u7aef\u53e3\u7891\u5f88\u597d&#xff0c;sherpa-onnx 1.10.46 \u4e5f\u5df2\u652f\u6301&#xff0c;\u4e8e\u662f\u4e0b\u8f7d\u4e86 int8 \u7248\u672c&#xff08;\u7ea6 140 MB&#xff09;\u5b9e\u6d4b&#xff1a;<\/p>\n<table>\n<tr>\u65b9\u6848\u7ebf\u7a0bRTF\u9996\u58f0<\/tr>\n<tbody>\n<tr>\n<td>VITS aishell3 int8<\/td>\n<td>8<\/td>\n<td>1.55 ~ 1.75<\/td>\n<td>8 ~ 11 s<\/td>\n<\/tr>\n<tr>\n<td>Kokoro int8<\/td>\n<td>8<\/td>\n<td>3.6 ~ 4.0<\/td>\n<td>\u66f4\u6162<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>RTF \u76f4\u63a5\u7ffb\u500d&#xff0c;\u6392\u9664\u3002<\/p>\n<p>\u539f\u56e0\u4e0d\u590d\u6742&#xff1a;Kokoro \u662f\u4e3a x86\/NEON \u4f18\u5316\u8fc7\u7684\u6a21\u578b&#xff0c;\u53c2\u6570\u91cf\u548c\u7b97\u5b50\u7ed3\u6784\u5728 A72 \u4e0a\u5e76\u4e0d\u5360\u4f18&#xff1b;\u300c\u5728\u522b\u7684\u5e73\u53f0\u5feb\u300d\u4e0d\u7b49\u4e8e\u300c\u5728 RK3576 \u4e0a\u5feb\u300d\u3002<\/p>\n<p>\u6559\u8bad&#xff1a;\u7aef\u4fa7\u9009\u578b\u5fc5\u987b\u56de\u5230\u76ee\u6807\u677f\u5b50\u4e0a\u5b9e\u6d4b&#xff0c;\u793e\u533a\u53e3\u7891\u53ea\u80fd\u5f53\u53c2\u8003\u3002<\/p>\n<h4>3.2 \u8def\u7ebf B&#xff1a;\u539f\u5382 RKNN TTS&#xff08;MMS-TTS \/ rknn_model_zoo&#xff09;\u2014\u2014 \u65b9\u5411\u5bf9&#xff0c;\u4f46\u7b97\u5b50\u4e0d\u914d\u5408<\/h4>\n<p>\u987a\u7740\u300c\u628a TTS \u632a\u5230 6 TOPS NPU \u4e0a\u300d\u7684\u601d\u8def&#xff0c;\u53bb\u7ffb\u4e86 RK \u539f\u5382\u7684 rknn_model_zoo \u548c\u793e\u533a\u91cc\u7684 RKNN TTS \u65b9\u6848&#xff0c;\u7ed3\u8bba\u504f\u60b2\u89c2&#xff1a;<\/p>\n<li>VITS \u7ed3\u6784\u7684 flow&#xff08;\u5f52\u4e00\u5316\u6d41&#xff09;\u7b97\u5b50\u5728 RKNN \u4e0a\u65e0\u6cd5\u6709\u6548\u52a0\u901f\u3002VITS \u7684\u8017\u65f6\u5927\u5934\u662f flow \u91cc\u7684\u591a\u6b21\u8026\u5408\u53d8\u6362&#xff0c;\u8fd9\u7c7b\u9010\u5e27\u3001\u5c0f\u7b97\u5b50\u7684\u7ed3\u6784\u5728 NPU \u4e0a\u4f1a\u88ab\u62c6\u6210\u5927\u91cf\u788e\u7247\u8c03\u5ea6&#xff0c;\u53ea\u6709\u58f0\u7801\u5668&#xff08;HiFi-GAN&#xff09;\u90a3\u4e00\u6bb5\u80fd\u5403\u5230\u52a0\u901f&#xff0c;\u6574\u4f53\u5b58\u5728\u5929\u82b1\u677f\u3002<\/li>\n<li>\u73b0\u6210\u53ef\u76f4\u63a5\u7528\u7684\u4e2d\u6587 RKNN TTS \u6a21\u578b\u6781\u5c11&#xff1a;\u591a\u6570\u7b2c\u4e09\u65b9\u6a21\u578b\u53ea\u652f\u6301\u82f1\u6587&#xff0c;\u6216\u8005\u9700\u8981\u81ea\u5df1\u5bfc\u51fa ONNX\u3001\u6539\u52a8\u6001 shape\u3001\u518d\u7528\u5339\u914d\u7248\u672c\u7684 rknn-toolkit2 \u8f6c\u6362&#xff0c;\u7248\u672c\u4e00\u9519\u5c31\u52a0\u8f7d\u5931\u8d25\u3002<\/li>\n<li>MMS-TTS&#xff08;VITS \u7ed3\u6784&#xff09;\u540c\u6837\u53d7 flow \u9650\u5236&#xff0c;\u6392\u9664\u3002<\/li>\n<p>\u8fd9\u6b21\u8c03\u7814\u6ca1\u6709\u767d\u505a&#xff0c;\u5b83\u5e2e\u6211\u9501\u5b9a\u4e86\u6b63\u786e\u7684\u65b9\u5411&#xff1a;\u8981\u7ed5\u5f00 flow&#xff0c;\u9009\u300c\u975e flow \u7684\u58f0\u5b66\u6a21\u578b &#043; \u53ef\u5168 NPU \u52a0\u901f\u7684\u58f0\u7801\u5668\u300d&#xff0c;\u4e5f\u5c31\u662f\u4e0b\u9762\u7684 Matcha &#043; Vocos\u3002<\/p>\n<h4>3.3 \u8def\u7ebf C&#xff1a;\u5207\u53e5\u6d41\u6c34\u7ebf&#xff08;\u8fd8\u662f VITS&#xff0c;\u7eaf\u5de5\u7a0b\u4f18\u5316&#xff09;<\/h4>\n<p>\u5728\u6362\u6a21\u578b\u4e4b\u524d&#xff0c;\u5148\u505a\u4e86\u4e00\u4e2a\u96f6\u6210\u672c\u7684\u5de5\u7a0b\u4f18\u5316&#xff1a;\u628a\u957f\u6587\u672c\u5207\u6210\u5c0f\u53e5&#xff0c;\u9010\u53e5\u5408\u6210\u3001\u8fb9\u5408\u6210\u8fb9\u64ad\u653e\u3002<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">split_sentences<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">,<\/span> first<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span> hard<span class=\"token operator\">&#061;<\/span><span class=\"token number\">18<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u6309\u6807\u70b9\u5207\u5c0f\u53e5\u540e\u8d2a\u5fc3\u6253\u5305\u6210\u5408\u6210\u5355\u5143\u3002<br \/>\n    \u9996\u5757\u538b\u5230\u7ea6 first \u5b57&#xff0c;\u56e0\u4e3a VITS \u975e\u6d41\u5f0f&#xff0c;\u9996\u5757\u8d8a\u77ed\u51fa\u58f0\u8d8a\u5feb&#xff1b;<br \/>\n    \u540e\u7eed\u5757\u653e\u5bbd\u5230 hard \u5b57&#xff0c;\u53cd\u6b63\u5b83\u4eec\u5728\u64ad\u653e\u671f\u95f4\u540e\u53f0\u5408\u6210\u3002&#034;&#034;&#034;<\/span><br \/>\n    out<span class=\"token punctuation\">,<\/span> buf <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;&#034;<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> c <span class=\"token keyword\">in<\/span> _split_clauses<span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        limit <span class=\"token operator\">&#061;<\/span> hard <span class=\"token keyword\">if<\/span> out <span class=\"token keyword\">else<\/span> first<br \/>\n        <span class=\"token keyword\">if<\/span> buf <span class=\"token keyword\">and<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>buf<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&gt;<\/span> limit<span class=\"token punctuation\">:<\/span><br \/>\n            out<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>buf<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> buf<span class=\"token punctuation\">,<\/span> limit <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">,<\/span> hard<br \/>\n        <span class=\"token keyword\">while<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&gt;<\/span> limit<span class=\"token punctuation\">:<\/span><br \/>\n            k <span class=\"token operator\">&#061;<\/span> _safe_cut<span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">,<\/span> limit<span class=\"token punctuation\">)<\/span><br \/>\n            out<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>c<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span>k<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> c<span class=\"token punctuation\">,<\/span> limit <span class=\"token operator\">&#061;<\/span> c<span class=\"token punctuation\">[<\/span>k<span class=\"token punctuation\">:<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> hard<br \/>\n        buf <span class=\"token operator\">&#043;&#061;<\/span> c<br \/>\n    <span class=\"token keyword\">if<\/span> buf<span class=\"token punctuation\">:<\/span><br \/>\n        out<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>buf<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> out<\/p>\n<p>\u914d\u5408\u4e00\u4e2a\u300c\u540e\u53f0\u5408\u6210\u7ebf\u7a0b &#043; \u4e3b\u7ebf\u7a0b\u987a\u5e8f\u64ad\u653e\u300d\u7684 PipelinedSpeaker&#xff1a;\u540e\u53f0\u4e0d\u65ad\u628a\u53e5\u5b50\u5408\u6210\u6210 wav&#xff0c;\u4e3b\u7ebf\u7a0b\u6309\u5e8f aplay\u3002<\/p>\n<p>\u6548\u679c&#xff1a;<\/p>\n<table>\n<tr>\u6307\u6807\u6574\u53e5\u5408\u6210\u5207\u53e5\u6d41\u6c34\u7ebf<\/tr>\n<tbody>\n<tr>\n<td>\u9996\u58f0<\/td>\n<td>8 ~ 11 s<\/td>\n<td>2.5 ~ 3.5 s<\/td>\n<\/tr>\n<tr>\n<td>RTF<\/td>\n<td>1.7 ~ 1.9<\/td>\n<td>1.55 ~ 1.75&#xff08;\u4e0d\u53d8&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u5757\u95f4\u7a7a\u6863<\/td>\n<td>\u65e0<\/td>\n<td>\u6709&#xff0c;\u7ea6 0.2 ~ 0.8 s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9996\u58f0\u964d\u4e0b\u6765\u4e86&#xff0c;\u4f46 RTF \u4ecd\u5927\u4e8e 1&#xff0c;\u610f\u5473\u7740\u53ea\u8981\u56de\u7b54\u7a0d\u957f&#xff0c;\u64ad\u653e\u5c31\u4f1a\u300c\u8ffd\u4e0d\u4e0a\u300d\u5408\u6210&#xff0c;\u4e2d\u95f4\u5f00\u59cb\u51fa\u73b0\u53ef\u542c\u89c1\u7684\u9759\u97f3\u7a7a\u6863\u3002\u8fd9\u6761\u8def\u53ea\u80fd\u6551\u6025&#xff0c;\u4e0d\u80fd\u5f53\u7ec8\u70b9\u3002<\/p>\n<p>\u5207\u53e5\u91cc\u6709\u4e2a\u7ec6\u8282\u503c\u5f97\u6284\u8d70&#xff1a;_safe_cut \u5728\u5207\u70b9\u524d\u4f1a\u56de\u9000&#xff0c;\u907f\u514d\u628a\u300c2026\u5e7410\u670821\u65e5\u300d\u8fd9\u79cd\u6570\u5b57\u4e32\u5288\u6210\u4e24\u534a&#xff0c;\u4e5f\u907f\u514d\u628a\u82f1\u6587\u5355\u8bcd\u5207\u5f00\u3002<\/p>\n<h4>3.4 \u8def\u7ebf D&#xff1a;Matcha &#043; Vocos&#xff08;RKNN&#xff0c;\u6700\u7ec8\u65b9\u6848&#xff09;<\/h4>\n<h5>\u67b6\u6784<\/h5>\n<p>rkvoice-stream 0.2.0 \u63d0\u4f9b\u4e86\u4e00\u5957\u9762\u5411 RK3576 \u7684 Matcha &#043; Vocos \u540e\u7aef&#xff0c;\u6570\u636e\u6d41\u662f&#xff1a;<\/p>\n<p>\u6587\u672c \u2192 \u6587\u672c\u524d\u7aef(CPU, \u67e5\u8868\/\u97f3\u7d20\u5316) \u2192 tokens<br \/>\n     \u2192 Matcha RKNN(NPU) \u2192 mel \u9891\u8c31<br \/>\n     \u2192 Vocos RKNN(NPU) \u2192 \u7ebf\u6027\u8c31<br \/>\n     \u2192 ISTFT(CPU) \u2192 PCM 16 kHz<\/p>\n<p>\u548c VITS \u6700\u5927\u7684\u533a\u522b&#xff1a;<\/p>\n<ul>\n<li>Matcha \u662f\u300c\u6761\u4ef6\u6d41\u5339\u914d\u300d\u58f0\u5b66\u6a21\u578b&#xff0c;\u63a8\u7406\u53ea\u9700 1 \u6b65 ODE&#xff0c;\u6ca1\u6709 VITS \u90a3\u79cd\u591a\u6b21 flow \u53d8\u6362&#xff1b;<\/li>\n<li>Vocos \u662f\u7eaf\u5377\u79ef\u58f0\u7801\u5668&#xff0c;\u6574\u6bb5\u53ef\u9759\u6001\u7f16\u8bd1\u6210 RKNN&#xff0c;\u5168\u90e8\u843d\u5230 NPU&#xff1b;<\/li>\n<li>\u4e24\u8005\u90fd\u5bfc\u51fa\u6210\u56fa\u5b9a shape&#xff0c;\u907f\u514d\u52a8\u6001 shape \u5728 RKNN \u4e0a\u7684\u989d\u5916\u5f00\u9500\u3002<\/li>\n<\/ul>\n<p>\u677f\u4e0a\u7684\u4e24\u4e2a\u6a21\u578b&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u578b\u6587\u4ef6\u5927\u5c0f\u7f16\u8bd1\u65f6\u56fa\u5b9a shape\u5355\u6b21\u8017\u65f6<\/tr>\n<tbody>\n<tr>\n<td>Matcha \u58f0\u5b66\u6a21\u578b<\/td>\n<td>matcha-s64.rknn<\/td>\n<td>55.5 MB<\/td>\n<td>seq_len&#061;80, x_len&#061;64 \u2192 599 \u5e27 mel&#xff08;\u22489.58 s&#xff09;<\/td>\n<td>293.6 ms<\/td>\n<\/tr>\n<tr>\n<td>Vocos \u58f0\u7801\u5668<\/td>\n<td>vocos-16khz-600.rknn<\/td>\n<td>28.2 MB<\/td>\n<td>600 \u5e27\u8f93\u5165&#xff0c;\u8f93\u51fa mag\/x\/y [1,513,600]<\/td>\n<td>54.7 ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5355\u6b21\u63a8\u7406\u8ba1\u65f6&#xff08;rknn-toolkit-lite2 2.3.2 &#043; librknnrt 2.3.2&#xff0c;NPU 950 MHz&#xff09;&#xff1a;<\/p>\n<p>matcha-s64  : 293.6 ms  (599 \u5e27 \u2248 9.58 s \u97f3\u9891)<br \/>\nvocos-600   :  54.7 ms<br \/>\nISTFT (CPU) :  ~50 ms<\/p>\n<p>\u8bf4\u660e&#xff1a;\u52a0\u8f7d\u6a21\u578b\u65f6\u90a3\u53e5 Query dynamic range failed &#8230; static shape RKNN model \u662f\u6b63\u5e38\u8b66\u544a&#xff0c;\u9759\u6001 shape \u6a21\u578b\u672c\u6765\u5c31\u6ca1\u6709\u52a8\u6001\u91cf\u5316\u8303\u56f4&#xff0c;\u5ffd\u7565\u5373\u53ef\u3002<\/p>\n<p>\u7aef\u5230\u7aef\u5b9e\u6d4b&#xff1a;<\/p>\n<table>\n<tr>\u6307\u6807\u6570\u503c<\/tr>\n<tbody>\n<tr>\n<td>RTF<\/td>\n<td>0.099 ~ 0.104&#xff08;\u7ea6\u6bcf\u79d2\u97f3\u9891 0.1 \u79d2\u5408\u6210&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u9996\u58f0<\/td>\n<td>0.37 ~ 0.43 s<\/td>\n<\/tr>\n<tr>\n<td>\u76f8\u5bf9 VITS \u63d0\u5347<\/td>\n<td>\u7ea6 15 ~ 17 \u500d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u7b2c\u4e00\u4e2a\u5751&#xff1a;\u5c3e\u90e8\u300c\u9759\u97f3 &#043; \u5b64\u7acb\u6742\u97f3\u300d<\/h5>\n<p>\u56fa\u5b9a\u7a97\u53e3\u6a21\u578b\u6709\u4e2a\u526f\u4f5c\u7528&#xff1a;\u63a8\u7406\u65f6\u6309\u56fa\u5b9a\u5e27\u6570\u8f93\u51fa&#xff0c;\u62ff\u5230\u97f3\u9891\u540e\u8981\u6309\u4f30\u7b97\u7684 mel \u5e27\u6570\u88c1\u526a\u3002\u800c\u7eaf\u4e2d\u6587\u7684\u5e27\u6570\u4f30\u8ba1\u504f\u5927\u7ea6 30%~40%&#xff0c;\u591a\u51fa\u6765\u7684\u90e8\u5206\u4f1a\u88ab\u58f0\u7801\u5668\u6e32\u67d3\u6210\u300c\u4e00\u6bb5\u9759\u97f3 &#043; \u672b\u5c3e\u4e00\u5c0f\u5757\u6742\u97f3\u300d\u3002<\/p>\n<p>\u4e00\u5f00\u59cb\u6211\u662f\u7528\u677f\u8f7d Paraformer \u56de\u8bfb\u5408\u6210\u97f3\u9891\u6765\u9a8c\u97f3\u8d28\u7684&#xff0c;\u539f\u6837\u8f93\u51fa\u662f&#xff1a;<\/p>\n<p>\u4f60\u597d\u6211\u662f\u672c\u5730\u7684\u7684\u8bed\u97f3\u52a9\u624b\u4e09<br \/>\n\u4eca\u5929\u5929\u6c14\u4e0d\u9519\u51fa\u53bb\u8d70\u8d70\u5427\u563f<\/p>\n<p>\u672b\u5c3e\u7684\u300c\u4e09\u300d\u300c\u563f\u300d\u4e0d\u662f\u6587\u672c\u91cc\u7684\u5b57&#xff0c;\u800c\u662f\u56fa\u5b9a\u7a97\u53e3\u591a\u4f30\u5e27\u4ea7\u751f\u7684\u6b8b\u54cd\u3002\u89e3\u51b3\u529e\u6cd5\u662f\u6309\u80fd\u91cf\u5206\u6bb5&#xff0c;\u53ea\u4fdd\u7559\u6700\u540e\u4e00\u4e2a\u8db3\u591f\u957f\u7684\u8bed\u97f3\u6bb5&#xff1a;<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">trim_tail<\/span><span class=\"token punctuation\">(<\/span>samples<span class=\"token punctuation\">,<\/span> sr<span class=\"token punctuation\">,<\/span> thr<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.02<\/span><span class=\"token punctuation\">,<\/span> win<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.10<\/span><span class=\"token punctuation\">,<\/span> keep<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.15<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u526a\u6389\u5c3e\u90e8\u9759\u97f3\u4e0e\u5b64\u7acb\u6b8b\u54cd\u3002&#034;&#034;&#034;<\/span><br \/>\n    n <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>win <span class=\"token operator\">*<\/span> sr<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>samples<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">4<\/span> <span class=\"token operator\">*<\/span> n<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> samples<br \/>\n    frames <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>samples<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/\/<\/span> n<br \/>\n    rms <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span>sqrt<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>samples<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span>frames <span class=\"token operator\">*<\/span> n<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>reshape<span class=\"token punctuation\">(<\/span>frames<span class=\"token punctuation\">,<\/span> n<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">**<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>mean<span class=\"token punctuation\">(<\/span>axis<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    loud <span class=\"token operator\">&#061;<\/span> rms <span class=\"token operator\">&gt;<\/span> thr<br \/>\n    runs<span class=\"token punctuation\">,<\/span> start <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">None<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> i<span class=\"token punctuation\">,<\/span> v <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">enumerate<\/span><span class=\"token punctuation\">(<\/span>loud<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> v <span class=\"token keyword\">and<\/span> start <span class=\"token keyword\">is<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            start <span class=\"token operator\">&#061;<\/span> i<br \/>\n        <span class=\"token keyword\">elif<\/span> <span class=\"token keyword\">not<\/span> v <span class=\"token keyword\">and<\/span> start <span class=\"token keyword\">is<\/span> <span class=\"token keyword\">not<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            runs<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>start<span class=\"token punctuation\">,<\/span> i<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> start <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">None<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> start <span class=\"token keyword\">is<\/span> <span class=\"token keyword\">not<\/span> <span class=\"token boolean\">None<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        runs<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>start<span class=\"token punctuation\">,<\/span> frames<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    long_runs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span>r <span class=\"token keyword\">for<\/span> r <span class=\"token keyword\">in<\/span> runs <span class=\"token keyword\">if<\/span> r<span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#8211;<\/span> r<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&gt;&#061;<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">]<\/span>   <span class=\"token comment\"># \u22650.4 s \u624d\u7b97\u8bed\u97f3<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> long_runs<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> samples<br \/>\n    end <span class=\"token operator\">&#061;<\/span> <span class=\"token builtin\">min<\/span><span class=\"token punctuation\">(<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>samples<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> long_runs<span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">*<\/span> n <span class=\"token operator\">&#043;<\/span> <span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>keep <span class=\"token operator\">*<\/span> sr<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> samples<span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">:<\/span>end<span class=\"token punctuation\">]<\/span><\/p>\n<p>\u8e29\u5751\u8bb0\u5f55&#xff1a;\u7b2c\u4e00\u7248\u9608\u503c\u8bbe\u4e86 0.01&#xff0c;\u7ed3\u679c\u526a\u4e0d\u6389 \u2014\u2014 \u56e0\u4e3a\u90a3\u6bb5\u6742\u97f3\u7684 RMS \u662f 0.108&#xff0c;\u53cd\u800c\u9ad8\u4e8e\u9608\u503c\u3002\u6539\u6210\u300c100 ms \u7a97 &#043; \u80fd\u91cf\u5206\u6bb5 &#043; \u53ea\u4fdd\u7559\u6700\u540e\u4e00\u4e2a \u22650.4 s \u7684\u8bed\u97f3\u6bb5\u300d\u624d\u5f7b\u5e95\u5e72\u51c0\u3002<\/p>\n<p>\u56de\u8bfb\u9a8c\u8bc1&#xff08;\u540c\u4e00\u4e2a Paraformer&#xff09;&#xff1a;<\/p>\n<p>\u5185\u5b58\u5171\u4e09\u5343\u516b\u767e\u4e5d\u5341\u4e09\u5146<br \/>\n\u53ef\u7528\u4e8c\u5343\u4e09\u767e\u56db\u5341\u5146<\/p>\n<h5>\u7b2c\u4e8c\u4e2a\u5751&#xff1a;\u522b\u5173\u6389\u5207\u53e5<\/h5>\n<p>\u521a\u4e0a Matcha \u65f6\u6211\u4ee5\u4e3a\u300c\u5408\u6210\u8fd9\u4e48\u5feb&#xff0c;\u5e72\u8106\u6574\u6bb5\u4e00\u6b21\u6027\u5408\u6210\u300d&#xff0c;\u4e8e\u662f\u628a\u9996\u5757\/\u5757\u957f\u90fd\u8bbe\u6210 1000 \u5b57\u3002\u7ed3\u679c\u53cd\u800c\u66f4\u5dee&#xff1a;<\/p>\n<table>\n<tr>\u5207\u53e5\u7b56\u7565\u9996\u58f0\u5408\u6210\u8017\u65f6\u97f3\u9891\u65f6\u957f<\/tr>\n<tbody>\n<tr>\n<td>\u6574\u6bb5&#xff08;first&#061;chunk&#061;1000&#xff09;<\/td>\n<td>1.15 s<\/td>\n<td>\u66f4\u957f<\/td>\n<td>11.41 s&#xff08;\u4f30\u591a&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u6309\u53e5&#xff08;first&#061;24, chunk&#061;40&#xff09;<\/td>\n<td>0.41 s<\/td>\n<td>\u66f4\u77ed<\/td>\n<td>\u6b63\u5e38<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u539f\u56e0\u8fd8\u662f\u90a3\u53e5\u8bdd&#xff1a;\u975e\u6d41\u5f0f\u6a21\u578b\u7684\u9996\u58f0 &#061; \u9996\u5757\u5408\u6210\u65f6\u95f4\u3002\u9996\u5757\u8d8a\u77ed&#xff0c;\u51fa\u58f0\u8d8a\u5feb&#xff1b;Matcha \u7684 RTF \u53ea\u6709 0.1&#xff0c;24 \u4e2a\u5b57\u7684\u9996\u5757\u5408\u6210\u7ea6 0.4 \u79d2&#xff0c;\u6b63\u597d\u5361\u5728\u4f53\u611f\u300c\u5373\u65f6\u5e94\u7b54\u300d\u7684\u533a\u95f4\u3002<\/p>\n<h4>3.5 \u56db\u6761\u8def\u7ebf\u6a2a\u5411\u6c47\u603b<\/h4>\n<table>\n<tr>\u8def\u7ebf\u9996\u58f0RTF\u97f3\u8d28\u7ed3\u8bba<\/tr>\n<tbody>\n<tr>\n<td>VITS \u6574\u53e5<\/td>\n<td>8 ~ 11 s<\/td>\n<td>1.7 ~ 1.9<\/td>\n<td>\u597d<\/td>\n<td>\u4e0d\u53ef\u7528<\/td>\n<\/tr>\n<tr>\n<td>Kokoro int8<\/td>\n<td>\u66f4\u5dee<\/td>\n<td>3.6 ~ 4.0<\/td>\n<td>\u4e00\u822c<\/td>\n<td>\u6392\u9664<\/td>\n<\/tr>\n<tr>\n<td>\u539f\u5382 RKNN TTS<\/td>\n<td>\u672a\u843d\u5730<\/td>\n<td>\u2014<\/td>\n<td>\u2014<\/td>\n<td>flow \u7b97\u5b50\u53d7\u9650&#xff0c;\u6392\u9664<\/td>\n<\/tr>\n<tr>\n<td>VITS &#043; \u5207\u53e5<\/td>\n<td>2.5 ~ 3.5 s<\/td>\n<td>1.55 ~ 1.75<\/td>\n<td>\u597d<\/td>\n<td>\u6709\u5757\u95f4\u7a7a\u6863&#xff0c;\u4ec5\u6551\u6025<\/td>\n<\/tr>\n<tr>\n<td>Matcha &#043; Vocos<\/td>\n<td>0.37 ~ 0.43 s<\/td>\n<td>0.10<\/td>\n<td>\u597d&#xff08;ASR \u56de\u8bfb\u53ef\u61c2&#xff09;<\/td>\n<td>\u91c7\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u56db\u3001\u843d\u5730\u65f6\u7ed5\u4e0d\u8fc7\u7684\u4e24\u4ef6\u4e8b<\/h3>\n<h4>4.1 Python \u7248\u672c&#xff1a;\u7cfb\u7edf\u53ea\u6709 3.13&#xff0c;\u800c\u5b98\u65b9 RKNN wheel \u53ea\u5230 cp312<\/h4>\n<p>\u677f\u7aef\u7cfb\u7edf Python \u662f 3.13.5&#xff0c;\u800c\u4e14&#xff1a;<\/p>\n<ul>\n<li>\u6ca1\u6709 pip&#xff1b;<\/li>\n<li>apt \u6e90\u662f\u7a7a\u7684&#xff08;\/var\/lib\/apt\/lists \u91cc\u53ea\u6709 auxfiles&#xff09;&#xff0c;\u88c5\u4e0d\u4e86\u5305&#xff1b;<\/li>\n<li>\u6ca1\u6709 gcc\/make&#xff0c;\u6e90\u7801\u7f16\u8bd1\u4e5f\u8d70\u4e0d\u901a&#xff1b;<\/li>\n<li>sudo \u9700\u8981\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<p>\u800c rknn-toolkit-lite2 \u5b98\u65b9 wheel \u53ea\u6709 cp37 ~ cp312&#xff0c;\u4e14\u5185\u90e8\u662f cp312 \u7f16\u8bd1\u7684 .so&#xff0c;\u4e0d\u662f\u7eaf Python \u5305&#xff0c;\u6362\u7248\u672c\u5fc5\u70b8\u3002\u7cfb\u7edf Python \u53c8\u4e0d\u6562\u52a8&#xff08;\u4e00\u5806\u7cfb\u7edf\u5de5\u5177\u4f9d\u8d56\u5b83&#xff09;\u3002<\/p>\n<p>\u6700\u540e\u7684\u89e3\u6cd5\u662f\u88c5\u4e00\u4e2a\u5b8c\u5168\u9694\u79bb\u7684 CPython 3.12&#xff1a;<\/p>\n<p><span class=\"token comment\"># python-build-standalone \u7684 install_only \u5305&#xff0c;\u89e3\u538b\u5373\u7528&#xff0c;\u4e0d\u78b0\u7cfb\u7edf Python<\/span><br \/>\n<span class=\"token comment\"># cpython-3.12.15&#043;20261020-aarch64-unknown-linux-gnu-install_only.tar.gz&#xff08;\u7ea6 53 MB&#xff09;<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/userdata\/rkllm\/py312<br \/>\n<span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-xzf<\/span> cpython-3.12.15&#043;20261020-aarch64-unknown-linux-gnu-install_only.tar.gz <span class=\"token punctuation\">\\\\<\/span><br \/>\n    <span class=\"token parameter variable\">-C<\/span> \/userdata\/rkllm\/py312 &#8211;strip-components<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1<\/span><\/p>\n<p><span class=\"token assign-left variable\">P<\/span><span class=\"token operator\">&#061;<\/span>\/userdata\/rkllm\/py312\/bin\/python3.12<br \/>\n<span class=\"token variable\">$P<\/span> <span class=\"token parameter variable\">-m<\/span> pip <span class=\"token function\">install<\/span> sherpa-onnx<span class=\"token operator\">&#061;&#061;<\/span><span class=\"token number\">1.10<\/span>.46 numpy soundfile pyyaml rknn-toolkit-lite2<span class=\"token operator\">&#061;&#061;<\/span><span class=\"token number\">2.3<\/span>.2<\/p>\n<p>\u5173\u952e\u70b9&#xff1a;<\/p>\n<ul>\n<li>librknnrt.so \u662f 2.3.2\u3001\u9a71\u52a8 0.9.8&#xff0c;\u6240\u4ee5 rknn-toolkit-lite2 \u4e5f\u5fc5\u987b\u9501 2.3.2&#xff0c;\u4e09\u4e2a\u7248\u672c\u4e25\u683c\u5bf9\u9f50&#xff1b;<\/li>\n<li>\u6574\u4e2a\u73af\u5883\u88c5\u5728 \/userdata&#xff0c;\u4e0e\u7cfb\u7edf Python \u5b8c\u5168\u9694\u79bb&#xff0c;\u4e0d\u9700\u8981 root\u3001\u4e0d\u9700\u8981 Docker\u3002<\/li>\n<\/ul>\n<h4>4.2 espeak-ng&#xff1a;\u6ca1\u6709 root \u4e5f\u8981\u4e2d\u82f1\u6df7\u8bf4<\/h4>\n<p>Matcha \u7684\u4e2d\u6587\u8d70\u8bcd\u5178&#xff08;lexicon.txt&#xff09;&#xff0c;\u82f1\u6587\u8d70 espeak-ng \u97f3\u7d20\u5316\u3002\u677f\u5b50\u4e0a\u6ca1\u6709 root \u88c5 deb&#xff0c;\u4f46 deb \u672c\u8d28\u4e0a\u5c31\u662f\u4e2a tar \u5305&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u89e3\u5305&#xff08;\u4e0d\u9700\u8981\u5b89\u88c5&#xff09;<\/span><br \/>\ndpkg-deb <span class=\"token parameter variable\">-x<\/span> libespeak-ng1_1.52.0&#043;dfsg-5build1_arm64.deb \/userdata\/rkllm\/espeak<br \/>\ndpkg-deb <span class=\"token parameter variable\">-x<\/span> libpcaudio0_1.3-1build1_arm64.deb        \/userdata\/rkllm\/espeak<br \/>\ndpkg-deb <span class=\"token parameter variable\">-x<\/span> libsonic0_0.2.0-13build2_arm64.deb       \/userdata\/rkllm\/espeak<\/p>\n<p><span class=\"token comment\"># \u628a .so \u62f7\u5230\u4e00\u4e2a\u56fa\u5b9a\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/userdata\/rkllm\/lib<br \/>\n<span class=\"token comment\"># libespeak-ng.so.1 \/ libpcaudio.so.0 \/ libsonic.so.0<\/span><\/p>\n<p>\u7136\u540e\u4e0d\u8981\u6307\u671b LD_LIBRARY_PATH&#xff08;\u5b50\u8fdb\u7a0b\/\u4e0d\u540c\u52a0\u8f7d\u65f6\u673a\u5bb9\u6613\u5931\u6548&#xff09;&#xff0c;\u76f4\u63a5\u5728\u8fdb\u7a0b\u542f\u52a8\u65f6\u6309\u7edd\u5bf9\u8def\u5f84\u9884\u52a0\u8f7d&#xff1a;<\/p>\n<p>_ESPEAK_LIB <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\/userdata\/rkllm\/lib&#034;<\/span><br \/>\n<span class=\"token keyword\">for<\/span> _so <span class=\"token keyword\">in<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;libpcaudio.so.0&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;libsonic.so.0&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;libespeak-ng.so.1&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">try<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        ctypes<span class=\"token punctuation\">.<\/span>CDLL<span class=\"token punctuation\">(<\/span>os<span class=\"token punctuation\">.<\/span>path<span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>_ESPEAK_LIB<span class=\"token punctuation\">,<\/span> _so<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> mode<span class=\"token operator\">&#061;<\/span>ctypes<span class=\"token punctuation\">.<\/span>RTLD_GLOBAL<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">except<\/span> OSError<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">pass<\/span><\/p>\n<p>RTLD_GLOBAL \u8ba9\u540e\u7eed CDLL(&#034;libespeak-ng.so.1&#034;)&#xff08;rkvoice-stream \u5185\u90e8\u6309 SONAME \u52a0\u8f7d&#xff09;\u76f4\u63a5\u547d\u4e2d\u5df2\u52a0\u8f7d\u7684\u5e93\u3002<\/p>\n<p>\u9a8c\u8bc1&#xff1a;<\/p>\n<p>Initialize rc&#061;22050<br \/>\nSetVoice(en-us) rc&#061;0<br \/>\nhello  -&gt; h\u0259l\u02c8o\u028a<br \/>\nPython -&gt; p\u02c8a\u026a\u03b8\u0259n<\/p>\n<p>\u4e2d\u82f1\u6df7\u8bf4\u5b9e\u6d4b RTF 0.071&#xff0c;\u4e2d\u82f1\u5207\u6362\u6b63\u5e38\u3002<\/p>\n<p>\u8e29\u5751&#xff1a;libespeak-ng-libespeak1 \u662f\u4e2a 2974 \u5b57\u8282\u7684\u8fc7\u6e21\u7a7a\u5305&#xff0c;\u91cc\u9762\u53ea\u6709\u4e00\u4e2a libespeak.so.1 \u7b26\u53f7\u94fe\u63a5&#xff0c;\u88c5\u4e0a\u6ca1\u6709\u4efb\u4f55\u7528\u3002\u8981\u88c5 libespeak-ng1&#xff08;\u672c\u6587\u7528\u7684 1.52.0&#xff09;\u3002<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u6700\u7ec8\u6280\u672f\u8def\u7ebf<\/h3>\n<h4>5.1 \u6574\u4f53\u67b6\u6784<\/h4>\n<p>          \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 CPU \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510      \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 NPU \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u9ea6\u514b\u98ce \u2192 KWS(\u5c0f\u667a\u5c0f\u667a) \u2192 VAD \u2192 Paraformer ASR \u2192 RKLLM(Qwen2.5-0.5B) \u2192 \u56de\u590d\u6587\u672c<br \/>\n                                                                      \u2502<br \/>\n                                             \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n                                             \u25bc<br \/>\n                        \u5207\u53e5(\u9996\u575724\u5b57\/\u540e\u7eed40\u5b57) \u2192 \u540e\u53f0\u5408\u6210\u7ebf\u7a0b<br \/>\n                                             \u2502<br \/>\n                              Matcha RKNN \u2500\u2500\u25b6 Vocos RKNN \u2500\u2500\u25b6 ISTFT(CPU)<br \/>\n                                             \u2502<br \/>\n                                        trim_tail \u526a\u5c3e<br \/>\n                                             \u2502<br \/>\n                                         aplay \u987a\u5e8f\u64ad\u653e<\/p>\n<h4>5.2 \u5173\u952e\u4ee3\u7801&#xff1a;\u628a Matcha \u9002\u914d\u6210 sherpa \u98ce\u683c\u7684 TTS<\/h4>\n<p>\u4e0a\u5c42\u7f16\u6392&#xff08;\u5207\u53e5\u3001\u6d41\u6c34\u7ebf\u64ad\u653e\u3001\u5199 wav&#xff09;\u672c\u6765\u662f\u7167\u7740 sherpa-onnx \u7684 generate() \u63a5\u53e3\u5199\u7684&#xff0c;\u6240\u4ee5\u53ea\u9700\u8981\u4e00\u4e2a\u8584\u9002\u914d\u5c42&#xff0c;\u4e0d\u7528\u6539\u6574\u673a\u4ee3\u7801&#xff1a;<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">MatchaTTS<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">def<\/span> <span class=\"token function\">__init__<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> model_dir<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\/userdata\/rkllm\/rksv&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        sys<span class=\"token punctuation\">.<\/span>path<span class=\"token punctuation\">.<\/span>insert<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\/userdata\/rkllm\/rksv\/site&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        os<span class=\"token punctuation\">.<\/span>environ<span class=\"token punctuation\">.<\/span>setdefault<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;TTS_MODEL_DIR&#034;<\/span><span class=\"token punctuation\">,<\/span> model_dir<span class=\"token punctuation\">)<\/span><br \/>\n        os<span class=\"token punctuation\">.<\/span>environ<span class=\"token punctuation\">.<\/span>setdefault<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;MATCHA_MODEL&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;models\/matcha-s64.rknn&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        os<span class=\"token punctuation\">.<\/span>environ<span class=\"token punctuation\">.<\/span>setdefault<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;VOCOS_MODEL&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;models\/vocos-16khz-600.rknn&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">from<\/span> rkvoice_stream<span class=\"token punctuation\">.<\/span>backends<span class=\"token punctuation\">.<\/span>tts<span class=\"token punctuation\">.<\/span>matcha <span class=\"token keyword\">import<\/span> create_rknn_tts_backend<\/p>\n<p>        self<span class=\"token punctuation\">.<\/span>engine <span class=\"token operator\">&#061;<\/span> create_rknn_tts_backend<span class=\"token punctuation\">(<\/span>model_dir<span class=\"token punctuation\">)<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>engine<span class=\"token punctuation\">.<\/span>load<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        self<span class=\"token punctuation\">.<\/span>sample_rate <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">16000<\/span><\/p>\n<p>    <span class=\"token keyword\">def<\/span> <span class=\"token function\">generate<\/span><span class=\"token punctuation\">(<\/span>self<span class=\"token punctuation\">,<\/span> text<span class=\"token punctuation\">,<\/span> sid<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> speed<span class=\"token operator\">&#061;<\/span><span class=\"token number\">1.0<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        audio<span class=\"token punctuation\">,<\/span> _ <span class=\"token operator\">&#061;<\/span> self<span class=\"token punctuation\">.<\/span>engine<span class=\"token punctuation\">.<\/span>synthesize<span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">,<\/span> speed<span class=\"token operator\">&#061;<\/span>speed<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> _Speech<span class=\"token punctuation\">(<\/span>trim_tail<span class=\"token punctuation\">(<\/span>audio<span class=\"token punctuation\">,<\/span> self<span class=\"token punctuation\">.<\/span>sample_rate<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> self<span class=\"token punctuation\">.<\/span>sample_rate<span class=\"token punctuation\">)<\/span><\/p>\n<h4>5.3 \u5207\u53e5\u53c2\u6570\u6309\u540e\u7aef\u533a\u5206<\/h4>\n<p>\u540c\u4e00\u5957\u5207\u53e5\u903b\u8f91&#xff0c;VITS \u548c Matcha \u7684\u6700\u4f18\u5757\u957f\u5b8c\u5168\u4e0d\u540c&#xff1a;<\/p>\n<p><span class=\"token keyword\">if<\/span> args<span class=\"token punctuation\">.<\/span>tts <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token string\">&#034;matcha&#034;<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    first_len<span class=\"token punctuation\">,<\/span> chunk_len <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">24<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">40<\/span>     <span class=\"token comment\"># RTF 0.1&#xff0c;\u5757\u5927\u4e00\u70b9\u51cf\u5c11\u62fc\u63a5\u611f<\/span><br \/>\n<span class=\"token keyword\">else<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    first_len<span class=\"token punctuation\">,<\/span> chunk_len <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">18<\/span>     <span class=\"token comment\"># RTF 1.7&#xff0c;\u9996\u5757\u5fc5\u987b\u591f\u77ed<\/span><\/p>\n<p>\u540c\u65f6\u4fdd\u7559 &#8211;tts vits \u56de\u9000\u5f00\u5173&#xff0c;\u6362\u6a21\u578b\u51fa\u95ee\u9898\u65f6\u4e00\u884c\u53c2\u6570\u5c31\u80fd\u9000\u56de CPU \u65b9\u6848\u3002<\/p>\n<h4>5.4 \u6574\u673a\u65f6\u5ef6\u9884\u7b97&#xff08;0.5B &#043; Matcha&#xff0c;\u5b9e\u6d4b&#xff09;<\/h4>\n<p>\u6574\u673a\u94fe\u8def\u5df2\u7ecf\u5728\u677f\u5b50\u4e0a\u8dd1\u901a&#xff0c;ASR \u4e0e\u610f\u56fe\u5de5\u5177\u5c42\u7684\u5b9e\u73b0\u7ec6\u8282\u7559\u5230\u540e\u7eed\u90a3\u7bc7&#xff0c;\u8fd9\u91cc\u53ea\u770b\u65f6\u95f4\u82b1\u5728\u54ea\u3002<\/p>\n<table>\n<tr>\u73af\u8282\u8017\u65f6<\/tr>\n<tbody>\n<tr>\n<td>ASR&#xff08;Paraformer&#xff0c;\u6574\u53e5&#xff09;<\/td>\n<td>0.18 s<\/td>\n<\/tr>\n<tr>\n<td>LLM&#xff08;0.5B&#xff0c;\u77ed\u56de\u7b54&#xff0c;\u542b\u9996 token&#xff09;<\/td>\n<td>0.60 s<\/td>\n<\/tr>\n<tr>\n<td>TTS \u9996\u58f0<\/td>\n<td>0.41 s<\/td>\n<\/tr>\n<tr>\n<td>\u5408\u8ba1&#xff08;\u8bf4\u5b8c\u8bdd \u2192 \u542c\u89c1\u7b2c\u4e00\u4e2a\u5b57&#xff09;<\/td>\n<td>\u7ea6 1.2 s<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u957f\u56de\u7b54&#xff08;\u4e24\u4e09\u53e5&#xff09;\u7684 TTS \u9996\u58f0\u7ea6 0.75 s&#xff0c;\u56e0\u4e3a\u9996\u5757\u4ecd\u7136\u662f 24 \u5b57\u3002<\/p>\n<p>\u51b7\u542f\u52a8\u6ce8\u610f&#xff1a;LLM \u88c5\u8f7d\u7ea6 1.6 s\u3001Matcha&#043;Vocos \u88c5\u8f7d\u7ea6 1.2 s\u3001Paraformer \u88c5\u8f7d\u7ea6 8.5 s\u3002\u505a\u5e38\u9a7b\u670d\u52a1\u65f6\u53ea\u88c5\u4e00\u6b21&#xff0c;\u4e0d\u8981\u5728\u6bcf\u8f6e\u5bf9\u8bdd\u91cc\u91cd\u65b0\u52a0\u8f7d\u3002<\/p>\n<h4>5.5 \u600e\u4e48\u8dd1<\/h4>\n<p><span class=\"token comment\"># \u5b9e\u65f6\u5524\u9192\u95ed\u73af&#xff08;\u9ed8\u8ba4 Matcha&#043;Vocos&#xff09;<\/span><br \/>\n\/userdata\/rkllm\/py312\/bin\/python3.12 <span class=\"token parameter variable\">-u<\/span> \/userdata\/rkllm\/assistant.py<\/p>\n<p><span class=\"token comment\"># \u4e0d\u5f00\u53e3&#xff0c;\u76f4\u63a5\u5582\u4e00\u53e5\u8bdd\u9a8c\u8bc1 LLM &#043; TTS &#043; \u64ad\u653e<\/span><br \/>\n\/userdata\/rkllm\/py312\/bin\/python3.12 <span class=\"token parameter variable\">-u<\/span> \/userdata\/rkllm\/assistant.py <span class=\"token punctuation\">\\\\<\/span><br \/>\n    <span class=\"token parameter variable\">&#8211;text<\/span> <span class=\"token string\">&#034;\u73b0\u5728\u6e29\u5ea6\u591a\u5c11&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u7528\u5f55\u597d\u7684 wav \u8d70\u5b8c\u6574\u94fe\u8def&#xff08;\u4e0d\u542b\u5524\u9192&#xff09;<\/span><br \/>\n\/userdata\/rkllm\/py312\/bin\/python3.12 <span class=\"token parameter variable\">-u<\/span> \/userdata\/rkllm\/assistant.py <span class=\"token punctuation\">\\\\<\/span><br \/>\n    <span class=\"token parameter variable\">&#8211;file<\/span> \/userdata\/rkllm\/asr_out\/cmd_20261017_184654.wav<\/p>\n<p><span class=\"token comment\"># \u56de\u9000\u5230 CPU VITS<\/span><br \/>\n\/userdata\/rkllm\/py312\/bin\/python3.12 <span class=\"token parameter variable\">-u<\/span> \/userdata\/rkllm\/assistant.py <span class=\"token parameter variable\">&#8211;tts<\/span> vits<\/p>\n<hr \/>\n<h3>\u516d\u3001\u9644\u5e26\u89e3\u51b3&#xff1a;\u8ba9\u6570\u5b57\u300c\u5ff5\u5f97\u50cf\u4e2d\u6587\u300d<\/h3>\n<p>\u6362\u5b8c\u6a21\u578b\u540e\u53c8\u5192\u51fa\u4e00\u4e2a\u65b0\u95ee\u9898&#xff1a;TTS \u524d\u7aef\u4f1a\u628a ASCII \u6570\u5b57\u6309\u82f1\u6587\u97f3\u7d20\u5316\u3002<\/p>\n<p>\u73b0\u5728\u662f 2026-10-21 22:05<br \/>\n\u2192 &#034;twenty twenty-six, ten, twenty-one, twenty-two oh five&#034;<\/p>\n<p>\u65f6\u95f4\u548c\u7cfb\u7edf\u72b6\u6001\u662f\u6700\u5e38\u95ee\u7684&#xff0c;\u8fd9\u4e48\u5ff5\u975e\u5e38\u51fa\u620f\u3002\u89e3\u51b3\u529e\u6cd5\u4e0d\u662f\u6539 TTS&#xff0c;\u800c\u662f\u5728\u5de5\u5177\u5c42\u5c31\u628a\u6570\u5b57\u5199\u6210\u6c49\u5b57&#xff08;TTS \u53ea\u8d1f\u8d23\u5ff5&#xff0c;\u4e0d\u8d1f\u8d23\u7406\u89e3&#xff09;&#xff1a;<\/p>\n<p>_CN_DIGITS <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\u96f6\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d&#034;<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">_cn_year<\/span><span class=\"token punctuation\">(<\/span>y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>_CN_DIGITS<span class=\"token punctuation\">[<\/span><span class=\"token builtin\">int<\/span><span class=\"token punctuation\">(<\/span>d<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token keyword\">for<\/span> d <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">str<\/span><span class=\"token punctuation\">(<\/span>y<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">cn_date<\/span><span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;%s\u5e74%s\u6708%s\u65e5 \u661f\u671f%s&#034;<\/span> <span class=\"token operator\">%<\/span> <span class=\"token punctuation\">(<\/span><br \/>\n        _cn_year<span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">.<\/span>year<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> _cn_under100<span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">.<\/span>month<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> _cn_under100<span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">.<\/span>day<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u65e5&#034;<\/span><span class=\"token punctuation\">[<\/span>now<span class=\"token punctuation\">.<\/span>weekday<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">cn_time<\/span><span class=\"token punctuation\">(<\/span>now<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># 22:05 \u2192 \u665a\u4e0a\u5341\u70b9\u96f6\u4e94\u5206<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><\/p>\n<p>\u53e6\u5916\u4e09\u4e2a\u51fd\u6570\u8d1f\u8d23\u5176\u5b83\u573a\u666f&#xff1a;<\/p>\n<table>\n<tr>\u51fd\u6570\u7528\u9014\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>cn_int<\/td>\n<td>\u6574\u6570&#xff08;\u5185\u5b58\u3001\u6761\u6570\u3001\u7b97\u5f0f&#xff09;<\/td>\n<td>3893 \u2192 \u4e09\u5343\u516b\u767e\u4e5d\u5341\u4e09<\/td>\n<\/tr>\n<tr>\n<td>cn_dec<\/td>\n<td>\u5c0f\u6570&#xff08;\u6e29\u5ea6\u3001\u8d1f\u8f7d&#xff09;<\/td>\n<td>45.2 \u2192 \u56db\u5341\u4e94\u70b9\u4e8c&#xff1b;3.50 \u2192 \u4e09\u70b9\u4e94<\/td>\n<\/tr>\n<tr>\n<td>cn_digits<\/td>\n<td>\u6570\u5b57\u4e32\u9010\u4f4d\u8bfb&#xff08;IP&#xff09;<\/td>\n<td>192.168.0.103 \u2192 \u4e00\u4e5d\u4e8c\u70b9\u4e00\u516d\u516b\u70b9\u96f6\u70b9\u4e00\u96f6\u4e09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5de5\u5177\u5c42\u6539\u5b8c\u540e&#xff0c;\u540c\u4e00\u6761\u94fe\u8def\u5b9e\u6d4b&#xff1a;<\/p>\n<table>\n<tr>\u67e5\u8be2TTS \u5b9e\u9645\u64ad\u62a5<\/tr>\n<tbody>\n<tr>\n<td>\u73b0\u5728\u51e0\u70b9<\/td>\n<td>\u73b0\u5728\u662f \u4e8c\u96f6\u4e8c\u516d\u5e74\u5341\u6708\u4e8c\u5341\u4e00\u65e5 \u661f\u671f\u4e09&#xff0c;\u665a\u4e0a\u5341\u70b9\u4e8c\u5341\u4e8c\u5206<\/td>\n<\/tr>\n<tr>\n<td>\u770b\u770b\u6e29\u5ea6<\/td>\n<td>\u6e29\u5ea6 soc \u4e94\u5341\u70b9\u516b \u5ea6&#xff0c;bigcore \u4e94\u5341\u4e8c\u70b9\u4e03 \u5ea6&#xff0c;npu \u56db\u5341\u4e5d\u70b9\u4e5d \u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u5b58\u8fd8\u5269\u591a\u5c11<\/td>\n<td>\u5185\u5b58\u5171 \u4e09\u5343\u516b\u767e\u4e5d\u5341\u4e09 \u5146&#xff0c;\u53ef\u7528 \u4e8c\u5343\u4e09\u767e\u56db\u5341 \u5146<\/td>\n<\/tr>\n<tr>\n<td>\u672c\u673a IP<\/td>\n<td>\u672c\u673a IP \u4e00\u4e8c\u4e03\u70b9\u96f6\u70b9\u96f6\u70b9\u4e00\u3001\u4e00\u4e5d\u4e8c\u70b9\u4e00\u516d\u516b\u70b9\u96f6\u70b9\u4e00\u96f6\u4e09<\/td>\n<\/tr>\n<tr>\n<td>\u770b\u770b\u5f85\u529e<\/td>\n<td>\u4f60\u6709 \u4e00 \u6761\u5f85\u529e&#xff1a;\u4e00 \u660e\u5929\u4e70\u725b\u5976<\/td>\n<\/tr>\n<tr>\n<td>20 \u5206\u949f\u540e\u63d0\u9192\u6211\u5403\u836f<\/td>\n<td>\u597d\u7684&#xff0c;\u4e8c\u5341\u5206\u949f\u540e\u4f1a\u63d0\u9192\u4f60\u5403\u836f<\/td>\n<\/tr>\n<tr>\n<td>12 \u4e58\u4ee5 8 \u7b49\u4e8e\u591a\u5c11<\/td>\n<td>\u5341\u4e8c \u4e58\u4ee5 \u516b \u7b49\u4e8e \u4e5d\u5341\u516d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u518d\u7528 Paraformer \u56de\u8bfb\u5408\u6210\u51fa\u6765\u7684 wav&#xff0c;\u786e\u8ba4\u53d1\u97f3\u662f\u4e2d\u6587\u800c\u4e0d\u662f\u82f1\u6587&#xff1a;<\/p>\n<p>\u5185\u5b58\u5171\u4e09\u5343\u516b\u767e\u4e5d\u5341\u4e09\u5146<br \/>\n\u53ef\u7528\u4e8c\u5343\u4e09\u767e\u56db\u5341\u5146<br \/>\n\u6e29\u5ea6 soc \u4e94\u5341\u70b9\u516b\u5ea6<br \/>\n\u5341\u4e8c\u4e58\u4ee5\u516b\u7b49\u4e8e\u4e5d\u5341\u516d<\/p>\n<p>\u9996\u58f0\u4ecd\u662f 0.42 ~ 0.43 s&#xff0c;RTF 0.14 ~ 0.18 \u2014\u2014 \u4e2d\u6587\u8bfb\u6cd5\u6ca1\u6709\u5e26\u6765\u989d\u5916\u5f00\u9500\u3002<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u8e29\u5751\u6e05\u5355<\/h3>\n<table>\n<tr>\u5751\u73b0\u8c61\u89e3\u6cd5<\/tr>\n<tbody>\n<tr>\n<td>matcha.tar.bz2 \u662f\u622a\u65ad\u574f\u5305<\/td>\n<td>14.7 MB&#xff0c;\u89e3\u538b\u62a5\u9519&#xff08;\u771f\u5b9e\u7ea6 79 MB&#xff09;<\/td>\n<td>\u91cd\u65b0\u5b8c\u6574\u4e0b\u8f7d&#xff1b;\u89e3\u538b\u540e\u5e94\u6709 76 MB \u8d44\u6e90\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u8def\u5f84\u5c11\u4e00\u5c42 models\/<\/td>\n<td>\u540e\u7aef\u9759\u9ed8\u4e0d\u52a0\u8f7d&#xff0c;_matcha_backend is None&#xff0c;\u6ca1\u6709\u4efb\u4f55\u8b66\u544a<\/td>\n<td>\u9ed8\u8ba4\u8def\u5f84\u5199\u6210 models\/matcha-s64.rknn<\/td>\n<\/tr>\n<tr>\n<td>\u5c3e\u90e8\u6b8b\u54cd\u526a\u4e0d\u6389<\/td>\n<td>\u9608\u503c 0.01&#xff0c;\u6742\u97f3 RMS 0.108<\/td>\n<td>100 ms \u7a97\u80fd\u91cf\u5206\u6bb5&#xff0c;\u4fdd\u7559\u6700\u540e\u4e00\u4e2a \u22650.4 s \u8bed\u97f3\u6bb5<\/td>\n<\/tr>\n<tr>\n<td>\u5173\u6389\u5207\u53e5\u53cd\u800c\u66f4\u6162<\/td>\n<td>\u9996\u58f0 1.15 s&#xff0c;\u97f3\u9891\u4f30\u957f\u5230 11.41 s<\/td>\n<td>\u4fdd\u6301\u6309\u53e5\u5207\u5206&#xff08;24\/40&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>libespeak-ng-libespeak1<\/td>\n<td>2974 \u5b57\u8282\u8fc7\u6e21\u5305&#xff0c;\u88c5\u4e0a\u65e0\u6548<\/td>\n<td>\u7528 libespeak-ng1 &#043; dpkg-deb -x \u89e3\u5305<\/td>\n<\/tr>\n<tr>\n<td>pkill -f assistant.py<\/td>\n<td>\u628a\u81ea\u5df1\u7684 SSH \u4f1a\u8bdd\u4e00\u8d77\u6740\u4e86<\/td>\n<td>\u7528 ps -eo pid,args | grep ssistant | grep -v grep \u7cbe\u786e\u627e PID<\/td>\n<\/tr>\n<tr>\n<td>\u7cfb\u7edf Python 3.13<\/td>\n<td>\u88c5\u4e0d\u4e86 rknn-toolkit-lite2&#xff0c;\u65e0 pip\/apt\/gcc<\/td>\n<td>python-build-standalone CPython 3.12 \u9694\u79bb\u73af\u5883<\/td>\n<\/tr>\n<tr>\n<td>Kokoro \u770b\u8d77\u6765\u5f88\u7f8e<\/td>\n<td>\u5b9e\u6d4b RTF 3.6~4.0&#xff0c;\u6bd4 VITS \u8fd8\u6162<\/td>\n<td>\u4efb\u4f55\u6a21\u578b\u90fd\u5fc5\u987b\u5728\u76ee\u6807\u677f\u4e0a\u5b9e\u6d4b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>\u516b\u3001\u603b\u7ed3\u4e0e\u4e0b\u4e00\u6b65<\/h3>\n<li>VITS \u6162\u7684\u6839\u56e0\u4e0d\u662f\u7ebf\u7a0b\u6570&#xff0c;\u800c\u662f\u975e\u6d41\u5f0f &#043; CPU \u7b97\u529b\u4e0d\u8db3\u3002RTF 1.7 \u610f\u5473\u7740\u6c38\u8fdc\u8ffd\u4e0d\u4e0a\u5b9e\u65f6&#xff0c;\u8c03\u53c2\u53ea\u80fd\u5728 1.7~1.9 \u4e4b\u95f4\u6253\u8f6c\u3002<\/li>\n<li>\u5207\u53e5\u6d41\u6c34\u7ebf\u80fd\u628a\u9996\u58f0\u4ece 8~11 s \u964d\u5230 2.5~3.5 s&#xff0c;\u4f46 RTF &gt; 1&#xff0c;\u957f\u56de\u7b54\u4ecd\u4f1a\u51fa\u73b0\u5757\u95f4\u7a7a\u6863&#xff0c;\u53ea\u80fd\u6551\u6025\u3002<\/li>\n<li>Kokoro \u5728 RK3576 \u4e0a\u66f4\u6162&#xff1b;\u539f\u5382 RKNN TTS \u53d7 VITS flow \u7b97\u5b50\u9650\u5236 \u2014\u2014 \u300c\u6362 NPU\u300d\u5e76\u4e0d\u81ea\u52a8\u7b49\u4e8e\u300c\u53d8\u5feb\u300d\u3002<\/li>\n<li>Matcha&#xff08;\u6761\u4ef6\u6d41\u5339\u914d&#xff09;&#043; Vocos&#xff08;\u7eaf\u5377\u79ef\u58f0\u7801\u5668&#xff09;\u5168\u90e8\u9759\u6001\u7f16\u8bd1\u8fdb RKNN&#xff0c;\u662f\u8fd9\u5757\u677f\u5b50\u4e0a\u76ee\u524d\u6700\u4f18\u89e3&#xff1a;RTF 0.10\u3001\u9996\u58f0 0.4 s\u3001\u6574\u673a 1.2 s \u51fa\u58f0\u3002<\/li>\n<li>\u56fa\u5b9a shape \u6a21\u578b\u5fc5\u987b\u914d trim_tail&#xff0c;\u5426\u5219\u5c3e\u90e8\u4f1a\u591a\u51fa\u300c\u9759\u97f3 &#043; \u6742\u97f3\u300d&#xff1b;\u540c\u65f6\u5207\u53e5\u4e0d\u80fd\u7701&#xff0c;\u9996\u5757\u8d8a\u77ed\u9996\u58f0\u8d8a\u5feb\u3002<\/li>\n<li>\u4e2d\u6587\u6570\u5b57\u8bfb\u6cd5\u8981\u5728\u5de5\u5177\u5c42\u505a&#xff0c;\u522b\u6307\u671b TTS \u524d\u7aef\u628a 22:05 \u5ff5\u6210\u4e2d\u6587\u3002<\/li>\n<li>\u6240\u6709\u7248\u672c\u8981\u5bf9\u9f50&#xff1a;librknnrt 2.3.2 &#061; rknn-toolkit-lite2 2.3.2 &#061; \u6a21\u578b\u7f16\u8bd1\u65f6\u7684 toolkit 2.3.2\u3002<\/li>\n<p>\u4e0b\u4e00\u6b65\u53ef\u4ee5\u505a\u7684&#xff1a;<\/p>\n<ul>\n<li>\u771f\u6b63\u7684\u6d41\u5f0f TTS&#xff1a;\u76ee\u524d Matcha \u662f\u56fa\u5b9a\u7a97\u53e3\u6574\u6bb5\u51fa\u97f3&#xff08;\u4e00\u6b21\u5410\u51fa 4 \u79d2&#xff09;&#xff0c;\u8981\u66f4\u4f4e\u5ef6\u8fdf\u9700\u8981\u80fd\u5206\u5757\u5582\u58f0\u7801\u5668\u7684\u6d41\u5f0f\u5b9e\u73b0&#xff1b;<\/li>\n<li>\u65f6\u957f\u4f30\u8ba1\u4fee\u6b63&#xff1a;\u7eaf\u4e2d\u6587\u7684 mel \u5e27\u6570\u4f30\u8ba1\u504f\u5927 30%~40%&#xff0c;\u73b0\u5728\u9760 trim_tail \u515c\u5e95&#xff0c;\u540e\u7eed\u53ef\u4ee5\u6309\u6587\u672c\u957f\u5ea6\u505a\u7ebf\u6027\u6821\u6b63&#xff0c;\u51cf\u5c11\u65e0\u6548\u8ba1\u7b97&#xff1b;<\/li>\n<li>\u591a\u8bf4\u8bdd\u4eba \/ \u97f3\u8272\u5207\u6362&#xff1a;Vocos \u672c\u8eab\u4e0e\u97f3\u8272\u65e0\u5173&#xff0c;\u6362 Matcha \u8bf4\u8bdd\u4eba embedding \u5373\u53ef\u3002<\/li>\n<\/ul>\n<hr \/>\n<p>\u672c\u6587\u4e3a Quectel Pi M2 \u79bb\u7ebf\u8bed\u97f3\u52a9\u624b\u7cfb\u5217\u5b9e\u8df5\u7b2c\u56db\u7bc7&#xff1a;TTS \u4f4e\u5ef6\u8fdf\u4f18\u5316&#xff08;VITS \/ Kokoro \/ Matcha&#043;Vocos \u5b9e\u6d4b\u5bf9\u6bd4&#xff09;\u3002<br \/>\n\u7cfb\u5217\u524d\u4f5c&#xff1a;\u677f\u8f7d\u9ea6\u514b\u98ce\u4e0e\u84dd\u7259\u64ad\u653e &#xff5c; \u4e2d\u6587\u8bed\u97f3\u5524\u9192&#xff08;KWS&#xff09; &#xff5c; RKLLM NPU \u63a8\u7406<br \/>\n\u4e0b\u4e00\u7bc7&#xff08;\u8ba1\u5212\u4e2d&#xff09;&#xff1a;ASR&#xff08;Paraformer&#xff09;&#043; \u610f\u56fe\u5de5\u5177\u5c42 &#043; \u6574\u673a\u95ed\u73af<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883&#xff1a;Quectel Pi M2&#xff08;\u745e\u82af\u5fae RK3576&#xff0c;4\u00d7A722.2GHz  4\u00d7A532.0GHz&#xff0c;6 TOPS NPU&#xff0c;3.8 GB RAM \u65e0 swap&#xff09;\/ Debian 13 (trixie) aarch64&#xff0c;\u5185\u6838 6.1.118-rt36<br \/>\n\u76ee\u6807&#xff1a;\u628a\u300c\u5b8c\u5168\u79bb\u7ebf\u4e2d\u6587\u8bed\u97f3\u52a9\u624b\u300d\u7684\u8bed\u97f3\u64ad\u62a5\u5ef6\u8fdf\u538b\u5230\u80fd\u81ea\u7136\u5bf9\u8bdd\u7684\u7a0b\u5ea6<br \/>\n\u5173\u952e\u8bcd&#xff1a;sherpa-onnx\u3001<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13178,50,1395],"topic":[],"class_list":["post-116923","post","type-post","status-publish","format-standard","hentry","category-server","tag-1024---","tag-50","tag-1395"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \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\/116923.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u73af\u5883&#xff1a;Quectel Pi M2&#xff08;\u745e\u82af\u5fae RK3576&#xff0c;4\u00d7A722.2GHz 4\u00d7A532.0GHz&#xff0c;6 TOPS NPU&#xff0c;3.8 GB RAM \u65e0 swap&#xff09;\/ Debian 13 (trixie) aarch64&#xff0c;\u5185\u6838 6.1.118-rt36 \u76ee\u6807&#xff1a;\u628a\u300c\u5b8c\u5168\u79bb\u7ebf\u4e2d\u6587\u8bed\u97f3\u52a9\u624b\u300d\u7684\u8bed\u97f3\u64ad\u62a5\u5ef6\u8fdf\u538b\u5230\u80fd\u81ea\u7136\u5bf9\u8bdd\u7684\u7a0b\u5ea6 \u5173\u952e\u8bcd&#xff1a;sherpa-onnx\u3001\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/116923.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-22T01:16:33+00:00\" \/>\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=\"9 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/116923.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/116923.html\",\"name\":\"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-22T01:16:33+00:00\",\"dateModified\":\"2026-10-22T01:16:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/116923.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/116923.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/116923.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2\"}]},{\"@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":"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \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\/116923.html","og_locale":"zh_CN","og_type":"article","og_title":"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u73af\u5883&#xff1a;Quectel Pi M2&#xff08;\u745e\u82af\u5fae RK3576&#xff0c;4\u00d7A722.2GHz 4\u00d7A532.0GHz&#xff0c;6 TOPS NPU&#xff0c;3.8 GB RAM \u65e0 swap&#xff09;\/ Debian 13 (trixie) aarch64&#xff0c;\u5185\u6838 6.1.118-rt36 \u76ee\u6807&#xff1a;\u628a\u300c\u5b8c\u5168\u79bb\u7ebf\u4e2d\u6587\u8bed\u97f3\u52a9\u624b\u300d\u7684\u8bed\u97f3\u64ad\u62a5\u5ef6\u8fdf\u538b\u5230\u80fd\u81ea\u7136\u5bf9\u8bdd\u7684\u7a0b\u5ea6 \u5173\u952e\u8bcd&#xff1a;sherpa-onnx\u3001","og_url":"https:\/\/www.wsisp.com\/helps\/116923.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-22T01:16:33+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"9 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/116923.html","url":"https:\/\/www.wsisp.com\/helps\/116923.html","name":"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-22T01:16:33+00:00","dateModified":"2026-10-22T01:16:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/116923.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/116923.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/116923.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"#\u79fb\u8fdc\u4ea7\u54c1\u4f53\u9a8c\u5b98 Quectel Pi M2 \u5b9e\u6218\uff1a\u79bb\u7ebf TTS \u4ece 11 \u79d2\u538b\u5230 0.4 \u79d2"}]},{"@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\/116923","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=116923"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/116923\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=116923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=116923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=116923"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=116923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}