First add a Frame
Iflymsc.framework,
LIBZ.DYLIB/LIBZ.TBD (xcode7.x)
Avfoundation.framework
Systemconfiguration.framework
Foundation.framework
Coretelephoney.framework
Audiotoolbox.framework
Uikit.framework
Corelocation.framework
Addressbook.framework
Quartzcore.framework
Coregraphics.framework
To tell the truth, the framework is many, and most of them are currently not available, but considering the future of this article will continue to increase, so just post it.
Set the log level of the SDK, log is saved in the working path set below [iflysetting Setlogfile:lvl_all]; Open the log switch for output in console [iflysetting Showlogcat:yes]; Set the SDK's working path nsstring *paths=nssearchpathfordirectoriesindomains (nscachesdirectory, Nsuserdomainmask, YES) [0] ; [Iflysetting setlogfilepath:paths]; Create voice configuration, AppID must be passed in, only one time can nsstring *initstring=[[nsstring alloc]initwithformat:@ "appid=%@", Appid_value]; Before all services are started, you need to ensure that createutility [iflyspeechutility createutility:initstring] is executed;
Speech synthesis
@interface Viewcontroller () <IFlySpeechSynthesizerDelegate>
{
Service agents that need to implement iflyspeechsynthesizerdelegate compositing sessions
Iflyspeechsynthesizer *_iflyspeechsynthesizer;
}
-(Ibaction) Read: (UIButton *) Sender {//1. Create composite object _iflyspeechsynthesizer=[iflyspeechsynthesizer Sharedinstance]; _iflyspeechsynthesizer.delegate=self; 2. Set the composition parameters//settings online working mode [_iflyspeechsynthesizer setparameter:[iflyspeechconstant Type_cloud] Forkey:[iflyspeechconsta NT Engine_type]]; Volume, value range 0~100 [_iflyspeechsynthesizer setparameter:@ "Forkey:[iflyspeechconstant VOLUME]]; Speaking rate [_iflyspeechsynthesizer setparameter:@ "forkey:[iflyspeechconstant speed]]; Pronunciation person, default is "XiaoYan", can set the parameter list can refer to "Synthetic pronunciation person list" [_iflyspeechsynthesizer setparameter:@ "XiaoYan" forkey:[ Iflyspeechconstant Voice_name]]; Save the composition file name, set to nil if no longer needed, or null to cancel, default directory is located under Library/cache [_iflyspeechsynthesizer setparameter:@ "TTS.PCM" forkey:[ Iflyspeechconstant Tts_audio_path]]; 3. Start the synthesis session [_iflyspeechsynthesizer Startspeaking:_world.text];}
Iflyspeechsynthesizerdelegate protocol method
End Agent-(void) oncompleted: (Iflyspeecherror *) error{ NSLog (@ "End Agent");} Synthesis Start-(void) onspeakbegin{ NSLog (@ "composition start");} Synthetic buffering Progress-(void) onbufferprogress: (int) Progress message: (NSString *) msg{ NSLog (@ "Composition buffering Progress");} Composition playback Progress-(void) onspeakprogress: (int) progress{ NSLog (@ "Synthesis buffering Progress");}
CyberLink Voice Interface