com.jacob.com.ComFailException: Invoke of: Speak总是报这个错,不知道为什么?

jacob报错图片说明
下面是代码:

public void speak(String context){
        ActiveXComponent sap = new ActiveXComponent("Sapi.SpVoice");
        Dispatch sapo = sap.getObject();
        Calendar calendar = Calendar.getInstance();
        String time = "";
        try {
            // 音量 0-100
            sap.setProperty("Volume", new Variant(100));
            // 语音朗读速度 -10 到 +10
            sap.setProperty("Rate", new Variant(0));
            // 执行朗读
            time = formatCal(calendar);

            System.out.println(time +":执行朗读,"+context);
            String logString = time +":执行朗读,"+context;
            logs(logString,null);
            Dispatch.call(sapo, "Speak", new Variant(context));
        } catch (Exception e) {
            System.out.println(time +"语音播放错误!"+context);
            String logString = time +"语音播放错误!"+context;
            logs(logString,"d:/speak/speechError/speechError.txt");
            e.printStackTrace();
        } finally {
            sapo.safeRelease();
            sap.safeRelease();
        }

这个问题解决之后很简单, 是因为没有安装语音合成软件,通常用的有百度ai和espeak等,我用的是espeak 官网http://espeak.sourceforge.net/
下载之后安装就可以了.