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 {