| | |
| | | console.info('你的电脑不支持中文播报!');
|
| | | }
|
| | | _timeInterval = this.timeInterval;
|
| | | //console.info(this.zh_CN);
|
| | | //console.info(this.speak_enable);
|
| | | if(!this.speak_enable){ //识别是否开启声音播报
|
| | | if(callback && typeof callback == 'function'){
|
| | | setTimeout(function(){
|
| | |
| | | to_speak.voice = this.voice; // 设定中文播报
|
| | | to_speak.rate = this.rate;
|
| | | //console.info(to_speak);
|
| | | this.speak.speak(to_speak);
|
| | | |
| | | var starttime = new Date();
|
| | | this.speak.speak(to_speak);
|
| | | console.info(to_speak);
|
| | | to_speak.onend = function(event) {
|
| | | //console.info(event);
|
| | | //console.info("播放结束");
|
| | | if(callback && typeof callback == 'function'){
|
| | | var endtime = new Date();
|
| | | var timelong = (endtime.getTime()-starttime.getTime())/1000;
|
| | |
| | | };
|
| | |
|
| | | to_speak.onerror = function(event) {
|
| | | //console.info(event);
|
| | | console.info(event);
|
| | | };
|
| | | };
|
| | |
|