Skip to content

Commit

Permalink
1.修复OSS上传闪退bug
Browse files Browse the repository at this point in the history
2.字幕翻译功能支持输入日语、韩语
  • Loading branch information
wxbool committed Apr 9, 2020
1 parent 62d7149 commit e4214fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ func GetTranslateInputLanguageOptionsSelects() []*LanguageSelects {
return []*LanguageSelects{
&LanguageSelects{Id:LANGUAGE_ZH , Name:"中文"},
&LanguageSelects{Id:LANGUAGE_EN , Name:"英文"},
&LanguageSelects{Id:LANGUAGE_JP , Name:"日语"},
&LanguageSelects{Id:LANGUAGE_KOR , Name:"韩语"},
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func UploadAudioToClound(target aliyun.AliyunOss , audioFile string) string {

//上传
if file , e := target.UploadFile(audioFile , name); e != nil {
panic("上传失败:" + e.Error())
panic(e)
} else {
return file
}
Expand Down
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ func main() {
mw.NewErrormationTips("错误" , "请先设置Oss对象配置")
return
}
//校验输入语言
if tempAppSetting.InputLanguage != LANGUAGE_ZH && tempAppSetting.InputLanguage != LANGUAGE_EN {
mw.NewErrormationTips("错误" , "由于语音提供商的限制,生成字幕的输入语言仅支持中文/英语")
return
}

//查询选择的语音引擎
if tempAppSetting.CurrentEngineId == 0 {
Expand Down

0 comments on commit e4214fd

Please sign in to comment.