This commit is contained in:
2026-01-27 16:28:17 +08:00
parent ce889e1ed0
commit 2b749cd2b0
26 changed files with 1092 additions and 128 deletions

View File

@@ -37,6 +37,7 @@ typedef void (^AiVMSyncCompletion)(KBAiSyncResponse *_Nullable response,
@interface KBAiMessageResponse : NSObject
@property(nonatomic, assign) NSInteger code;
@property(nonatomic, strong, nullable) KBAiMessageData *data;
@property(nonatomic, copy, nullable) NSString *message;
@end
typedef void (^AiVMMessageCompletion)(KBAiMessageResponse *_Nullable response,
@@ -47,6 +48,22 @@ typedef void (^AiVMAudioURLCompletion)(NSString *_Nullable audioURL,
typedef void (^AiVMUploadAudioCompletion)(NSString *_Nullable fileURL,
NSError *_Nullable error);
@interface KBAiSpeechTranscribeData : NSObject
@property(nonatomic, copy, nullable) NSString *transcript;
@property(nonatomic, assign) double confidence;
@property(nonatomic, assign) double duration;
@property(nonatomic, copy, nullable) NSString *detectedLanguage;
@end
@interface KBAiSpeechTranscribeResponse : NSObject
@property(nonatomic, assign) NSInteger code;
@property(nonatomic, strong, nullable) KBAiSpeechTranscribeData *data;
@property(nonatomic, copy, nullable) NSString *message;
@end
typedef void (^AiVMSpeechTranscribeCompletion)(KBAiSpeechTranscribeResponse *_Nullable response,
NSError *_Nullable error);
@interface AiVM : NSObject
- (void)syncChatWithTranscript:(NSString *)transcript
@@ -64,6 +81,10 @@ typedef void (^AiVMUploadAudioCompletion)(NSString *_Nullable fileURL,
- (void)uploadAudioFileAtURL:(NSURL *)fileURL
completion:(AiVMUploadAudioCompletion)completion;
/// 语音转文字multipart/form-data
- (void)transcribeAudioFileAtURL:(NSURL *)fileURL
completion:(AiVMSpeechTranscribeCompletion)completion;
#pragma mark - 人设相关接口
/// 分页查询人设列表