CyberLink Voice Interface

Source: Internet
Author: User
Tags cyberlink

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.