我的
This commit is contained in:
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user