MVSpeechSynthesizeriOS 语音合成器

联合创作 · 2023-09-27 08:06

AVSpeechSynthesizer 的功能:

  1. Simple way to integrate the AVSpeechsynthesizer into your app.

  2. Instead of delgate method it provides block methods.

  3. Apart from simple usage it can auto detect the language of given string and read.

  4. It can higlight currently reading word.

  5. It also throw currently reading word with their langauge.

  6. It can auto scroll the page if once reached bottom of the text box.

  7. It can read all languages which is supported by AVSpeechSynthesizer

  8. It can list all supported langauages and their country name

Synth

示例代码:

MVSpeechSynthesizer *mvSpeech=[MVSpeechSynthesizer sharedSyntheSize];//Initialize the class
mvSpeech.higlightColor=[UIColor yellowColor];//Higlght backgroundcolor
mvSpeech.isTextHiglight=YES;//If you want to highlight set yes, othgerwise set no.
mvSpeech.speechString=//Pass string which is need to read.
mvSpeech.inputView=_helpTextView;//Pass the input view which carries the string.
[mvSpeech startRead];//Initialize the read function.
mvSpeech.speechFinishBlock=^(AVSpeechSynthesizer *synthesizer, AVSpeechUtterance *utterence){
 //It will call when read action finished.
};
浏览 8
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报