文字的发音
2016-02-15 20:20
435 查看
AVSpeechSynthesizer *reader = [[AVSpeechSynthesizer
alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance
speechUtteranceWithString:self.wenZiLabel.text];
AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice
voiceWithLanguage:@"zh-TW"];
utterance.voice = voice;
[reader speakUtterance:utterance];
需要导入的库
AVFoundation.framework
#import <AVFoundation/AVSpeechSynthesis.h>
alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance
speechUtteranceWithString:self.wenZiLabel.text];
AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice
voiceWithLanguage:@"zh-TW"];
utterance.voice = voice;
[reader speakUtterance:utterance];
需要导入的库
AVFoundation.framework
#import <AVFoundation/AVSpeechSynthesis.h>
相关文章推荐
- 重学C++ (十一) OOP面向对象编程(2)
- uploadify的用法与动态传参 提供demo下载
- 实现从一个界面返回有导航条的界面然后再跳转到下一个界面
- AFNetworking2.0源码解析<一>
- 低版本VC2010打开高版本VC2012的方法
- C++继承与派生
- x265-1.8版本-encoder/motion.cpp注释
- viewFlipper的使用实现自动轮播广告图片
- tableView以及cell的使用
- 提高php编程效率的方法
- C++11新特性之move与forward
- Java [Leetcode 67]Add Binary
- php问答笔记
- 多态
- Java用pinyin4j库实现汉字转拼音
- The Java™ Tutorials — Concurrency :Intrinsic Locks and Synchronization 内置锁和同步
- 杂
- nGrinder工具进行接口性能测试
- x265-1.8版本-encoder/level.cpp注释
- 新浪微博之微博分享