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
chore: format code with go fmt
wulien2decdcbe4f93
diff --git a/config/config.go b/config/config.goindex 2b75bd41..1f25a0da 100644--- a/config/config.go+++ b/config/config.go@@ -24,7 +24,7 @@ type App struct {MaxSentenceLength int `toml:"max_sentence_length"`EnableBlockVttBatch bool `toml:"enable_block_vtt_batch"`VttBatchSize int `toml:"vtt_batch_size"`- TargetLanguageFirst bool `toml:"target_language_first"` // 双语字幕中目标语言是否在上+ TargetLanguageFirst bool `toml:"target_language_first"` // 双语字幕中目标语言是否在上ShortSubtitleMaxChars int `toml:"short_subtitle_max_chars"` // 短字幕英文每行最大字符数Proxy string `toml:"proxy"`ParsedProxy *url.URL `toml:"-"`diff --git a/internal/deps/checker.go b/internal/deps/checker.goindex 8a8c25e0..72468d9f 100644--- a/internal/deps/checker.go+++ b/internal/deps/checker.go@@ -621,4 +621,4 @@ func checkEdgeTts() error {storage.EdgeTtsPath = EdgeTtsBinFilePathlog.GetLogger().Info("edge-tts安装完成", zap.String("路径", EdgeTtsBinFilePath))return nil-}\ No newline at end of file+}diff --git a/internal/handler/subtitle_task.go b/internal/handler/subtitle_task.goindex 71acab46..0364a924 100644--- a/internal/handler/subtitle_task.go+++ b/internal/handler/subtitle_task.go@@ -1,10 +1,10 @@package handlerimport (+ "krillin-ai/internal/deps""krillin-ai/internal/dto""krillin-ai/internal/response""krillin-ai/internal/service"- "krillin-ai/internal/deps""krillin-ai/log""os""path/filepath"diff --git a/internal/server/server.go b/internal/server/server.goindex b53c3d1c..43f5a037 100644--- a/internal/server/server.go+++ b/internal/server/server.go@@ -19,7 +19,7 @@ func StartBackend() error {engine := gin.Default()router.SetupRouter(engine)BackEnd = &http.Server{- Addr: fmt.Sprintf("%s:%d", config.Conf.Server.Host, config.Conf.Server.Port),+ Addr: fmt.Sprintf("%s:%d", config.Conf.Server.Host, config.Conf.Server.Port),Handler: engine,}log.GetLogger().Info("服务启动", zap.String("host", config.Conf.Server.Host), zap.Int("port", config.Conf.Server.Port))diff --git a/internal/service/srt2speech.go b/internal/service/srt2speech.goindex c94cc58d..65ca4e3f 100644--- a/internal/service/srt2speech.go+++ b/internal/service/srt2speech.go@@ -384,4 +384,4 @@ func concatenateAudioFiles(audioFiles []string, outputFile, taskBasePath string)cmd := exec.Command(storage.FfmpegPath, "-y", "-f", "concat", "-safe", "0", "-i", listFile, "-c", "copy", outputFile)cmd.Stderr = os.Stderrreturn cmd.Run()-}\ No newline at end of file+}diff --git a/internal/service/youtube_subtitle.go b/internal/service/youtube_subtitle.goindex 35611754..9d65e64a 100644--- a/internal/service/youtube_subtitle.go+++ b/internal/service/youtube_subtitle.go@@ -2247,7 +2247,6 @@ func (s *YouTubeSubtitleService) generateTextFiles(blocks []*util.SrtBlock, origreturn nil}-// findVttWordsForText 根据文本内容在句子中找到对应的VttWordfunc (s *YouTubeSubtitleService) findVttWordsForText(text string, sentences []Sentence) []VttWord {textWords := strings.Fields(strings.TrimSpace(text))@@ -2333,7 +2332,6 @@ func (s *YouTubeSubtitleService) findVttWordsForSrtBlock(return []VttWord{}}-// parseSrtTimestamp 解析SRT时间戳格式 "HH:MM:SS,mmm --> HH:MM:SS,mmm"func (s *YouTubeSubtitleService) parseSrtTimestamp(timestamp string) (float64, float64, error) {parts := strings.Split(timestamp, " --> ")