语音唤醒(Wakeuper)
#类IFlyVoiceWakeuper
Inherits from | NSObject |
---|---|
Declared in | IFlyVoiceWakeuper.h |
#语音唤醒
#音频流唤醒
#Other Methods
#delegate
@property (nonatomic, assign) id<IFlyVoiceWakeuperDelegate> delegate
IFlyVoiceWakeuper.h
#isListening
@property (nonatomic, readonly) BOOL isListening
IFlyVoiceWakeuper.h
#+ sharedInstance
+ (instancetype)sharedInstance
IFlyVoiceWakeuper.h
#– startListening
- (BOOL)startListening
IFlyVoiceWakeuper.h
#– stopListening
- (BOOL)stopListening
IFlyVoiceWakeuper.h
#– cancel
- (BOOL)cancel
IFlyVoiceWakeuper.h
#– getParameter:
- (NSString *)getParameter:(NSString *)key
IFlyVoiceWakeuper.h
#– setParameter:forKey:
注意服务正在运行中,不能设置参数
- (BOOL)setParameter:(NSString *)value forKey:(NSString *)key
#IFlyStreamVoiceWakeuper Methods
#– writeAudio:
- (BOOL)writeAudio:(NSData *)audioData
audioData | 音频数据 |
---|---|
写入成功返回YES,写入失败返回NO
IFlyVoiceWakeuper.h
#协议IFlyVoiceWakeuperDelegate
Conforms to | NSObject |
---|---|
Declared in | IFlyVoiceWakeuperDelegate.h |
#– onBeginOfSpeech
- (void)onBeginOfSpeech
IFlyVoiceWakeuperDelegate.h
#– onEndOfSpeech
- (void)onEndOfSpeech
IFlyVoiceWakeuperDelegate.h
#– onCompleted:
- (void)onCompleted:(IFlySpeechError *)error
errorCode | 错误描述类 |
---|---|
IFlyVoiceWakeuperDelegate.h
#– onResult:
- (void)onResult:(NSMutableDictionary *)resultDic
resultDic | 唤醒结果字典 |
---|---|
IFlyVoiceWakeuperDelegate.h
#– onVolumeChanged:
- (void)onVolumeChanged:(int)volume
volume | 音量值 |
---|---|
IFlyVoiceWakeuperDelegate.h
#– onEvent:isLast:arg1:data:
根据事件类型返回额外的数据
- (void)onEvent:(int)eventType isLast:(BOOL)isLast arg1:(int)arg1 data:(NSMutableDictionary *)eventData
eventType | 事件类型,具体参见IFlySpeechEvent枚举。 |
---|---|
IFlyVoiceWakeuperDelegate.h
修改于 2023-12-21 04:13:09