feat(engine): 替换重采样模型、SOSV 添加标点恢复模型

- 将 samplerate 库替换为 resampy 库,提高重采样质量
- Shepra-ONNX SenseVoice 添加中文和英语标点恢复模型
This commit is contained in:
himeditator
2025-09-06 23:15:33 +08:00
parent eba2c5ca45
commit 6bff978b88
7 changed files with 85 additions and 113 deletions

View File

@@ -62,11 +62,12 @@ class VoskRecognizer:
self.prev_content = ''
if content == '': return
self.cur_id += 1
if self.target:
self.trans_time = time.time()
th = threading.Thread(
target=self.trans_func,
args=(self.ollama_name, self.target, caption['text'], self.time_str)
args=(self.ollama_name, self.target, caption['text'], self.time_str),
daemon=True
)
th.start()
else: