Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
fix conflicts
沈浩6e142206d7f7
diff --cc internal/dto/subtitle_task.goindex ef025f77,96daae8e..ec108f0c--- a/internal/dto/subtitle_task.go+++ b/internal/dto/subtitle_task.go@@@ -1,21 -1,19 +1,22 @@@package dtotype StartVideoSubtitleTaskReq struct {- AppId uint32 `json:"app_id"`- Url string `json:"url"`- OriginLanguage string `json:"origin_lang"`- TargetLang string `json:"target_lang"`- Bilingual uint8 `json:"bilingual"`- TranslationSubtitlePos uint8 `json:"translation_subtitle_pos"`- ModalFilter uint8 `json:"modal_filter"`- Tts uint8 `json:"tts"`- TtsVoiceCode uint8 `json:"tts_voice_code"`- TtsVoiceCloneSrcFileUrl string `json:"tts_voice_clone_src_file_url"`- Replace []string `json:"replace"`- Language string `json:"language"`+ AppId uint32 `json:"app_id"`+ Url string `json:"url"`+ OriginLanguage string `json:"origin_lang"`+ TargetLang string `json:"target_lang"`+ Bilingual uint8 `json:"bilingual"`+ TranslationSubtitlePos uint8 `json:"translation_subtitle_pos"`+ ModalFilter uint8 `json:"modal_filter"`+ Tts uint8 `json:"tts"`+ TtsVoiceCode uint8 `json:"tts_voice_code"`+ TtsVoiceCloneSrcFileUrl string `json:"tts_voice_clone_src_file_url"`+ Replace []string `json:"replace"`+ Language string `json:"language"`+ EmbedSubtitleVideoType string `json:"embed_subtitle_video_type"`+ VerticalMajorTitle string `json:"vertical_major_title"`+ VerticalMinorTitle string `json:"vertical_minor_title"`+ OriginLanguageWordOneLine int `json:"origin_language_word_one_line"`}type StartVideoSubtitleTaskResData struct {diff --cc internal/service/subtitle_service.goindex 8564c961,6f921108..3c00ba7b--- a/internal/service/subtitle_service.go+++ b/internal/service/subtitle_service.go@@@ -111,21 -111,19 +111,22 @@@ func (s Service) StartSubtitleTask(req}stepParam := types.SubtitleTaskStepParam{- TaskId: taskId,- TaskBasePath: taskBasePath,- Link: req.Url,- SubtitleResultType: resultType,- EnableModalFilter: req.ModalFilter == types.SubtitleTaskModalFilterYes,- EnableTts: req.Tts == types.SubtitleTaskTtsYes,- TtsVoiceCode: ttsVoiceCode,- VoiceCloneAudioUrl: voiceCloneAudioUrl,- ReplaceWordsMap: replaceWordsMap,- OriginLanguage: types.StandardLanguageName(req.OriginLanguage),- TargetLanguage: types.StandardLanguageName(req.TargetLang),- UserUILanguage: types.StandardLanguageName(req.Language),+ TaskId: taskId,+ TaskBasePath: taskBasePath,+ Link: req.Url,+ SubtitleResultType: resultType,+ EnableModalFilter: req.ModalFilter == types.SubtitleTaskModalFilterYes,+ EnableTts: req.Tts == types.SubtitleTaskTtsYes,+ TtsVoiceCode: ttsVoiceCode,+ VoiceCloneAudioUrl: voiceCloneAudioUrl,+ ReplaceWordsMap: replaceWordsMap,+ OriginLanguage: types.StandardLanguageName(req.OriginLanguage),+ TargetLanguage: types.StandardLanguageName(req.TargetLang),+ UserUILanguage: types.StandardLanguageName(req.Language),+ EmbedSubtitleVideoType: req.EmbedSubtitleVideoType,+ VerticalVideoMajorTitle: req.VerticalMajorTitle,+ VerticalVideoMinorTitle: req.VerticalMinorTitle,+ OriginLanguageWordOneLine: req.OriginLanguageWordOneLine,}go func() {defer func() {@@@ -1026,7 -972,7 +1028,7 @@@ func (s Service) generateTimestamps(tasoriginSentence stringstartWord types.WordendWord types.Word- shortSentenceWordNum int = 12 //控制单行英文的字数- shortSentenceWordNum int = originLanguageWordOneLine //控制单行英文的字数++ shortSentenceWordNum = originLanguageWordOneLine //控制单行英文的字数)if len(sentenceWords) <= shortSentenceWordNum {diff --cc internal/types/subtitle_task.goindex b85da2f5,ce40ce1d..6d5392b0--- a/internal/types/subtitle_task.go+++ b/internal/types/subtitle_task.go@@@ -237,10 -234,7 +237,11 @@@ type SubtitleTaskStepParam structSubtitleInfos []SubtitleFileInfoTtsSourceFilePath stringTtsResultFilePath string+ InputVideoPath string // 源视频路径+ EmbedSubtitleVideoType string // 合成字幕嵌入的视频类型 none不嵌入 horizontal横屏 vertical竖屏+ VerticalVideoMajorTitle string // 合成竖屏视频的主标题+ VerticalVideoMinorTitle string+ OriginLanguageWordOneLine int // 源语言字幕一行显示多少个字}type SrtSentence struct {