|
@@ -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)?
|
|
@@ -2841,14 +2843,33 @@ extension BFRecordScreenController: BFTTSManagerDelegte{
|
|
|
voice.recordId = model.recordId
|
|
|
itemModels[Int(model.itemModelIndex)].voiceChangeStickers.append(voice)
|
|
|
|
|
|
- //显示转换进度
|
|
|
- let progress = Float(itemModels[currItemModelIndex].voiceChangeStickers.count * 100 / itemModels[currItemModelIndex].titleStickers.count)
|
|
|
+ //显示当前段的转换进度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()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
BFLog(message: "TTS 进度:\(Int(progress))")
|
|
|
loadingView.titleL.text = "变音中 \(Int(progress))%"
|
|
|
-
|
|
|
- if(voiceChangeStickerFinish(itemIndex: currItemModelIndex)){
|
|
|
- loadingView.loadHidden()
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|