Loading... <p> Java使用Jacob调用SAPI合成语音: </p> <p> 1.配置Jacob:我这里使用的jacob为jacob-1.18-M2,jacob-1.18-M2下载下来之后,解压缩文件, 里面的文件为docs、jacob.jar、jacob-1.18-M2-x64.dll、jacob-1.18-M2-x86.dll、LICENSE.TXT、README.txt; 把jacob.jar复制到项目的lib目录下面,jacob-1.18-M2-x64.dll和jacob-1.18-M2-x86.dll是两个动态库文件, 它们指JDK的安装版本,如果JDK是64位的,那么需要把jacob-1.18-M2-x64.dll复制到JRE BIN目录下面,因为 我装的JDK是32位的,所以我把jacob-1.18-M2-x86.dll复制到JRE BIN目录下面, 我的JRE路径为G:\Program Files (x86)\Java\jre7\bin。 </p> <p> 2.代码如下 </p> <ol start="1" class="dp-j" style="padding:0px;border:none;list-style-position:initial;list-style-image:initial;background-color:#FFFFFF;color:#5C5C5C;margin:0px 0px 1px 45px !important;"> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">package</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> com.jacob; </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">import</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> com.jacob.activeX.ActiveXComponent; </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">import</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> com.jacob.com.ComThread; </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">import</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> com.jacob.com.Dispatch; </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">import</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> com.jacob.com.Variant; </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">/**</span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * 调用MSTTS将字符串转换成语音信息</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * 调用windows speech API(SAPI)</span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * @author suyunlong</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> *</span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> */</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">public</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">class</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> MSTTSSpeech </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;">{ </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> volume=</span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">100</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 声音:1到100</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> rate=</span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">0</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 频率:-10到10</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> voice=</span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">0</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 语音库序号</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> audio=</span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">0</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 输出设备序号</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> ActiveXComponent ax=</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">; </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Dispatch spVoice=</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 声音对象</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Dispatch spFileStream=</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 音频文件输出流对象,在读取或保存音频文件时使用</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Dispatch spAudioFormat=</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 音频格式对象</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Dispatch spMMAudioOut=</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 音频输出对象</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">private</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> formatType=</span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">22</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">;</span><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">// 音频的输出格式,默认为:SAFT22kHz16BitMono</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">public</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> MSTTSSpeech() </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> ComThread.InitSTA(); </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(ax==</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">null</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> ax=<span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">new</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> ActiveXComponent(</span><span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Sapi.SpVoice"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">); </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> spVoice=ax.getObject(); </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">/**</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * 改变语音库</span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * @param voice 语音库序号</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> */</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">public</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">void</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> changeVoice(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> voice) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.voice != voice) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.voice=voice; </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">try</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch voiceItems=Dispatch.call(spVoice,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"GetVoices"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">).toDispatch(); </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> count=Integer.valueOf(Dispatch.call(voiceItems,</span><span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Count"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">).toString()); </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(count></span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">0</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch voiceItem=Dispatch.call(voiceItems,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Item"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">,</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">new</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Variant(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.voice)).toDispatch(); </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch.put(spVoice,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Voice"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">,voiceItem); </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">catch</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(Exception e) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> System.out.println(e.getMessage()); </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> e.printStackTrace(); </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">/**</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * 改变音频输出设备</span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * @param audio 音频设备序号</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> */</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">public</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">void</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> changeAudioOutput(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> audio) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.audio != audio) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.audio=audio; </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">try</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch audioOutputs=Dispatch.call(spVoice,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"GetAudioOutputs"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">).toDispatch(); </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">int</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> count=Integer.valueOf(Dispatch.call(audioOutputs,</span><span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Count"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">).toString()); </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">if</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(count > </span><span class="number" style="margin:0px;padding:0px;border:none;color:#C00000;background-color:inherit;">0</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch audioOutput=Dispatch.call(audioOutputs,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"Item"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">,</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">new</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;"> Variant(</span><span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">this</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">.audio)).toDispatch(); </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> Dispatch.put(spVoice,<span class="string" style="margin:0px;padding:0px;border:none;color:blue;background-color:inherit;">"AudioOutput"</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">,audioOutput); </span></span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="keyword" style="margin:0px;padding:0px;border:none;color:#006699;background-color:inherit;font-weight:bold;">catch</span><span style="margin:0px;padding:0px;border:none;background-color:inherit;">(Exception e) </span></span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> { </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> System.out.println(e.getMessage()); </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> e.printStackTrace(); </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> } </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"> <span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;">/**</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * 播放语音 </span> </span> </li> <li class="alt" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;color:inherit;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> * @param text 要转换成语音的文本</span> </span> </li> <li class="" style="border-top:none;border-right:none;border-bottom:none;border-left:3px solid #6CE26C;border-image:initial;list-style-type:decimal-leading-zero;list-style-image:initial;background-color:#F8F8F8;line-height:18px;margin:0px !important;padding:0px 3px 0px 10px !important;list-style-position:outside !important;"> <span style="margin:0px;padding:0px;border:none;color:black;background-color:inherit;"><span class="comment" style="margin:0px;padding:0px;border:none;color:#008200;background-color:inherit;"> */</span><span sty 最后修改:1970 年 01 月 01 日 © 允许规范转载 打赏 赞赏作者 赞 如果觉得我的文章对你有用,请随意赞赏