feat(voice): 新增本地语音识别(ASR)提供商选项
新增 `voice.asr_provider` 配置项,允许用户在 "api" 和 "local" 之间选择语音识别服务。 当设置为 "local" 时,系统将通过 `local_asr` 工具(由 `stt_whisper_plugin` 插件提供)调用本地 Whisper 模型进行语音转文字。这为用户提供了一个不依赖外部 API、注重隐私的备选方案。 - 默认值仍为 "api",保持现有行为不变。 - 添加 `openai-whisper` 作为新的依赖项以支持此功能。
This commit is contained in:
@@ -257,6 +257,7 @@ class VoiceConfig(ValidatedConfigBase):
|
||||
"""语音识别配置类"""
|
||||
|
||||
enable_asr: bool = Field(default=False, description="启用语音识别")
|
||||
asr_provider: str = Field(default="api", description="语音识别提供商")
|
||||
|
||||
|
||||
class EmojiConfig(ValidatedConfigBase):
|
||||
|
||||
Reference in New Issue
Block a user