feat(engine): 添加字幕窗口宽度记忆功能并优化字幕引擎关闭逻辑

- 添加 captionWindowWidth 属性,用于保存字幕窗口宽度
- 修改 CaptionEngine 中的 stop 和 kill 方法,优化字幕引擎关闭逻辑
- 更新 README,添加预备模型列表
This commit is contained in:
himeditator
2025-08-02 15:57:07 +08:00
parent 64ea2f0daf
commit 38b4b15cec
10 changed files with 63 additions and 131 deletions

View File

@@ -40,6 +40,7 @@ def main_gummy(s: str, t: str, a: int, c: int, k: str):
stream.close_stream()
engine.stop()
def main_vosk(a: int, c: int, m: str):
global thread_data
stream = AudioStream(a, c)
@@ -99,4 +100,4 @@ if __name__ == "__main__":
raise ValueError('Invalid caption engine specified.')
if thread_data.status == "kill":
stdout_cmd('kill')
stdout_cmd('kill')