feat: 语音流式输入管线 + VAD前端集成 + 插件-工具合并清理

- 前端: VAD语音检测(@ricky0123/vad-web) + useVoiceInput双模式(流式WS/REST)
- Gateway: VoiceStreamManager代理WS流式STT到voice-service
- Voice-service: DashScope REST → Realtime WS → Whisper三级引擎 + ffmpeg转码
- 共享模块: pkg/audio(音频转换) + pkg/dashscope(ASR REST客户端)
- 清理: 移除旧plugin-manager和pkg/plugins,完成插件→工具合并
- 文档: 完善gateway-api.md和voice-service.md语音API文档
- 工具: scripts/voice/ 语音转换脚本集

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 11:50:40 +08:00
parent 258cf81b25
commit 6ef9e082a6
91 changed files with 4091 additions and 3929 deletions
@@ -19,7 +19,7 @@ import (
"git.yeij.top/AskaEth/Cyrene/ai-core/internal/bus"
"git.yeij.top/AskaEth/Cyrene/ai-core/internal/scheduler"
plgManager "git.yeij.top/AskaEth/Cyrene/pkg/plugins/manager"
plgManager "git.yeij.top/AskaEth/Cyrene-Plugins/manager"
)
// Orchestrator 对话编排器 v2.0
@@ -878,7 +878,7 @@ func (o *Orchestrator) preprocessVoice(ctx context.Context, message string, voic
var transcriptions []string
for i, url := range voiceURLs {
text, err := o.asrProvider.Transcribe(ctx, url)
text, err := o.asrProvider.Transcribe(ctx, url, "zh")
if err != nil {
logger.Printf("[orchestrator] 语音 %d 转录失败: %v", i, err)
continue
@@ -10,8 +10,8 @@ import (
"git.yeij.top/AskaEth/Cyrene/ai-core/internal/llm"
"git.yeij.top/AskaEth/Cyrene/ai-core/internal/model"
"git.yeij.top/AskaEth/Cyrene/pkg/logger"
plgManager "git.yeij.top/AskaEth/Cyrene/pkg/plugins/manager"
plgSDK "git.yeij.top/AskaEth/Cyrene/pkg/plugins/sdk"
plgManager "git.yeij.top/AskaEth/Cyrene-Plugins/manager"
plgSDK "git.yeij.top/AskaEth/Cyrene-Plugins/sdk"
)
// Synthesizer 主会话综合器