心向大拿
心向大拿
  • 发布:2017-11-14 16:21
  • 更新:2022-09-01 16:36
  • 阅读:1784

ios文字合成语音没有声音

分类:Native.js

代码: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.plusSetAttribute("rate",64.5);
utterance.setVoice(voice);
sppech.speakUtterance(utterance);
plus.ios.deleteObject(voice);
plus.ios.deleteObject(utterance);
plus.ios.deleteObject(sppech);
运行结果没有声音

2017-11-14 16:21 负责人:无 分享
已邀请:
FullStack

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

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