|
@@ -808,22 +808,21 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
if actionType == .VoiceSettingActionConfirm{//要生成真实音频文件
|
|
|
BFLog(2, message: "确认选择发音人操作")
|
|
|
wself.mSelectVoiced = selectVoice
|
|
|
+ wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isSelected)
|
|
|
if(wself.mSelectVoiced != nil){
|
|
|
wself.tts?.startTTS("", taskId: "", isAudition: false,fontName: selectVoice?.voice ?? "")
|
|
|
+ wself.voiceIconView.setNetImage(url: "\(wself.mSelectVoiced?.avatarUrl ?? "")")
|
|
|
|
|
|
+ }else{
|
|
|
+ wself.voiceIconView.image = nil
|
|
|
}
|
|
|
- wself.voiceIconView.setNetImage(url: "\(wself.mSelectVoiced?.avatarUrl ?? "")")
|
|
|
-
|
|
|
- wself.tts?.stopTTS("")
|
|
|
- wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isNormal)
|
|
|
-
|
|
|
-
|
|
|
}else if actionType == .voiceSettingActionCancel{
|
|
|
BFLog(2, message: "取消发音人操作")
|
|
|
+ wself.tts?.stopTTS("")
|
|
|
+ wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isSelected)
|
|
|
|
|
|
}else if actionType == .voiceSettingActionDelete{
|
|
|
BFLog(2, message: "删除发音人操作")
|
|
|
- wself.voiceIconView.image = nil
|
|
|
//停止文字转换
|
|
|
wself.tts?.stopTTS("")
|
|
|
}else if actionType == .VoiceSettingActionSelected{//要进行试听或暂停操作
|
|
@@ -838,25 +837,22 @@ public class BFRecordScreenController: BFBaseViewController {
|
|
|
if(wself.mSelectVoiced == selectVoice){ //是同一个发音人暂停
|
|
|
|
|
|
BFLog(message: "试听播放器状态\(String(describing: wself.tts?.voicePlayer.state.rawValue) )")
|
|
|
- if(wself.tts?.voicePlayer.state == PlayerState.paused){
|
|
|
- wself.tts?.startTTS("", taskId: "", isAudition: true,fontName: selectVoice?.voice ?? "")
|
|
|
- wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isLoading)
|
|
|
-
|
|
|
- }else if (wself.tts?.voicePlayer.state == PlayerState.playing){
|
|
|
+
|
|
|
+ if (wself.tts?.voicePlayer.state == PlayerState.playing){
|
|
|
wself.tts?.stopTTS("")
|
|
|
wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isPause)
|
|
|
+ }else{
|
|
|
+ wself.tts?.startTTS("", taskId: "", isAudition: true,fontName: selectVoice?.voice ?? "")
|
|
|
+ wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isLoading)
|
|
|
}
|
|
|
|
|
|
} else{//开始试听
|
|
|
wself.tts?.startTTS("", taskId: "", isAudition: true,fontName: selectVoice?.voice ?? "")
|
|
|
+ wself.voiceSettingView.flushSelectVoiceStatus(voiceStatue: .isLoading)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
wself.mSelectVoiced = selectVoice
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|