feat(engine): 字幕引擎添加在终端直接显示字幕的功能

This commit is contained in:
himeditator
2025-11-01 21:06:28 +08:00
parent 77726753bb
commit e6a65f8362
5 changed files with 49 additions and 3 deletions

View File

@@ -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: