cuốn sách gpt4 ai đã làm

ios - AVSpeechSynthesis 结束

In lại Tác giả: Walker 123 更新时间:2023-11-28 22:00:27 26 4
mua khóa gpt4 Nike

您好,我正在使用 AVSpeechSynthesizer 和 AVSpeechUtterance 构建一个 iOS 7 应用程序,我想弄清楚合成何时完成。更具体地说,我想在合成结束时更改播放/暂停按钮的外观。有人可以帮我理解在合成结束时是否调用了某种方法?提前致谢

câu trả lời hay nhất

cài đặtAVSpeechSynthesizercủadelegate属性并实现如下委托(delegate)方法:

- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didFinishSpeechUtterance:(AVSpeechUtterance *)utterance {
//do whatever you need to do
}

您可能还对 speechSynthesizer:didCancelSpeechUtterance: 委托(delegate)方法感兴趣,如果您以编程方式停止说话(例如,在按下按钮后)。

关于ios - AVSpeechSynthesis 结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25294893/

26 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress