1
This commit is contained in:
@@ -27,6 +27,9 @@ typedef void (^AiVMSyncCompletion)(KBAiSyncResponse *_Nullable response,
|
||||
@property(nonatomic, copy, nullable) NSString *content;
|
||||
@property(nonatomic, copy, nullable) NSString *text;
|
||||
@property(nonatomic, copy, nullable) NSString *message;
|
||||
@property(nonatomic, copy, nullable) NSString *aiResponse;
|
||||
@property(nonatomic, copy, nullable) NSString *audioId;
|
||||
@property(nonatomic, assign) NSInteger llmDuration;
|
||||
@end
|
||||
|
||||
@interface KBAiMessageResponse : NSObject
|
||||
@@ -37,8 +40,8 @@ typedef void (^AiVMSyncCompletion)(KBAiSyncResponse *_Nullable response,
|
||||
typedef void (^AiVMMessageCompletion)(KBAiMessageResponse *_Nullable response,
|
||||
NSError *_Nullable error);
|
||||
|
||||
typedef void (^AiVMElevenLabsCompletion)(NSData *_Nullable audioData,
|
||||
NSError *_Nullable error);
|
||||
typedef void (^AiVMAudioURLCompletion)(NSString *_Nullable audioURL,
|
||||
NSError *_Nullable error);
|
||||
|
||||
@interface AiVM : NSObject
|
||||
|
||||
@@ -48,12 +51,9 @@ typedef void (^AiVMElevenLabsCompletion)(NSData *_Nullable audioData,
|
||||
- (void)requestChatMessageWithContent:(NSString *)content
|
||||
completion:(AiVMMessageCompletion)completion;
|
||||
|
||||
- (void)requestElevenLabsSpeechWithText:(NSString *)text
|
||||
voiceId:(NSString *)voiceId
|
||||
apiKey:(NSString *)apiKey
|
||||
outputFormat:(nullable NSString *)outputFormat
|
||||
modelId:(nullable NSString *)modelId
|
||||
completion:(AiVMElevenLabsCompletion)completion;
|
||||
/// 根据 audioId 获取音频 URL
|
||||
- (void)requestAudioWithAudioId:(NSString *)audioId
|
||||
completion:(AiVMAudioURLCompletion)completion;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user