mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-19 07:30:33 +08:00
feat(engine): 字幕引擎添加在终端直接显示字幕的功能
This commit is contained in:
@@ -33,6 +33,7 @@ def ollama_translate(model: str, target: str, text: str, time_s: str):
|
||||
stdout_obj({
|
||||
"command": "translation",
|
||||
"time_s": time_s,
|
||||
"text": text,
|
||||
"translation": content.strip()
|
||||
})
|
||||
|
||||
@@ -43,6 +44,7 @@ def google_translate(model: str, target: str, text: str, time_s: str):
|
||||
stdout_obj({
|
||||
"command": "translation",
|
||||
"time_s": time_s,
|
||||
"text": text,
|
||||
"translation": res.text
|
||||
})
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user