From e4214fd75b7f1496b3e499f198d795c5d7aa5741 Mon Sep 17 00:00:00 2001 From: 641453620 <641453620@qq.com> Date: Thu, 9 Apr 2020 09:10:31 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8DOSS=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=97=AA=E9=80=80bug=202.=E5=AD=97=E5=B9=95=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=94=AF=E6=8C=81=E8=BE=93=E5=85=A5=E6=97=A5?= =?UTF-8?q?=E8=AF=AD=E3=80=81=E9=9F=A9=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/data.go | 2 ++ app/video.go | 2 +- main.go | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/data.go b/app/data.go index e5e2485..40a3134 100644 --- a/app/data.go +++ b/app/data.go @@ -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:"韩语"}, } } diff --git a/app/video.go b/app/video.go index 6f62cbc..3216a86 100644 --- a/app/video.go +++ b/app/video.go @@ -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 } diff --git a/main.go b/main.go index 9452930..13c14cf 100644 --- a/main.go +++ b/main.go @@ -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 {