8***@qq.com
8***@qq.com
  • 发布:2018-04-28 17:06
  • 更新:2022-09-01 16:19
  • 阅读:1297

关于ios的文字转语音

分类:Native.js

关于ios的文字转语音,怎么让它暂停播放等操作,它的监听事件怎么写

        function speak() {  
                var AVSpeechSynthesizer = plus.ios.importClass("AVSpeechSynthesizer");  
                var AVSpeechUtterance = plus.ios.importClass("AVSpeechUtterance");  
                var AVSpeechSynthesisVoice = plus.ios.import("AVSpeechSynthesisVoice");  
                var sppech = new AVSpeechSynthesizer();  
                var voice = AVSpeechSynthesisVoice.voiceWithLanguage("zh-CN");  
                var utterance = AVSpeechUtterance.speechUtteranceWithString(“哈哈哈哈哈”);  
                utterance.setVoice(voice);  
                sppech.speakUtterance(utterance);  

                plus.ios.deleteObject(voice);  
                plus.ios.deleteObject(utterance);  
                plus.ios.deleteObject(sppech);  
}
2018-04-28 17:06 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

该问题目前已经被锁定, 无法添加新回复