因为需要dll文件在linux系统无法运行
public static void textToSpeech(@RequestBody JSONObject json) {
ActiveXComponent ax = null;
try {
//text就是要说的话
String text = json.getString("text");
ax = new ActiveXComponent("Sapi.SpVoice");
// 运行时输出语音内容
Dispatch spVoice = ax.getObject();
// 音量 0-100
ax.setProperty("Volume", new Variant(100));
// 语音朗读速度 -10 到 +10
ax.setProperty("Rate", new Variant