|
@@ -1466,6 +1466,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
|
|
|
indirectionView?.deleteItem(index: isStopAtRecordRange)
|
|
|
|
|
|
+ // add by ak 删除变音的缓存数据
|
|
|
+ tts?.deleteTasksCache(model.recordId ?? "")
|
|
|
|
|
|
rscurrentManager.deleteRecord(at: currentAssetProgress)
|
|
|
|
|
@@ -2157,6 +2159,8 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
//如果当前段有没有转完的发音人显示 Loadingview
|
|
|
if(!voiceChangeStickerFinish(itemIndex: currItemModelIndex,isShowLoadView: true)){
|
|
|
voiceFinishAutoPlay = true
|
|
|
+ //静默转换语音
|
|
|
+ tts?.runNextTask()
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -2828,8 +2832,16 @@ extension BFRecordScreenController: BFTTSManagerDelegte{
|
|
|
voice.endCMTime = model.timelineOut
|
|
|
voice.ttsTaskID = model.tTtaskId
|
|
|
voice.recordId = model.recordId
|
|
|
- itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
|
|
|
|
|
|
+ let findRecordId = itemModels[Int(model.itemModelIndex)].voiceStickers.first { temp in
|
|
|
+ temp.recordId == model.recordId
|
|
|
+ }
|
|
|
+ if(findRecordId != nil){
|
|
|
+ itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
|
|
|
+ }else{
|
|
|
+ BFLog(message: "返回TTS 任务 录制段已经不存在,不加入")
|
|
|
+ }
|
|
|
+
|
|
|
//显示当前段的转换进度isExportAction
|
|
|
var progress:Float = 0.0
|
|
|
if(isExportAction){
|
|
@@ -2930,9 +2942,30 @@ extension BFRecordScreenController: BFTTSManagerDelegte{
|
|
|
FinishCount += itemModel.voiceChangeStickers.count
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //使用不包含方法
|
|
|
BFLog(message: "翻译任务总数:\(AllCount) 已经完成数:\(FinishCount)")
|
|
|
if(FinishCount < AllCount){
|
|
|
isFinish = false
|
|
|
+
|
|
|
+ for itemModel in itemModels{
|
|
|
+ for title in itemModel.titleStickers{
|
|
|
+ //加入变音缓存,
|
|
|
+ let ttsModel = BFTTSTaskModel.init()
|
|
|
+ ttsModel.timelineIn = title.timelineIn
|
|
|
+ ttsModel.timelineOut = title.timelineOut
|
|
|
+ ttsModel.fontName = mSelectVoiced?.voice ?? ""
|
|
|
+ ttsModel.recordId = title.recordId ?? ""
|
|
|
+ ttsModel.tTtaskId = getUniqueId(desc: "tTtaskId")
|
|
|
+ ttsModel.itemModelIndex = Int32(itemModel.index
|
|
|
+)
|
|
|
+ ttsModel.text = title.text
|
|
|
+ tts?.pushTaskCache(ttsModel, autoTranslate:false)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if(isShowLoadView && !isFinish){
|