Skip to content

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.

feat: auto disable concurrent process when use local model

沈浩6a0b7277782d
diff --git a/config/config-example.toml b/config/config-example.toml
index 17d6ddf0..d520c222 100644
--- a/config/config-example.toml
+++ b/config/config-example.toml
@@ -1,6 +1,6 @@
[app]
segment_duration = 5 # 音频分割间隔,单位:分钟,建议值:5-10
- translate_parallel_num = 5 # 并发进行大模型翻译的数量上限,建议值:5
+ translate_parallel_num = 5 # 并发进行模型转录和翻译的数量上限,建议值:5,如果使用了本地模型,该项自动不生效
proxy = "" # 网络代理地址,格式如http://127.0.0.1:7890,可不填
transcribe_provider = "openai" # 语音识别,当前可选值:openai,fasterwhisper,aliyun。fasterwhisper不支持macOS
llm_provider = "openai" # LLM,当前可选值:openai,aliyun
diff --git a/config/config.go b/config/config.go
index 83855733..fe67eee1 100644
--- a/config/config.go
+++ b/config/config.go
@@ -73,6 +73,7 @@ func LoadConfig(filePath string) error {
return err
}
if Conf.App.TranscribeProvider == "fasterwhisper" {
+ Conf.App.TranslateParallelNum = 1
if Conf.LocalModel.FasterWhisper != "tiny" && Conf.LocalModel.FasterWhisper != "medium" && Conf.LocalModel.FasterWhisper != "large-v2" {
return errors.New("检测到开启了fasterwhisper,但模型选型配置不正确,请检查配置")
}