更新sdk

This commit is contained in:
zher52 2020-10-19 19:35:13 +08:00
parent d2bece6711
commit 0515a2f2e3
20 changed files with 562 additions and 6 deletions

View File

@ -45,17 +45,17 @@
<resource-file src="src/android/assets/iflytek/recognize.xml" target="assets/iflytek/recognize.xml" />
<!-- lib -->
<lib-file src="src/android/libs/Msc.jar" />
<lib-file src="src/android/libs/Sunflower.jar" />
<!-- <lib-file src="src/android/libs/Sunflower.jar" /> -->
<!-- <lib-file src="src/android/libs/armeabi" />
<lib-file src="src/android/libs/armeabi-v7a" />
<lib-file src="src/android/libs/arm64-v8a" /> -->
<resource-file src="src/android/libs/armeabi/libmsc.so" target="jniLibs/armeabi/libmsc.so" />
<!-- <resource-file src="src/android/libs/armeabi/libmsc.so" target="jniLibs/armeabi/libmsc.so" /> -->
<resource-file src="src/android/libs/armeabi-v7a/libmsc.so" target="jniLibs/armeabi-v7a/libmsc.so" />
<resource-file src="src/android/libs/arm64-v8a/libmsc.so" target="jniLibs/arm64-v8a/libmsc.so" />
<resource-file src="src/android/libs/x86/libmsc.so" target="jniLibs/x86/libmsc.so" />
<!-- <resource-file src="src/android/libs/x86/libmsc.so" target="jniLibs/x86/libmsc.so" />
<resource-file src="src/android/libs/x86_64/libmsc.so" target="jniLibs/x86_64/libmsc.so" />
<resource-file src="src/android/libs/mips/libmsc.so" target="jniLibs/mips/libmsc.so" />
<resource-file src="src/android/libs/mips64/libmsc.so" target="jniLibs/mips64/libmsc.so" />
<resource-file src="src/android/libs/mips64/libmsc.so" target="jniLibs/mips64/libmsc.so" /> -->
<!-- layout -->
<resource-file src="src/android/res/layout/ifly_layout_mnotice_image.xml" target="res/layout/ifly_layout_mnotice_image.xml" />

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,24 @@
//
// IFlyContact.h
// msc
//
// Created by ypzhao on 13-3-1.
// Copyright (c) 2013年 IFLYTEK. All rights reserved.
//
#import <Foundation/Foundation.h>
/*!
* <br>
* (sms),
*/
@interface IFlyContact : NSObject
/*!
* <br>
* AddressBook.framework Contacts.framework到工程中IFlyDataUploader类
*
* @return
*/
- (NSString *) contact;
@end

View File

@ -0,0 +1,37 @@
//
// IFlyIdentityResult.h
// IFlyMSC
//
// Created by 张剑 on 15/5/14.
// Copyright (c) 2015年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
*
*/
@interface IFlyIdentityResult : NSObject
/**
* json字符串格式结果
*/
@property(nonatomic,retain)NSString* result;
/**
*
*
* @param jsonString json字符串
*
* @return
*/
+(instancetype)identityResultWithString:(NSString*)jsonString;
/**
*
*
* @return
*/
-(NSDictionary*)dictionaryResults;
@end

View File

@ -0,0 +1,176 @@
//
// IFlyIdentityVerifier.h
// IFlyMSC
//
// Created by 张剑 on 15/4/22.
// Copyright (c) 2015年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IFlyIdentityVerifierDelegate.h"
/**
*
*/
@interface IFlyIdentityVerifier : NSObject
/*!
*
*/
@property (nonatomic, assign) id <IFlyIdentityVerifierDelegate> delegate;
/**
*
*
* @return
*/
+ (instancetype) sharedInstance;
/**
*
*
* @return YESNO
*/
+ (void)purgeSharedInstance;
/**
*
*
* @param value
* @param key
*
* @return YES,NO
*/
- (BOOL)setParameter:(NSString *)value forKey:(NSString *)key;
/**
*
*
*/
- (void)startWorking;
/*
* | ------------- |-----------------------------------------------------------
* | ifr |
* | ------------- |-----------------------------------------------------------
* | data_format |:jpg()gif
* | ------------- |-----------------------------------------------------------
* | data_encoding |raw()
* | ------------- |-----------------------------------------------------------
* | wtt |: 03000ms
* | ------------- |-----------------------------------------------------------
* | ivp |
* | ------------- |-----------------------------------------------------------
* | rgn |2~9.
* | ------------- |-----------------------------------------------------------
* | |>=tsd验证通过
* | tsd |0~100.
* | ------------- |-----------------------------------------------------------
* | ptxt |
* | ------------- |-----------------------------------------------------------
* | pwdt |1(),2(),3().
* | ------------- |-----------------------------------------------------------
* | fin |0(),1().
* | ------------- |-----------------------------------------------------------
* | wtt |:
* | ------------- |-----------------------------------------------------------
* | vad_enable |VAD功能开关VAD处理1(,),0()
* | ------------- |-----------------------------------------------------------
* | |
* | vad_bos |VAD功能时生效()0~30000ms,
* | |10000ms
* | ------------- |-----------------------------------------------------------
* | |
* | |VAD功能时生效()0~30000ms,
* | vad_eos |2000ms
* | ------------- |-----------------------------------------------------------
* | data_encoding |
* | ------------- |-----------------------------------------------------------
* | data_format |16000()8000
* | ------------- |-----------------------------------------------------------
* | ipt |
* | ------------- |-----------------------------------------------------------
* | scope | persongroup
* | ------------- |-----------------------------------------------------------
* | group_id |
* | ------------- |-----------------------------------------------------------
* | | ^@,&=*'"等非法字符且长度不得超过255.
* | group_name |,group_name约束不在云端控制
* | ------------- |-----------------------------------------------------------
* | topc |[top candidates] 1-5 1.
* | | topc值为5
* | ------------- |-----------------------------------------------------------
*
*/
/**
*
*
* @param ssub
* @param data
* @param offset
* @param length
* @param params
* <table>
* <thead>
* <tr><th>*ifr参数</th><th><em></em></th></tr>
* </thead>
* <tbody>
* <tr><td>data_format</td><td>:jpg()gif</td></tr>
* <tr><td>data_encoding</td><td>raw()</td></tr>
* <tr><td>wtt</td><td>: 03000ms</td></tr>
* </tbody>
* <thead>
* <tr><th>*ivp参数</th><th><em></em></th></tr>
* </thead>
* <tbody>
* <tr><td>rgn</td><td>2~9.</td></tr>
* <tr><td>tsd</td><td>>=tsd验证通过0~100.</td></tr>
* <tr><td>ptxt</td><td></td></tr>
* <tr><td>pwdt</td><td>1(),2(),3().</td></tr>
* <tr><td>fin</td><td>0(),1().</td></tr>
* <tr><td>wtt</td><td>:.</td></tr>
* <tr><td>vad_enable</td><td>VAD功能开关VAD处理1(,),0()</td></tr>
* <tr><td>vad_bos</td><td></br>VAD功能时生效()</br>0~30000ms,10000ms</td></tr>
* <tr><td>vad_eos</td><td></br>VAD功能时生效()</br>0~30000ms,2000ms</td></tr>
* <tr><td>data_encoding</td><td></td></tr>
* <tr><td>data_format</td><td>16000()8000</td></tr>
* </tbody>
* <thead>
* <tr><th>*ipt参数</th><th><em></em></th></tr>
* </thead>
* <tbody>
* <tr><td>scope</td><td> persongroup</td></tr>
* <tr><td>group_id</td><td> </td></tr>
* <tr><td>group_name</td><td> ^@,&=*'"等非法字符且长度不得超过255.此参数可以为空,对于group_name约束不在云端控制由前段控制</td></tr>
* <tr><td>topc</td><td>[top candidates] 1-5 1.topc值为5</td></tr>
* </tbody>
* </table>
*/
-(void)write:(NSString*)ssub data:(NSData*)data offset:(int)offset length:(int)length withParams:(NSString*)params;
/**
*
*
* @param ssub :ivp,ifr,ipt
*/
-(void)stopWrite:(NSString*)ssub;
/**
*
* *startWorking方法同时使用
*
* @param ssub ivp()ifr()ipt()
* @param cmd querydeletedownloadadd
* @param params write:data:offset:length:withParams:
*/
-(void)execute:(NSString*)ssub cmd:(NSString*)cmd params:(NSString*)params;
/**
*
*/
- (void)cancel;
@end

View File

@ -0,0 +1,47 @@
//
// IFlyIdentityVerifierDelegate.h
// IFlyMSC
//
// Created by 张剑 on 15/4/22.
// Copyright (c) 2015年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
@class IFlySpeechError;
@class IFlyIdentityResult;
/**
*
*/
@protocol IFlyIdentityVerifierDelegate <NSObject>
/*!
*
*
* @param error
*/
- (void)onCompleted:(IFlySpeechError *)error;
/*!
*
*
* @param results -[out]
* @param isLast -[out]
*/
- (void)onResults:(IFlyIdentityResult *)results isLast:(BOOL)isLast;
/**
* vad_eos消息
*
* @param eventType
* @param arg1 eventType为 Event_volume arg1为音量值
* @param arg2 2
* @param obj
*/
- (void)onEvent:(int)eventType arg1:(int)arg1 arg2:(int)arg2 extra:(id)obj;
@end

View File

@ -12,6 +12,9 @@
#import "IFlyAudioSession.h"
#import "IFlyDataUploader.h"
#import "IFlyDebugLog.h"
#import "IFlyIdentityVerifier.h"
#import "IFlyIdentityResult.h"
#import "IFlyIdentityVerifierDelegate.h"
#import "IFlyISVDelegate.h"
#import "IFlyISVRecognizer.h"
#import "IFlyRecognizerView.h"
@ -30,9 +33,8 @@
#import "IFlySpeechUtility.h"
#import "IFlyUserWords.h"
#import "IFlyPcmRecorder.h"
#import "IFlyVerifierUtil.h"
#import "IFlyVoiceWakeuper.h"
#import "IFlyVoiceWakeuperDelegate.h"
#endif

View File

@ -91,6 +91,41 @@
*/
+(NSString*)LANGUAGE_ENGLISH;
/*!
*
*
* @return value
*/
+(NSString*)LANGUAGE_RUSSIAN;
/*!
*
*
* @return value
*/
+(NSString*)LANGUAGE_JAPANESE;
/*!
*
*
* @return value
*/
+(NSString*)LANGUAGE_FRENCH;
/*!
*
*
* @return 西value
*/
+(NSString*)LANGUAGE_SPANISH;
/*!
*
*
* @return value
*/
+(NSString*)LANGUAGE_KOREAN;
/*!
* jsonxmlplainjson
*
@ -196,6 +231,13 @@
*/
+(NSString*)ENGINE_TYPE;
/*!
* xtts识别引擎
*
* @return value
*/
+(NSString*)TYPE_LOCAL_XTTS;
/*!
*
*

View File

@ -0,0 +1,132 @@
//
// IFlySpeechUnderstander.h
// MSC
//
// Created by iflytek on 2014-03-12.
// Copyright (c) 2014年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
@class IFlySpeechError;
@protocol IFlySpeechRecognizerDelegate;
/*!
*
*/
@interface IFlySpeechUnderstander : NSObject
/*!
*
*/
@property (readonly) BOOL isUnderstanding;
/*!
*
*/
@property(nonatomic,retain) id<IFlySpeechRecognizerDelegate> delegate ;
/*!
*
*
* @return
*/
+(instancetype) sharedInstance;
/*!
*
*
* onCompleted回调返回后请求下一路回话
*
* @return YESNO
*/
- (BOOL) startListening;
/*!
* <br>
*
*/
- (void) stopListening;
/*!
*
*/
- (void) cancel;
/*
* | ------------- |-----------------------------------------------------------
* | |
* | ------------- |-----------------------------------------------------------
* | domain |: :iatsearchvideopoimusicasr
* | | iat
* | | search
* | | video
* | | asr;
* | ------------- |-----------------------------------------------------------
* | vad_bos |: ms
* | | engine指定iat识别默认值为5000
* | | 4000 0-10000
* | ------------- |-----------------------------------------------------------
* | vad_eos |: ,,
* | | :ms;
* | | sms 1800;
* | | 700 0-10000
* | ------------- |-----------------------------------------------------------
* | sample_rate |: 16000 8000
* | ------------- |-----------------------------------------------------------
* | asr_ptt |: 1 0
* | ------------- |-----------------------------------------------------------
* | result_type |: jsonxmlplainjson
* | ------------- |-----------------------------------------------------------
* | grammarID |id: domain asr
* | ------------- |-----------------------------------------------------------
* | asr_audio_path|:
* | | Documents/()
* | | nil
* | ------------- |-----------------------------------------------------------
* | params |:
* | ------------- |-----------------------------------------------------------
*
*/
/*!
*
*
* (key)
*
* | | |
* |-----------------|-------------------------------------------------------|
* | domain | : :iatsearchvideopoimusicasr<br>iat<br>search<br>video<br>asr;|
* | vad_bos | : ms<br>engine指定iat识别默认值为5000<br> 4000 0-10000|
* | vad_eos | : ,,:ms;<br>sms 1800;<br> 700 0-10000|
* | sample_rate | : 16000 8000|
* | asr_ptt | : 1 0 |
* | result_type | : jsonxmlplainjson|
* | grammarID | id: domain asr|
* | asr_audio_path | : <br>Documents/()<br>nil|
* | params | : |
*
* @param value
* @param key
*
* @return YESNO
*/
-(BOOL) setParameter:(NSString *) value forKey:(NSString*)key;
/*!
*
*
* @param audioData
*
* @return YESNO
*/
- (BOOL) writeAudio:(NSData *) audioData;
/*!
*
*
* @return YESNO
*/
- (BOOL) destroy;
@end

View File

@ -0,0 +1,57 @@
//
// TextUnderstand.h
// MSCDemo
//
// Created by iflytek on 4/24/14.
// Copyright (c) 2014 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
@class IFlySpeechError;
/*!
*
*
* @param result
* @param error
*/
typedef void(^IFlyUnderstandTextCompletionHandler)(NSString* result, IFlySpeechError * error);
/*!
*
*/
@interface IFlyTextUnderstander : NSObject
/*!
*
*/
@property (readonly, atomic) __block BOOL isUnderstanding;
/*!
* <br>
*
*
* @param text
* @param completionHandler
*
* @return
*/
-(int) understandText:(NSString*)text withCompletionHandler:(IFlyUnderstandTextCompletionHandler) completionHandler;
/*!
*
*
* @param value
* @param key
*
* @return YESNO
*/
-(BOOL) setParameter:(NSString *) value forKey:(NSString*)key;
/*!
*
*/
-(void)cancel;
@end

View File

@ -0,0 +1,39 @@
//
// IFlyVerifierUtil.h
// IFlyMSC
//
// Created by 张剑 on 15/4/28.
// Copyright (c) 2015年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/**
*
*/
@interface IFlyVerifierUtil : NSObject
#pragma mark - ISV
/**
* 125
*
* @param length
*
* @return
*/
+(NSString*)generateNumberPassword:(int)length;
#pragma mark - Face
/**
* ARGB彩图转灰度图Detector和Alignment需要灰度图的输入
*
* @param sourceImage ARGB彩图
*
* @return
*/
+ (UIImage*)ARGBToGray:(UIImage*)sourceImage;
@end

Binary file not shown.