Skip to content

Commit

Permalink
Release RongCloud iFly Extension SDK 2.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RongRobot committed Dec 8, 2016
1 parent dfda4b3 commit cd7d354
Show file tree
Hide file tree
Showing 327 changed files with 17,264 additions and 0 deletions.
483 changes: 483 additions & 0 deletions ios-rongiflykit/RongiFlyKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// IFlyAudioSession.h
// MSCDemo
//
// Created by AlexHHC on 1/9/14.
//
//

#import <Foundation/Foundation.h>

/**
* 音频环境初始化
*/
@interface IFlyAudioSession : NSObject

/**
* 初始化播音环境
*
* @param isMPCenter 是否初始化MPPlayerCenter:0不初始化,1初始化
*/
+(void) initPlayingAudioSession:(BOOL)isMPCenter;

/**
* 初始化录音环境
*
* @return 成功返回YES,失败返回NO
*/
+(BOOL) initRecordingAudioSession;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// IFlyContact.h
// msc
//
// Created by ypzhao on 13-3-1.
// Copyright (c) 2013年 IFLYTEK. All rights reserved.
//

#import <Foundation/Foundation.h>

/*!
* 此接口为获取通信录中的联系人
* 获取联系人是为了在进行语音识别时(sms)能更好的识别出您说的人名,联系人上传是属于个性化的
* 一部分.
*/
@interface IFlyContact : NSObject

/*!
* 获取联系人
* 调用此方法需要添加 AddressBook.framework 到工程中,调用此方法后可以直接将通信录中的联系
* 人转化为语音云识别的数据结构。您可以将获取的数据通过IFlyDataUploader类,上传到语音云,我们
* 只获取通信录中的人名
*
* @return 返回联系人信息
*/
- (NSString *) contact;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//
// IFlyDataUploader.h
// MSC
//
// Created by ypzhao on 13-4-8.
// Copyright (c) 2013年 iflytek. All rights reserved.
//

#import <Foundation/Foundation.h>


@class IFlySpeechError;

/*!
* 数据上传类
*/
@interface IFlyDataUploader : NSObject

/*!
* 数据名称
*/
@property(nonatomic,copy) NSString *dataName;
/*!
* 数据
*/
@property(nonatomic,copy) NSString *data;

/*!
* 上传完成回调
*
* @param result 结果
* @param error 错误码
*/
typedef void(^IFlyUploadDataCompletionHandler)(NSString* result,IFlySpeechError * error);

/*!
* 上传数据
* 此函数用于上传数据,下载的过程是**异步**的。
*
* @param completionHandler -[in] 上传完成回调
* @param name -[in] 上传的内容名称,名称最好和你要上传的数据内容相关,不可以为nil
* @param data -[in] 上传的数据,以utf8编码,不可以为nil
*/
- (void) uploadDataWithCompletionHandler:(IFlyUploadDataCompletionHandler)completionHandler name:(NSString *)name data:(NSString *)data;

/*!
* 设置上传数据参数
*
* @param parameter 参数值
* @param key 参数名
*/
-(void) setParameter:(NSString*) parameter forKey:(NSString*) key;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// IFlyDebugLog.h
// MSC

// description: 程序中的log处理类

// Created by ypzhao on 12-11-22.
// Copyright (c) 2012年 iflytek. All rights reserved.
//

#import <Foundation/Foundation.h>

/*!
* 调试信息
*/
@interface IFlyDebugLog : NSObject

/*!
* 打印调试信息
*
* @param format -[in] 要打印的内容格式
* @param ... -[in] 要打印的内容
*/
+ (void) showLog:(NSString *)format, ...;

/*!
* 将log写入文件中
*/
+ (void) writeLog;

/*!
* 设置是否显示log
*
* @param showLog YES:显示;NO:不显示
*/
+ (void) setShowLog:(BOOL) showLog;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
//
// IFlyISVDelegate.h
// msc_UI
//
// Created by admin on 14-9-15.
// Copyright (c) 2014年 iflytek. All rights reserved.
//


#import <Foundation/Foundation.h>

@class IFlySpeechError;

/**
* 声纹回调协议
*/
@protocol IFlyISVDelegate

/**
* 声纹结果回调
*
* @param dic 结果
*/
-(void) onResult:(NSDictionary *)dic;

/**
* 错误码回调
*
* @param errorCode 错误码
*/
-(void) onError:(IFlySpeechError *) errorCode;

@optional

/**
* 等待结果
*/
-(void) onRecognition;

/**
* 音量改变回调
*
* @param volume 音量值
*/
-(void) onVolumeChanged: (int)volume;

@end

Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
//
// IFlyISVRecognizer.h
// ISV
//
// Created by wangdan on 14-9-6.
// Copyright (c) 2014年 IFlyTEK. All rights reserved.
//


#import <Foundation/Foundation.h>
#import "IFlyISVDelegate.h"

/**
* 声纹接口类
*/
@interface IFlyISVRecognizer : NSObject
{

}
@property (assign) id<IFlyISVDelegate> delegate;



/*
* FlyISVRecognizer is a kind of Singleton calss
* the function can be used as below:
IFLyISVRecognizer *recognizer=[IFlyISVRecognizer creteRecognizer: self];
*/

+(instancetype) sharedInstance;


/*
* genrerate a serial number password
* princeple:
1.number serial has no 1 in itself;
2.the nuber serial has no same number("98765432"is right while "99876543" is wrong)
* @length: the serial number's length,length of "98765432" is 8,
generally length is 8 and other value is forbidden
*/

-(NSString*) generatePassword:(int)length;



/*
* Used to get password from server
* @pwdt:
when pwdt is 1,the function will return chinese text;
while pwdt is 2, the funciton will return number serial
*/

-(NSArray*) getPasswordList:(int)pwdt;


/*
* Used to judge if the engine is running in listenning
* return value:
YES: the engine is listenning;
No : the engine is not listenning
*/
-(BOOL) isListening;



/*
* Used to query or delete the voiceprint model in server
* @cmd:
"del": delete model
"que": query model
* @authid: user id ,can be @"tianxia" or other;
* @pwdt: voiceprint type
1: fixed txt voiceprint code ,like @"我的地盘我做主"
2: free voiceprint code , user can speek anything,but 5 times
trainning the speech shall be same
3: number serial voiceprint code ,like @"98765432" and so on
* @ptxt: voiceprint txt,only fixed voiceprint and number serial have this,
in free voiceprint model this param shall be set nil
* @vid: another voiceprint type model,user can use this to query or delete
model in server can be @"jakillasdfasdjjjlajlsdfhdfdsadff",totally 32 bits;
* NOTES:
when vid is not nil,then the server will judge the vid first
while the vid is nil, server can still query or delete the voiceprint model
by other params
*/
-(BOOL) sendRequest:(NSString*)cmd authid:(NSString *)auth_id pwdt:(int)pwdt ptxt:(NSString *)ptxt vid:(NSString *)vid err:(int *)err;


/*
* set the voiceprint params
* @"sst" : @"train" or @"verify"
* @"auth_id" : @"tianxia" or ther
* @"sub" : @"ivp"
* @"ptxt" :
* @"rgn" : @"5"
* @"pwdt" : @"1",or @"2", or @"3"
* @"auf" : @"audio/L16;rate=16000" or @"audio/L16;rate=8000"
* @"vad_enable : @"1" or @"0"
* @"vad_timeout" : @"3000"
* @"vad_speech_tail": @"100"
*/
-(BOOL) setParameter:(NSString *)value forKey:(NSString *)key;



/*
* get the voiceprint params
* used the same as function of setParameter
*/
-(NSString*) getParameter:(NSString *)key;


/*
* start recording
*/
-(void) startListening;


/*
* stop recording
*/
-(void) stopListening;


/*
* cancel recording,like function stopListening
*/
-(void) cancel; /* cancel recognization */




@end

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// IFlyMSC.h
// msc
//
// Created by 张剑 on 15/1/14.
// Copyright (c) 2015年 iflytek. All rights reserved.
//

#ifndef MSC_IFlyMSC_h
#define MSC_IFlyMSC_h

#import "IFlyAudioSession.h"
#import "IFlyContact.h"
#import "IFlyDataUploader.h"
#import "IFlyDebugLog.h"
#import "IFlyISVDelegate.h"
#import "IFlyISVRecognizer.h"
#import "IFlyRecognizerView.h"
#import "IFlyRecognizerViewDelegate.h"
#import "IFlyResourceUtil.h"
#import "IFlySetting.h"
#import "IFlySpeechConstant.h"
#import "IFlySpeechError.h"
#import "IFlySpeechEvaluator.h"
#import "IFlySpeechEvaluatorDelegate.h"
#import "IFlySpeechEvent.h"
#import "IFlySpeechRecognizer.h"
#import "IFlySpeechRecognizerDelegate.h"
#import "IFlySpeechSynthesizer.h"
#import "IFlySpeechSynthesizerDelegate.h"
#import "IFlySpeechUnderstander.h"
#import "IFlySpeechUtility.h"
#import "IFlyTextUnderstander.h"
#import "IFlyUserWords.h"
#import "IFlyPcmRecorder.h"


#endif
Loading

0 comments on commit cd7d354

Please sign in to comment.