|
@@ -79,35 +79,8 @@
|
|
|
if (!msgModel.isReceive && msgModel.showMike) {
|
|
|
[weakSelf.nuisdkPlay playSendVoice:msgModel];
|
|
|
}else {
|
|
|
-// CGFloat f1 = [[NSDate date] timeIntervalSince1970];
|
|
|
[weakSelf.nuisdkPlay startTTSWith:msgModel.sendText roleModel:[SLGlobalInfo SharedInstance].roleModel finshBlock:^{
|
|
|
-// CGFloat f2 = [[NSDate date] timeIntervalSince1970];
|
|
|
-// NSArray *msgArr = [msgModel.sendText componentsSeparatedByString:@" "];
|
|
|
-// __block CGFloat m = 0;
|
|
|
-// [msgArr enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
-// NSInteger l = obj.length;
|
|
|
-// CGFloat x = 0;
|
|
|
-// if (l > 12) {
|
|
|
-// x = 20.0;
|
|
|
-// }else if (l > 9 && l < 12) {
|
|
|
-// x = 18.0;
|
|
|
-// }else if (l > 5 && l < 10) {
|
|
|
-// x = 14.0;
|
|
|
-// }else if (l > 3 && l < 6) {
|
|
|
-// x = 12.0;
|
|
|
-// }else {
|
|
|
-// x = 9.0;
|
|
|
-// }
|
|
|
-// m += MIN(obj.length / x, 0.6);
|
|
|
-//
|
|
|
-// }];
|
|
|
-// NSInteger timeLong = ceil(msgModel.sendText.length / 4.0 / 3);
|
|
|
-// NSLog(@"%ld------=====%ld---%f---%f--%@",msgArr.count, timeLong, f2 - f1, m, msgModel.sendText);
|
|
|
-// [SLCustomizeAlert showAletrWithTitle:@"播放完成" message:[NSString stringWithFormat:@"字符长度%ld\n除以12时长:%ld\n单词个数:%ld\n实际播放时长:%f\n计算时长:%f\n",msgModel.sendText.length,timeLong,msgArr.count,f2-f1,ceil(m)] sureBtnTitle:@"确定" cancelBtnTitle:@"" sureBtnAction:^{
|
|
|
-//
|
|
|
-// } cancelBtnAction:^{
|
|
|
-//
|
|
|
-// }];
|
|
|
+
|
|
|
}];
|
|
|
}
|
|
|
};
|