声纹人脸(Verifier)
#类IFlyISVRecognizer
Conforms to IFlySpeechRecognizerDelegate
Declared in IFlySpeechRecognizer.h
#Overview
#delegate
@property (assign) id<IFlyISVDelegate> delegate
IFlyISVRecognizer.h
#sharedInstance
IFLyISVRecognizer *recognizer=[IFlyISVRecognizer creteRecognizer: self];
+ (instancetype)sharedInstance
IFlyISVRecognizer.h
#generatePassword:
Princeple:
1.Number serial has no 1 in itself;
2.The nuber serial has no same number(“98765432"is right while "99876543” is wrong)
- (NSString *)generatePassword:(int)length
IFlyISVRecognizer.h
#getPasswordList:
- (NSArray *)getPasswordList:(int)pwdt
pwdt: when pwdt is 1,the function will return chinese text;while pwdt is 2, the funciton will return number serial
IFlyISVRecognizer.h
#isListening
- (BOOL)isListening
YES: the engine is listenning;
No : the engine is not listenning
IFlyISVRecognizer.h
#sendRequest:authid:pwdt:ptxt:vid:err:
- (BOOL)sendRequest:(NSString *)cmd authid:(NSString *)auth_id pwdt:(int)pwdt ptxt:(NSString *)ptxt vid:(NSString *)vid err:(int *)err
name | desc |
---|---|
cmd | “del”: delete model; “que”: query model; |
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. |
authid: | user id ,can be @“tianxia” or other; |
IFlyISVRecognizer.h
#setParameter:forKey:
- (BOOL)setParameter:(NSString *)value forKey:(NSString *)key
name | desc |
---|---|
value | 参数值 |
key | 参数类型 |
设置成功返回YES,失败返回NO
key | value |
---|---|
sst | @“train” or @“verify” |
auth_id | @“tianxia” or other |
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” |
IFlyISVRecognizer.h
#getParameter:
- (NSString *)getParameter:(NSString *)key
IFlyISVRecognizer.h
#startListening
- (void)startListening
IFlyISVRecognizer.h
#stopListening
Stop recording
IFlyISVRecognizer.h
#cancel
- (void)cancel
IFlyISVRecognizer.h
#类IFlyIdentityResult
Declared in IFlyIdentityResult.h
#Overview
#result
@property (nonatomic, retain) NSString *result
IFlyIdentityResult.h
#identityResultWithString:
+ (instancetype)identityResultWithString:(NSString *)jsonString
name | desc |
---|---|
jsonString | json字符串 |
身份验证结果类实例
IFlyIdentityResult.h
#dictionaryResults
- (NSDictionary *)dictionaryResults
字典格式的结果
IFlyIdentityResult.h
#类IFlyIdentityVerifier
Declared in IFlyIdentityVerifier.h
#Overview
#delegate
@property (nonatomic, assign) id<IFlyIdentityVerifierDelegate> delegate
IFlyIdentityVerifier.h
#sharedInstance
+ (instancetype)sharedInstance
身份验证对象的单例
IFlyIdentityVerifier.h
#purgeSharedInstance
+ (void)purgeSharedInstance
成功返回YES,失败返回NO。
IFlyIdentityVerifier.h
#setParameter:forKey:
- (BOOL)setParameter:(NSString *)value forKey:(NSString *)key
name | desc |
---|---|
value | 参数值 |
key | 参数名 |
设置的参数和取值正确返回YES,失败返回NO
IFlyIdentityVerifier.h
#startWorking
- (void)startWorking
IFlyIdentityVerifier.h
#write:data:offset:length:withParams:
- (void)write:(NSString *)ssub data:(NSData *)data offset:(int)offset length:(int)length withParams:(NSString *)params
name | desc |
---|---|
ssub | 子业务名 |
data | 数据 |
offset | 偏移量 |
length | 长度 |
params | 见下表 |
ifr参数 | 描述 |
---|---|
data_format | 数据格式:即图片格式,支持jpg(默认),gif |
data_encoding | 数据压缩编码:即图片压缩编码,支持raw(不压缩,默认值) |
wtt | 等待超时时间: 支持大于0的整数,默认为3000ms |
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_eos | 尾部静音长度。如果尾部静音长度超过了此值,则认为音频已经结束。 此参数仅在打开VAD功能时生效。(云端暂时没有)。 取值:0~30000ms,默认为2000ms |
data_encoding | 数据压缩编码,音频压缩编码。 |
data_format | 在声纹业务中为音频采样率,取值:16000(默认),8000 |
ipt参数 | 描述 |
scope | 操作范围 person,group |
group_id | 指定鉴别的组数字或者字符串,唯一值 不为空 |
group_name | 组名称 “”或者不能包含^@,&=*'"等非法字符,且长度不得超过255.此参数可以为空,对于group_name约束不在云端控制,由前段控制 |
topc | 组名称[top candidates],返回得分最高的候选人数目 取值1-5 默认是1.可以开放由用户设置,最大topc值为5 |
IFlyIdentityVerifier.h
#stopWrite:
- (void)stopWrite:(NSString *)ssub
name | desc |
---|---|
ssub | 子业务名:ivp,ifr,ipt |
IFlyIdentityVerifier.h
#execute:cmd:params:
- (void)execute:(NSString *)ssub cmd:(NSString *)cmd params:(NSString *)params
name | desc |
---|---|
ssub | 子业务类型、可选值:ivp(声纹)、ifr(人脸)、ipt(鉴别) |
cmd | 操作命令,可选值:query、delete、download、add |
params | 子业务参数,参见write:data:offset:length:withParams: |
IFlyIdentityVerifier.h
#cancel
- (void)cancel
IFlyIdentityVerifier.h
#类IFlyVerifierUtil
Declared in IFlyVerifierUtil.h
#Overview
#generateNumberPassword:
+ (NSString *)generateNumberPassword:(int)length
name | desc |
---|---|
length | 随机字符串长度 |
随机字符串
IFlyVerifierUtil.h
#ARGBToGray:
+ (UIImage *)ARGBToGray:(UIImage *)sourceImage
name | desc |
---|---|
sourceImage | ARGB彩图 |
灰度图
IFlyVerifierUtil.h
#协议IFlyISVDelegate
#Overview
#onResult: required method
- (void)onResult:(NSDictionary *)dic
name | desc |
---|---|
dic | 结果 |
IFlyISVDelegate.h
#onCompleted: required method
- (void)onCompleted:(IFlySpeechError *)errorCode
name | desc |
---|---|
errorCode | 错误码 |
灰度图
IFlyISVDelegate.h
#onRecognition
- (void)onRecognition
IFlyISVDelegate.h
#onVolumeChanged:
- (void)onVolumeChanged:(int)volume
name | desc |
---|---|
volume | 音量值 |
灰度图
IFlyISVDelegate.h
#协议IFlyIdentityVerifierDelegate
Declared in IFlyIdentityVerifierDelegate.h
#Overview
#onCompleted: required method
- (void)onCompleted:(IFlySpeechError *)error
name | desc |
---|---|
error | 错误描述类 |
IFlyIdentityVerifierDelegate.h
#onResults:isLast: required method
- (void)onResults:(IFlyIdentityResult *)results isLast:(BOOL)isLast
name | desc |
---|---|
results | -[out] 结果。 |
isLast | -[out] 是否最后一条结果 |
IFlyIdentityVerifierDelegate.h
#onEvent:arg1:arg2:extra: required method
- (void)onEvent:(int)eventType arg1:(int)arg1 arg2:(int)arg2 extra:(id)obj
name | desc |
---|---|
eventType | 消息类型 |
arg1 | eventType为 Event_volume 时 arg1为音量值 |
arg2 | 参数2 |
obj | 扩展参数 |
IFlyIdentityVerifierDelegate.h
修改于 2023-12-21 04:13:26