|
@@ -32,6 +32,8 @@ struct WithDrawModel {
|
|
|
}
|
|
|
|
|
|
public class BFRecordScreenController: BFBaseViewController {
|
|
|
+ // add by ak 是否点击了导出操作用于显示变量进度,预览是当前段落,导出是全部段落。
|
|
|
+ public var isExportAction:Bool = false
|
|
|
public var nextActionHandle: (() -> Void)?
|
|
|
public var closeActionHandle: (() -> Void)?
|
|
|
public var changeItemHandle: ((_ index: Int) -> Void)?
|
|
@@ -1062,6 +1064,7 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
ttsModel.fontName = wself.mSelectVoiced?.voice ?? ""
|
|
|
ttsModel.recordId = recordId ?? ""
|
|
|
ttsModel.tTtaskId = getUniqueId(desc: "tTtaskId")
|
|
|
+ ttsModel.itemModelIndex = Int32(wself.currItemModelIndex)
|
|
|
ttsModel.text = showText
|
|
|
if(wself.mSelectVoiced == nil){
|
|
|
wself.tts?.pushTaskCache(ttsModel, autoTranslate:false)
|
|
@@ -2836,16 +2839,35 @@ extension BFRecordScreenController: BFTTSManagerDelegte{
|
|
|
voice.endCMTime = model.timelineOut
|
|
|
voice.ttsTaskID = model.tTtaskId
|
|
|
voice.recordId = model.recordId
|
|
|
- itemModels[currItemModelIndex].voiceChangeStickers.append(voice)
|
|
|
+ itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
|
|
|
+
|
|
|
+ //显示当前段的转换进度isExportAction
|
|
|
+ var progress:Float = 0.0
|
|
|
+ if(isExportAction){
|
|
|
+ isExportAction = false
|
|
|
+ //所有任务数也就是字幕的个数
|
|
|
+ var AllCount = 0
|
|
|
+ //完成的任务数(已经有发音人地址的)
|
|
|
+ var FinishCount = 0
|
|
|
+
|
|
|
+ for itemModel in itemModels{
|
|
|
+ AllCount += itemModel.titleStickers.count
|
|
|
+ FinishCount += itemModel.voiceChangeStickers.count
|
|
|
+ }
|
|
|
+ progress = Float(FinishCount * 100 / AllCount)
|
|
|
+
|
|
|
+
|
|
|
+ }else{
|
|
|
+ progress = Float(itemModels[currItemModelIndex].voiceChangeStickers.count * 100 / itemModels[currItemModelIndex].titleStickers.count)
|
|
|
+
|
|
|
+ if(voiceChangeStickerFinish(itemIndex: currItemModelIndex)){
|
|
|
+ loadingView.loadHidden()
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- //显示转换进度
|
|
|
- let progress = Float(itemModels[currItemModelIndex].voiceChangeStickers.count * 100 / itemModels[currItemModelIndex].titleStickers.count)
|
|
|
BFLog(message: "TTS 进度:\(Int(progress))")
|
|
|
loadingView.titleL.text = "变音中 \(Int(progress))%"
|
|
|
-
|
|
|
- if(voiceChangeStickerFinish(itemIndex: currItemModelIndex)){
|
|
|
- loadingView.loadHidden()
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|