首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >swift: AVSpeechUtterance长时间暂停

swift: AVSpeechUtterance长时间暂停
EN

Stack Overflow用户
提问于 2018-08-18 00:55:20
回答 1查看 135关注 0票数 0

我有这个代码来阅读我的文本:

代码语言:javascript
复制
var utterance = AVSpeechUtterance()
var synthesizer = AVSpeechSynthesizer()

utterance = AVSpeechUtterance(string: "\(textCount[modeIndex][0])")
utterance.voice = AVSpeechSynthesisVoice(language: "en-US")
utterance.rate = 0.4
synthesizer = AVSpeechSynthesizer()
synthesizer.speak(utterance)

但在我的课文中,我想在一些单词之后做长时间的停顿。该怎么做呢?也许有一些符号可以做到这一点(这个--不长)?

EN

回答 1

Stack Overflow用户

发布于 2018-08-18 01:34:25

基于https://developer.apple.com/documentation/avfoundation/avspeechutterance#1668645的文档

您希望将话语拆分为多个排队的话语,并使用postUtteranceDelay

var postUtteranceDelay: TimeInterval

语音合成器在说出一个话语后,在处理下一个排队的话语之前等待的时间。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51899903

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档