{"id":34588,"date":"2025-04-30T07:10:49","date_gmt":"2025-04-29T23:10:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/34588.html"},"modified":"2025-04-30T07:10:49","modified_gmt":"2025-04-29T23:10:49","slug":"easymrcp-%e9%9b%86%e6%88%90asr-tts%e7%9a%84mrcp%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/34588.html","title":{"rendered":"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\u670d\u52a1\u5668"},"content":{"rendered":"<h2 id=\"GgclW\">\u7b80\u4ecb<\/h2>\n<p id=\"u6d0171e9\">\u6b22\u8fce\u4f7f\u7528EasyMrcp&#xff01;<\/p>\n<p id=\"uf57345f5\">EasyMrcp\u4f7f\u7528java\u7f16\u5199&#xff0c;\u76ee\u524d\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684asr\u548ctts\u7684\u96c6\u6210&#xff0c;\u505a\u5230\u771f\u6b63\u7b80\u5355\u4f7f\u7528MRCP\u3002<\/p>\n<p id=\"ub41136c7\">\u53ef\u76f4\u63a5\u66ff\u4ee3UniMrcp&#xff0c;\u90e8\u5206\u529f\u80fd\u6b63\u5728\u5b8c\u5584\u4e2d&#8230;&#8230;.<\/p>\n<p>github\u5730\u5740&#xff1a;https:\/\/github.com\/chenliangrui\/EasyMrcp<\/p>\n<h2 id=\"J6nPf\">\u76ee\u524d\u652f\u6301<\/h2>\n<p id=\"ue47f74db\">\u9879\u76ee\u8fed\u4ee3\u4e2d&#xff0c;\u540e\u7eed\u4f1a\u96c6\u6210\u66f4\u591a\u7684asr\u548ctts\u670d\u52a1&#xff0c;\u6b22\u8fce\u63d0\u51fa\u6307\u6b63\u95ee\u9898\u3002<\/p>\n<table id=\"iXS1u\">\n<tbody>\n<tr>\n<td>\n<p id=\"u8633b703\">\u7535\u8bdd\u8f6f\u4ea4\u6362\u5e73\u53f0<\/p>\n<\/td>\n<td>\n<p id=\"u2da047c9\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"u9dd6fe61\">freeswitch<\/p>\n<\/td>\n<td>\n<p id=\"uee34c9dc\">\u652f\u6301<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table id=\"lhndn\">\n<tbody>\n<tr>\n<td>\n<p id=\"u3b84f72c\">ASR<\/p>\n<\/td>\n<td>\n<p id=\"u0c5ea833\">\u652f\u6301\u7684asr\u6a21\u5f0f<\/p>\n<\/td>\n<td>\n<p id=\"u05364135\">\u7b80\u4ecb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"ube2fc736\">funAsr<\/p>\n<\/td>\n<td>\n<p id=\"u4d8d7813\">\u5b9e\u65f6\u8bed\u97f3\u8f6c\u5199<\/p>\n<\/td>\n<td>\n<p id=\"u2634f375\">\u963f\u91cc\u5f00\u6e90&#xff0c;\u514d\u8d39\u53ef\u79bb\u7ebf\u8fd0\u884c\u7684asr&#xff0c;\u5730\u5740&#xff1a;https:\/\/github.com\/modelscope\/FunASR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"ua194d3dc\">xfyun<\/p>\n<\/td>\n<td>\n<p id=\"ub5bd519e\">\u5b9e\u65f6\u8bed\u97f3\u8f6c\u5199\u3001\u4e00\u53e5\u8bdd\u8bed\u97f3\u8bc6\u522b<\/p>\n<\/td>\n<td>\n<p id=\"u2bf0ee05\">\u79d1\u5927\u8baf\u98de\u5728\u7ebfasr\u670d\u52a1&#xff0c;\u6bcf\u5929\u6709\u514d\u8d39\u989d\u5ea6\u3002\u4e00\u53e5\u8bdd\u8bed\u97f3\u8bc6\u522b&#xff1a;\u8bed\u97f3\u542c\u5199_\u8bed\u97f3\u8bc6\u522b-\u8baf\u98de\u5f00\u653e\u5e73\u53f0 \u957f\u65f6\u95f4\u5b9e\u65f6\u8bed\u97f3\u8f6c\u5199&#xff1a;\u5b9e\u65f6\u8bed\u97f3\u8f6c\u5199_\u5b9e\u65f6\u8bed\u97f3\u8bc6\u522b\u670d\u52a1-\u8baf\u98de\u5f00\u653e\u5e73\u53f0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table id=\"Ztnqf\">\n<tbody>\n<tr>\n<td>\n<p id=\"ucb168bab\">TTS<\/p>\n<\/td>\n<td>\n<p id=\"u3b241dc5\">\u652f\u6301\u7684tts\u6a21\u5f0f<\/p>\n<\/td>\n<td>\n<p id=\"u9ba61c88\">\u7b80\u4ecb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"ud52ab47a\">kokoro<\/p>\n<\/td>\n<td>\n<p id=\"u15e61b87\">\u6d41\u5f0f<\/p>\n<\/td>\n<td>\n<p id=\"ue5c5d291\">\u79bb\u7ebf\u7684tts\u670d\u52a1&#xff0c;\u5f00\u6e90\u514d\u8d39&#xff0c;\u4f7f\u7528FastAPI\u9879\u76ee&#xff1a;https:\/\/github.com\/remsky\/Kokoro-FastAPI<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p id=\"u98949bda\">xfyun<\/p>\n<\/td>\n<td>\n<p id=\"u6d0a2d62\">\u6d41\u5f0f<\/p>\n<\/td>\n<td>\n<p id=\"u5e62fd7f\">\u79d1\u5927\u8baf\u98de\u5728\u7ebftts\u670d\u52a1&#xff0c;\u6bcf\u5929\u6709\u514d\u8d39\u989d\u5ea6\u3002\u5730\u5740&#xff1a;\u5728\u7ebf\u8bed\u97f3\u5408\u6210_\u514d\u8d39\u8bd5\u7528-\u8baf\u98de\u5f00\u653e\u5e73\u53f0<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"MIm6Y\">\u66f4\u591a\u6587\u6863\u652f\u6301<\/h2>\n<p id=\"uc4e51583\">\u66f4\u591a\u6587\u6863\u6b63\u5728\u5b8c\u5584\u4e2d&#8230;&#8230;<\/p>\n<p id=\"u6882b1f4\">\u5730\u5740&#xff1a;EasyMrcp \u00b7 \u8bed\u96c0 \u300aEasyMrcp\u300b<\/p>\n<h2 id=\"ip4yj\">\u4e0b\u8f7d\u7a0b\u5e8f<\/h2>\n<p id=\"ubb6d1887\">\u4e0b\u8f7d\u53d1\u5e03\u7684jar\u5305&#xff0c;\u76ee\u524d\u7248\u672c\u6b63\u5728\u8fed\u4ee3\u4e2d&#xff0c;\u5982\u679c\u53d1\u7248\u4e0d\u53ca\u65f6\u53ef\u4ee5\u81ea\u5df1maven\u7f16\u8bd1\u8fd0\u884c\u9879\u76ee\u3002<\/p>\n<h2 id=\"S7AnP\">\u8fd0\u884c\u7a0b\u5e8f<\/h2>\n<h3 id=\"I1xoy\">\u524d\u7f6e\u51c6\u5907<\/h3>\n<p id=\"uf59ddb84\">\u9879\u76ee\u8fd0\u884c\u9700\u8981JDK11<\/p>\n<h3 id=\"kU2G2\">\u5fc5\u8981\u7684\u914d\u7f6e<\/h3>\n<h4 id=\"l8E4I\">\u914d\u7f6e\u9879\u76ee\u8fd0\u884c\u6587\u4ef6<\/h4>\n<p id=\"u0c77916a\">\u4e5f\u53ef\u4ee5\u53c2\u8003\u522b\u4eba\u63d0\u4f9b\u7684\u914d\u7f6e\u65b9\u6cd5&#xff1a;https:\/\/github.com\/reSipWebRTC\/UniMRCP-with-freeswitch<\/p>\n<p id=\"u404ec406\">\u914d\u7f6eFreeSWITCH<\/p>\n<p id=\"u87e5304a\">\u6211\u4eec\u9700\u8981\u5c06\u5904\u7406\u7528\u6237\u8bed\u97f3\u547c\u5165\u7684FreeSWITCH\u4e0e\u5411EasyMrcp\u4e24\u8005\u8fde\u63a5\u8d77\u6765\u3002<\/p>\n<li id=\"u5b18a158\">\u914d\u7f6eunimrcp\u6a21\u5757\u5e76\u81ea\u52a8\u52a0\u8f7d&#xff1b;<\/li>\n<p># \u7f16\u8f91\/usr\/local\/src\/freeswitch\/modules.conf\u6587\u4ef6&#xff0c;\u627e\u5230\u8981\u5b89\u88c5\u7684\u6a21\u5757&#xff0c;\u53bb\u6389\u524d\u9762\u7684\u6ce8\u91ca\u7b26\u53f7#<br \/>\ncd \/usr\/local\/src\/freeswitch<br \/>\nvim modules.conf<br \/>\n#asr_tts\/mod_unimrcp<br \/>\nasr_tts\/mod_unimrcp<\/p>\n<p># \u6267\u884cmake mod_xxx-install\u547d\u4ee4&#xff0c;\u8fd9\u6837\u5c31\u7f16\u8bd1\u76f8\u5e94\u6a21\u5757&#xff0c;\u5e76\u628a\u7f16\u8bd1\u540e\u7684\u52a8\u6001\u5e93\u5b89\u88c5\u7684\/usr\/local\/freeswitch\/mod\u76ee\u5f55\u4e0b<br \/>\nmake mod_unimrcp-install<\/p>\n<p># \u7f16\u8f91\/usr\/local\/freeswitch\/conf\/autoload_configs\/modules.conf.xml&#xff0c;\u53bb\u6389\u6ce8\u91ca\u7b26\u53f7&#xff0c;\u5982\u679c\u6ca1\u6709\u53d1\u73b0\u5bf9\u5e94\u6a21\u5757&#xff0c;\u5219\u6dfb\u52a0<br \/>\n&lt;load module&#061;&#034;mod_unimrcp&#034;\/&gt; <\/p>\n<li id=\"u920e5584\">\u8bbe\u7f6eprofile\u6587\u4ef6\u4e0econf\u6587\u4ef6&#xff1b;<\/li>\n<p id=\"u1c062761\">\u5728\/usr\/local\/freeswitch\/conf\/mrcp_profiles\u76ee\u5f55\u65b0\u5efaunimrcpserver-mrcp-v2.xml\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p>&lt;include&gt;<br \/>\n  &lt;!&#8211; UniMRCP Server MRCPv2 &#8211;&gt;<br \/>\n  &lt;!&#8211; \u540e\u9762\u6211\u4eec\u4f7f\u7528\u8be5\u914d\u7f6e\u6587\u4ef6&#xff0c;\u5747\u4f7f\u7528 name \u4f5c\u4e3a\u552f\u4e00\u6807\u8bc6&#xff0c;\u800c\u4e0d\u662f\u6587\u4ef6\u540d &#8211;&gt;<br \/>\n  &lt;profile name&#061;&#034;unimrcpserver-mrcp2&#034; version&#061;&#034;2&#034;&gt;<br \/>\n    &lt;!&#8211; MRCP \u670d\u52a1\u5668\u5730\u5740 &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;server-ip&#034; value&#061;&#034;192.168.1.23&#034;\/&gt;<br \/>\n    &lt;!&#8211; MRCP SIP \u7aef\u53e3\u53f7 &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;server-port&#034; value&#061;&#034;8060&#034;\/&gt;<\/p>\n<p>    &lt;!&#8211; FreeSWITCH IP\u3001\u7aef\u53e3\u4ee5\u53ca SIP \u4f20\u8f93\u65b9\u5f0f &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;client-ip&#034; value&#061;&#034;192.168.1.24&#034; \/&gt;<br \/>\n    &lt;param name&#061;&#034;client-port&#034; value&#061;&#034;5069&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;sip-transport&#034; value&#061;&#034;udp&#034;\/&gt;<\/p>\n<p>    &lt;!&#8211;param name&#061;&#034;rtp-ext-ip&#034; value&#061;&#034;auto&#034;\/&#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;rtp-ip&#034; value&#061;&#034;192.168.1.24&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;rtp-port-min&#034; value&#061;&#034;4000&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;rtp-port-max&#034; value&#061;&#034;5000&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;codecs&#034; value&#061;&#034;PCMU PCMA L16\/96\/8000&#034;\/&gt;<\/p>\n<p>    &lt;!&#8211; Add any default MRCP params for SPEAK requests here &#8211;&gt;<br \/>\n    &lt;synthparams&gt;<br \/>\n    &lt;\/synthparams&gt;<\/p>\n<p>    &lt;!&#8211; Add any default MRCP params for RECOGNIZE requests here &#8211;&gt;<br \/>\n    &lt;recogparams&gt;<br \/>\n      &lt;!&#8211;param name&#061;&#034;start-input-timers&#034; value&#061;&#034;false&#034;\/&#8211;&gt;<br \/>\n    &lt;\/recogparams&gt;<br \/>\n  &lt;\/profile&gt;<br \/>\n&lt;\/include&gt; <\/p>\n<p id=\"uf2b21931\">\u914d\u7f6e\/usr\/local\/freeswitch\/conf\/autoload_configs\/unimrcp.conf.xml\u6587\u4ef6&#xff1a;<\/p>\n<p>&lt;configuration name&#061;&#034;unimrcp.conf&#034; description&#061;&#034;UniMRCP Client&#034;&gt;<br \/>\n  &lt;settings&gt;<br \/>\n    &lt;!&#8211; UniMRCP profile to use for TTS &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;default-tts-profile&#034; value&#061;&#034;unimrcpserver-mrcp2&#034;\/&gt;<br \/>\n    &lt;!&#8211; UniMRCP profile to use for ASR &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;default-asr-profile&#034; value&#061;&#034;unimrcpserver-mrcp2&#034;\/&gt;<br \/>\n    &lt;!&#8211; UniMRCP logging level to appear in freeswitch.log.  Options are:<br \/>\n         EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;log-level&#034; value&#061;&#034;DEBUG&#034;\/&gt;<br \/>\n    &lt;!&#8211; Enable events for profile creation, open, and close &#8211;&gt;<br \/>\n    &lt;param name&#061;&#034;enable-profile-events&#034; value&#061;&#034;false&#034;\/&gt;<\/p>\n<p>    &lt;param name&#061;&#034;max-connection-count&#034; value&#061;&#034;100&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;offer-new-connection&#034; value&#061;&#034;1&#034;\/&gt;<br \/>\n    &lt;param name&#061;&#034;request-timeout&#034; value&#061;&#034;3000&#034;\/&gt;<br \/>\n  &lt;\/settings&gt;<\/p>\n<p>  &lt;profiles&gt;<br \/>\n    &lt;X-PRE-PROCESS cmd&#061;&#034;include&#034; data&#061;&#034;..\/mrcp_profiles\/*.xml&#034;\/&gt;<br \/>\n  &lt;\/profiles&gt;<\/p>\n<p>&lt;\/configuration&gt; <\/p>\n<p id=\"u046f5196\">\u6ce8&#xff1a;1.unimrcpserver-mrcp-v2.xml\u4e2dserver-ip\u4e3aEasyMrcp\u542f\u52a8\u7684\u4e3b\u673aip&#xff1b;2.client-ip\u548crtp-ip\u4e3aFreeSWITCH\u542f\u52a8\u7684\u4e3b\u673a&#xff0c;client-port\u4ed5FreeSWITCH\u4f5c\u4e3a\u5ba2\u6237\u7aef\u8bbf\u95eeunimrcpserver\u7684\u7aef\u53e3&#xff0c;\u624b\u673a\u4f5c\u4e3a\u5ba2\u6237\u7aef\u8bbf\u95ee\u7684FreeSWITCH\u7aef\u53e3\u9ed8\u8ba4\u4e3a5060&#xff0c;\u4e24\u8005\u4e0d\u540c&#xff1b;3.unimrcpserver-mrcp-v2.xml\u4e2d\u7684profile name\u5e94\u548cunimrcp.conf.xml\u4e2d\u7684default-tts-profile\u4e0edefault-ars-profile\u7684value\u4e00\u81f4&#xff08;\u6709\u4e9b\u6587\u6863\u7684\u5206\u6790\u4e2d\u79f0mrcp_profiles\u4e2d\u7684xml\u6587\u4ef6\u540d\u4e5f\u5fc5\u987b\u548c\u8fd9\u4e24\u8005\u4e00\u81f4&#xff0c;\u5b9e\u9645\u4e0a\u662f\u975e\u5fc5\u987b\u7684&#xff09;\u3002<\/p>\n<li id=\"u13a8e78f\">\u914d\u7f6e\u811a\u672c\u3002<\/li>\n<p id=\"u64c5c47f\">\u5728\/usr\/local\/freeswitch\/conf\/dialplan\/default.xml\u91cc\u65b0\u589e\u5982\u4e0b\u914d\u7f6e&#xff1a;<\/p>\n<p>&lt;extension name&#061;&#034;unimrcp&#034;&gt;<br \/>\n    &lt;condition field&#061;&#034;destination_number&#034; expression&#061;&#034;^888&#034;&gt;<br \/>\n       &lt;action application&#061;&#034;answer&#034;\/&gt;<br \/>\n        &lt;action application&#061;&#034;lua&#034; data&#061;&#034;names.lua&#034;\/&gt;<br \/>\n    &lt;\/condition&gt;<br \/>\n&lt;\/extension&gt; <\/p>\n<p id=\"ua3a3e591\">\u5728\/usr\/local\/freeswitch\/scripts\u76ee\u5f55\u4e0b\u65b0\u589enames.lua\u811a\u672c&#xff1a;<\/p>\n<p>&#8212;freeswitch\u8bed\u97f3\u8bc6\u522b\u8bed\u97f3\u5408\u6210\u811a\u672c<br \/>\nsession:answer();<br \/>\nfreeswitch.consoleLog(&#034;CRIT&#034;, &#034;\u811a\u672c\u5f00\u59cb\u6267\u884c\\\\n&#034;)<br \/>\nans &#061; &#034;\u4f60\u597d&#xff01; \u6211\u662f\u4f60\u7684\u52a9\u7406&#xff0c;\u6709\u4ec0\u4e48\u53ef\u4ee5\u5e2e\u5230\u4f60\u7684\u5417&#xff1f;&#034;<br \/>\nwhile session:ready() &#061;&#061; true do<br \/>\n  local s &#061; session<br \/>\n  local numName &#061; s:getVariable(&#039;caller_id_name&#039;)<br \/>\n  freeswitch.consoleLog(&#034;CRIT&#034;, &#034;\u7535\u8bdd\u540d\u79f0:&#034;..numName..&#034;\\\\n&#034;)<br \/>\n  local tts_voice &#061; &#039;xiaofang&#039;<br \/>\n  &#8212; \u8bbe\u7f6etts_engine\u548ctts_voice&#xff0c;\u6267\u884csay\u7684\u524d\u63d0\u6761\u4ef6\u662f\u8981\u6709\u8fd9\u4e24\u4e2a\u53c2\u6570<br \/>\n  s:execute(&#039;set&#039;, &#039;tts_engine&#061;unimrcp&#039;)<br \/>\n  s:execute(&#039;set&#039;, &#039;tts_voice&#061;&#039; .. tts_voice)<br \/>\n  &#8212; \u8bbe\u7f6etts_params&#xff0c;\u6267\u884cspeak\u7684\u524d\u63d0\u662f\u8981\u6709\u8fd9\u4e2a\u53c2\u6570<br \/>\n  s:set_tts_params(&#034;unimrcp&#034;, &#034;xiaofang&#034;);<\/p>\n<p>  s:execute(&#034;play_and_detect_speech&#034;, &#034;say:&#034;..ans..&#034; detect:unimrcp:unimrcpserver-mrcp2 hello&#034;)<br \/>\n  &#8212;- \u63a5\u6536asr\u8bc6\u522b\u5230\u7684\u8bed\u97f3\u4fe1\u606f<br \/>\n  local xml &#061; s:getVariable(&#039;detect_speech_result&#039;)<br \/>\n  &#8212;- \u5728\u63a7\u5236\u53f0\u6253\u5370\u51faasr\u8bc6\u522b\u7ed3\u679c\u7684\u65e5\u5fd7<br \/>\n  if xml ~&#061; nil then<br \/>\n    freeswitch.consoleLog(&#034;CRIT&#034;, numName..&#034;\u8bc6\u522b\u7ed3\u679c:&#034;..xml ..&#034;\\\\n&#034;)<br \/>\n    ans &#061; xml<br \/>\n  else<br \/>\n    freeswitch.consoleLog(&#034;CRIT&#034;, numName..&#034;No result!\\\\n&#034;)<br \/>\n  end<br \/>\nend <\/p>\n<p id=\"u429ffba6\">\u8fd9\u4e2a\u811a\u672c\u7684\u4f5c\u7528\u662ffreeswitch\u4fa7\u4f5c\u4e3amrcp\u5ba2\u6237\u7aef\u901a\u8fc7sip\u548cmrcp\u53bb\u63a7\u5236asr\u548ctts\u8fc7\u7a0b\u3002\u62e8\u6253\u7535\u8bdd\u6210\u529f\u540e\u4f1a\u542c\u5230tts\u5408\u6210\u7684\u63d0\u793a\u8bed\u97f3&#xff0c;\u6b64\u65f6\u8bf4\u8bdd\u5c31\u53ef\u4ee5\u8fdb\u884casr&#xff0c;\u63a5\u6536\u5230asr\u7684\u6587\u5b57\u4e4b\u540e\u53d1\u9001\u7ed9tts\u8fdb\u884c\u5408\u6210&#xff0c;\u6b64\u65f6\u5c31\u53ef\u4ee5\u542c\u5230\u521a\u624d\u8bf4\u7684\u8bdd\u4e86\u3002\u4e00\u76f4\u91cd\u590d\u6574\u4e2a\u8fc7\u7a0b\u5e76\u4e14\u652f\u6301\u8bed\u97f3\u6253\u65ad&#xff0c;\u76f4\u5230\u7528\u6237\u6302\u65ad\u7535\u8bdd\u3002<\/p>\n<p id=\"uace1786f\">\u6211\u4eec\u9700\u8981\u5728\/usr\/local\/freeswitch\/grammar\u76ee\u5f55\u65b0\u589ehello.gram\u8bed\u6cd5\u6587\u4ef6&#xff0c;\u53ef\u4ee5\u4e3a\u7a7a\u8bed\u6cd5\u6587\u4ef6\u987b\u6ee1\u8db3\u8bed\u97f3\u8bc6\u522b\u8bed\u6cd5\u89c4\u83031.0\u6807\u51c6&#xff08;\u7b80\u79f0 SRGS1.0&#xff09;&#xff0c;\u8be5\u8bed\u6cd5\u6587\u4ef6 ASR \u5f15\u64ce\u5728\u8fdb\u884c\u8bc6\u522b\u65f6\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n<p>#JSGF V1.0;<br \/>\n\/** JSGF Grammar for example *\/<br \/>\ngrammar example;<br \/>\npublic &lt;results&gt; &#061; []; <\/p>\n<h4 id=\"QT5JK\">\u914d\u7f6easr\/tts\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p id=\"ub10a52ad\">\u8bf7\u9009\u62e9\u8981\u4f7f\u7528\u7684\u4e00\u79cdasr\u548ctts\u8fdb\u884c\u5bf9\u5e94\u914d\u7f6e\u3002<\/p>\n<li id=\"uc0ff59ef\">\u914d\u7f6e\u9879\u76ee\u76ee\u5f55\u4e0b\u7684application.yaml\u6587\u4ef6&#xff0c;\u4e3b\u8981\u9700\u8981\u4fee\u6539\u7684\u914d\u7f6e\u5982\u4e0b&#xff1a; \u914d\u7f6esipServerEasyMrcp\u8fd0\u884c\u7684ip\u5730\u5740\u3002 \u914d\u7f6easrMode\u9009\u62e9\u4e00\u4e2aasr\u670d\u52a1\u540d\u79f0\u3002 \u914d\u7f6ettsMode\u9009\u62e9\u4e00\u4e2atts\u670d\u52a1\u540d\u79f0\u3002<\/li>\n<p>sip:<br \/>\n  # EasyMrcp\u8981\u76d1\u542c\u7684sip\u670d\u52a1\u5668\u5730\u5740&#xff0c;\u586b\u5199\u9879\u76ee\u8fd0\u884c\u7684ip\u5730\u5740<br \/>\n  sipServer: 192.168.31.29<br \/>\nmrcp:<br \/>\n  # \u9009\u62e9\u4e00\u4e2aasr\u670d\u52a1&#xff0c;\u76ee\u524d\u5df2\u7ecf\u96c6\u6210&#xff1a;xfyun\u3001funasr<br \/>\n  asrMode: xfyun<br \/>\n  # \u9009\u62e9\u4e00\u4e2atts\u670d\u52a1&#xff0c;\u76ee\u524d\u5df2\u7ecf\u96c6\u6210&#xff1a;xfyun\u3001kokoro<br \/>\n  ttsMode: xfyun <\/p>\n<h4 id=\"jcfHB\">\u547d\u4ee4\u8fd0\u884c<\/h4>\n<p id=\"u977dfd11\">\u6b63\u5e38\u8fd0\u884c\u9879\u76ee&#xff0c;\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p id=\"u327009eb\">java -jar EasyMrcp-x.x.x.jar<\/p>\n<p id=\"ua3b29197\">Windows\u4e2d\u8fd0\u884cEasyMrcp&#xff0c;\u5982\u679cfreeswitch\u811a\u672casr\u8bc6\u522b\u7ed3\u679c\u51fa\u73b0\u4e71\u7801\u5219\u5c1d\u8bd5\u6dfb\u52a0utf-8\u7f16\u7801\u8fd0\u884c&#xff0c;\u4e71\u7801\u540e\u4f1a\u5bfc\u81f4tts\u65e0\u6cd5\u5408\u6210&#xff1a;java -Dfile.encoding&#061;utf8 -jar EasyMrcp-x.x.x.jar<\/p>\n<h2 id=\"O7u3E\">\u8054\u7cfb\u6211<\/h2>\n<p id=\"u01803e74\">\u52a0\u5165QQ\u7fa4&#xff1a;<\/p>\n<p id=\"uc9440aac\">\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"850\" id=\"ud806fddf\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429231047-68115c77eabd7.png\" width=\"769\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u6b22\u8fce\u4f7f\u7528EasyMrcp\uff01EasyMrcp\u4f7f\u7528java\u7f16\u5199\uff0c\u76ee\u524d\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684asr\u548ctts\u7684\u96c6\u6210\uff0c\u505a\u5230\u771f\u6b63\u7b80\u5355\u4f7f\u7528MRCP\u3002\u53ef\u76f4\u63a5\u66ff\u4ee3UniMrcp\uff0c\u90e8\u5206\u529f\u80fd\u6b63\u5728\u5b8c\u5584\u4e2d&#8230;&#8230;.<\/p>\n","protected":false},"author":2,"featured_media":34587,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[43,1395],"topic":[],"class_list":["post-34588","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-43","tag-1395"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\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\/34588.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u6b22\u8fce\u4f7f\u7528EasyMrcp\uff01EasyMrcp\u4f7f\u7528java\u7f16\u5199\uff0c\u76ee\u524d\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684asr\u548ctts\u7684\u96c6\u6210\uff0c\u505a\u5230\u771f\u6b63\u7b80\u5355\u4f7f\u7528MRCP\u3002\u53ef\u76f4\u63a5\u66ff\u4ee3UniMrcp\uff0c\u90e8\u5206\u529f\u80fd\u6b63\u5728\u5b8c\u5584\u4e2d.......\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/34588.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-29T23:10:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429231047-68115c77eabd7.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\/34588.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/34588.html\",\"name\":\"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-29T23:10:49+00:00\",\"dateModified\":\"2025-04-29T23:10:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/34588.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/34588.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34588.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\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":"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\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\/34588.html","og_locale":"zh_CN","og_type":"article","og_title":"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u6b22\u8fce\u4f7f\u7528EasyMrcp\uff01EasyMrcp\u4f7f\u7528java\u7f16\u5199\uff0c\u76ee\u524d\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684asr\u548ctts\u7684\u96c6\u6210\uff0c\u505a\u5230\u771f\u6b63\u7b80\u5355\u4f7f\u7528MRCP\u3002\u53ef\u76f4\u63a5\u66ff\u4ee3UniMrcp\uff0c\u90e8\u5206\u529f\u80fd\u6b63\u5728\u5b8c\u5584\u4e2d.......","og_url":"https:\/\/www.wsisp.com\/helps\/34588.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-29T23:10:49+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429231047-68115c77eabd7.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\/34588.html","url":"https:\/\/www.wsisp.com\/helps\/34588.html","name":"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-29T23:10:49+00:00","dateModified":"2025-04-29T23:10:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/34588.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/34588.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/34588.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"EasyMrcp\u2014\u2014\u96c6\u6210ASR\/TTS\u7684mrcp\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\/34588","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=34588"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/34588\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/34587"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=34588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=34588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=34588"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=34588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}