菜鸟教程小白 发表于 2022-12-13 06:31:23

ios - Apple Watch/WatchKit 语音合成器


                                            <p><p>有谁知道是否可以访问 Apple Watch 的内置语音合成器? </p>

<p>对于我的 iOS 主应用,我使用了 <code>AVSpeechSynthesizer</code>,如下所示:</p>

<pre><code>AVSpeechUtterance *utterance = [ initWithString:theSpeech];
utterance.voice = ;
</code></pre>

<p>这很完美,但相同的代码在 WatchKit 扩展中不起作用。 </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>根据 <a href="https://devforums.apple.com/message/1119198#1119198" rel="noreferrer noopener nofollow">development forums</a> 中的答案,目前似乎无法直接在 Apple Watch 上播放音频。</p>

<p>WatchKit 扩展中合成语音的播放将在 iPhone 上进行。这可能不是理想的用户体验。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Apple Watch/WatchKit 语音合成器,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/29755733/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/29755733/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Apple Watch/WatchKit 语音合成器