feat(engine): 添加 Vosk 本地离线引擎支持

- 新增 Vosk 引擎配置和识别逻辑
- 更新用户界面,增加 Vosk 引擎选项和模型路径设置
- 更新依赖,添加 vosk 库
This commit is contained in:
himeditator
2025-07-09 19:53:30 +08:00
parent f97b885411
commit 1c29fd5adc
19 changed files with 389 additions and 41 deletions

View File

@@ -57,7 +57,7 @@ class AudioStream:
self.stream = None
self.SAMP_WIDTH = pyaudio.get_sample_size(pyaudio.paInt16)
self.FORMAT = pyaudio.paInt16
self.CHANNELS = self.device["maxInputChannels"]
self.CHANNELS = int(self.device["maxInputChannels"])
self.RATE = int(self.device["defaultSampleRate"])
self.CHUNK = self.RATE // chunk_rate
self.INDEX = self.device["index"]