diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj index 924851e..5a87313 100644 --- a/QXLive.xcodeproj/project.pbxproj +++ b/QXLive.xcodeproj/project.pbxproj @@ -787,7 +787,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 1.1.3; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -853,7 +853,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.2; + MARKETING_VERSION = 1.1.3; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/QXLive/Manager/QXAudioEngineManager.h b/QXLive/Manager/QXAudioEngineManager.h new file mode 100644 index 0000000..39a1e21 --- /dev/null +++ b/QXLive/Manager/QXAudioEngineManager.h @@ -0,0 +1,16 @@ +// +// QXAudioEngineManager.h +// QXLive +// +// Created by 启星 on 2025/11/6. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface QXAudioEngineManager : NSObject + +@end + +NS_ASSUME_NONNULL_END diff --git a/QXLive/Manager/QXAudioEngineManager.m b/QXLive/Manager/QXAudioEngineManager.m new file mode 100644 index 0000000..5684e7b --- /dev/null +++ b/QXLive/Manager/QXAudioEngineManager.m @@ -0,0 +1,19 @@ +// +// QXAudioEngineManager.m +// QXLive +// +// Created by 启星 on 2025/11/6. +// + +#import "QXAudioEngineManager.h" +#import +@interface QXAudioEngineManager() +@property (nonatomic, strong) AVAudioEngine *audioEngine; +@property (nonatomic, strong) SFSpeechRecognizer *speechRecognizer; +@property (nonatomic, strong) SFSpeechAudioBufferRecognitionRequest *recognitionRequest; +@property (nonatomic, strong) SFSpeechRecognitionTask *recognitionTask; +@property (nonatomic, strong) NSLocale *locale; +@end +@implementation QXAudioEngineManager + +@end diff --git a/QXLive/Room(房间)/View/QXRoomChatListView.m b/QXLive/Room(房间)/View/QXRoomChatListView.m index 7cdfd68..0bfa0de 100644 --- a/QXLive/Room(房间)/View/QXRoomChatListView.m +++ b/QXLive/Room(房间)/View/QXRoomChatListView.m @@ -202,8 +202,14 @@ NSInteger maxMessageCount = 20; // [self.giftArray removeFirstObject]; // } #if DEBUG - if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) { - AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:model.text]; + if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem || model.messageType == QXRoomChatMessageTypeChat) { + NSString *text = @""; + if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) { + text = model.text; + }else{ + text = [NSString stringWithFormat:@"%@说,%@",model.FromUserInfo.nickname,model.text]; + } + AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text]; utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-CN"]; utterance.rate = 0.5 ; utterance.pitchMultiplier = 1.0 ;