IFlyTTS
讯飞语言 文字合成语音二次封装,离线语言合成,支持语速等调节。简单使用。Appid可以到官网申请。
需求
安装
pod 'IFlyTTS'
- 一
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[IFlyTTS configAppID:@""];
return YES;
}
- 二
@property(nonatomic,strong) IFlyTTS *tts;
IFlyTTS_Config *config = [IFlyTTS_Config sharedInstance];
self.tts = [[IFlyTTS alloc]init];
self.tts.delegate = self;
[self.tts speechSynthesizerWith: config];
- 三
[self.tts playText:testStr];