|
@@ -1300,14 +1300,14 @@ extension BFRecordScreenController: PQSpeechTranscriberUtilDelegate {
|
|
|
|
|
|
let payload = dicResult?["payload"] as? [String: Any]
|
|
|
|
|
|
- BFLog(message: "识别结果:dicResult is \(String(describing: dicResult)) \((payload?["result"])!)")
|
|
|
+ BFLog(message: "识别结果:) \((payload?["result"])!) startTime:\((self.recorderManager.voiceModel?.startTime ?? 0.0))")
|
|
|
DispatchQueue.main.async {
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
let newSubtitle = PQEditSubTitleModel()
|
|
|
- newSubtitle.timelineIn = self.itemModels[self.currItemModelIndex].titleStickers.last?.timelineOut ?? 0
|
|
|
-
|
|
|
-
|
|
|
- newSubtitle.timelineOut = Float64(((payload?["time"]) as? Int) ?? 0) / 1000.0 + (self.recorderManager.voiceModel?.startTime ?? 0.0)
|
|
|
+ newSubtitle.timelineIn = (self.recorderManager.voiceModel?.startTime ?? 0.0) + Float64(((payload?["begin_time"]) as? Int) ?? 0) / 1000.0
|
|
|
+
|
|
|
+ newSubtitle.timelineOut = (self.recorderManager.voiceModel?.startTime ?? 0.0) + Float64(((payload?["time"]) as? Int) ?? 0) / 1000.0
|
|
|
var showText = ((payload?["result"]) as? String) ?? ""
|
|
|
if showText.count > subtitleMaxlength {
|
|
|
showText = showText.substring(to: subtitleMaxlength)
|