Skip to content

SpeechManager

用于 TTS 朗读。通过 SpeechManager.sharedInstance() 获取单例。

方法返回值说明
static sharedInstance()SpeechManager获取单例。
方法参数说明
startSpeechNotes(notes)notes: NSArray(MbBookNote 等)开始朗读笔记列表。
stopSpeech()停止。
pauseSpeech()暂停。
continueSpeech()继续。
prevSpeech() / nextSpeech()上/下一句。
canPrev / canNext是否可上/下一句。
playText(text)text: string朗读指定文本。
playText(text, languageTxt)text, languageTxt: string指定语言朗读。
属性类型说明
speakingboolean是否正在朗读。
pausedboolean是否暂停。
sceneWindowUIWindow场景窗口。
languageCodestring语言代码。