该仓库包含一个实时语音识别和 AI 助手系统,主要由以下部分组成:
asr_agent/ - 后端 ASR + LLM + TTS Worker 逻辑。flutter_asr_client/ - Flutter 移动客户端应用。livekit-server/ - LiveKit 部署配置。系统使用 LiveKit 进行实时音频传输和数据通道消息传递,并结合本地 ASR 和可选的云服务备用方案。
asr_agent/)dispatcher.py
POST /connect:创建唯一房间、生成 LiveKit token,并启动对应房间的 Worker。GET /health:检查并清理已结束的 Worker。aiohttp 提供 HTTP 接口。worker.py
Worker 作为机器人连接到 LiveKit 房间。Qwen3-ASR 模型,封装在 whisper_asr/qwen_engine.py。ASR_PROVIDER=mimo 切换为远程 Mimo ASR。VLLM_URL)。LLM_PROVIDER=mimo 切换为云端 Mimo LLM。_TTSSegmenter 实现二级分句,保证语音播放更流畅。whisper_asr/audio_processor.py
whisper_asr/qwen_engine.py
livekit Python RTC 客户端onnxruntime + Silero VADqwen_asr 本地语音模型aiohttp 异步 Web 服务器pyjwt 生成 LiveKit tokenflutter_asr_client/)lib/main.dart
ProviderScope,并注入 LiveKitServiceImpl。lib/app.dart
MaterialApp.router。lib/router/app_router.dart
/tasks/records/reports/profile/recordinglib/providers/livekit_providers.dart
LiveKitService 抽象。lib/providers/settings_providers.dart
lib/pages/recording/notifiers/recording_notifier.dart
lib/services/livekit_service.dart
LiveKitService。transcription 消息。lib/services/audio_capture_service.dart
record 插件采集 PCM16 音频。lib/pages/shell/app_shell.dart
lib/pages/recording/recording_page.dart
lib/models/websocket_message.dart
connected、partial、utterance、reply、reply_partial、transcript、error。livekit-server/docker-compose.ymllivekit-server/livekit.yaml这些文件配置了应用和后端使用的 LiveKit 实时音频房间服务。
RecordingNotifier 调用 Dispatcher 的 /connect。Worker。LIVEKIT_URL、PUBLIC_LIVEKIT_URLASR_MODEL_PATHVLLM_URL、LLM_MODELMIMO_KEY、MIMO_API_BASELLM_PROVIDER、ASR_PROVIDER