首页 > 移动平台 > 详细

ios 将文本转化成语音

时间:2015-03-20 16:27:13      阅读:345      评论:0      收藏:0      [点我收藏+]

啥都不说:

直接上代码

   AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"你好我使用台语发音跟你说话。"];
    //台语发音
    AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-TW"];
    utterance.voice = voice;
    utterance.volume = 1.0;
    utterance.rate= 0.2;  //设置语速
    utterance.pitchMultiplier= 1.1;
    NSLog(@"%@",[AVSpeechSynthesisVoice speechVoices]);
    AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc]init];
    [synth speakUtterance:utterance];


ios 将文本转化成语音

原文:http://blog.csdn.net/hitourlee/article/details/44492011

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!