Skip to content

L2 环境开启 barge-in 后反复报 barge_in_error,打断检测不可用 #41

Description

@Mieluoxxx

问题

按四级依赖合同,L2 安装(pip install -e ".[voice]")不包含 silero-vad 与 torch。但在 AEC_REALTIME_ENABLED + AEC_REALTIME_BARGE_IN 配置开启时,每个 TTS 播放句仍会启动 BargeInDetector 检测线程。线程内在导入 silero_vad/torch 时失败退出,表现为:

  • 日志反复出现 [BargeIn] detector failed
  • 反复发出 status=barge_in_error 事件
  • 打断(插话)能力实际不可用

用户得到的是持续的错误噪音和静默缺失的能力,而不是文档化的显式降级。

根因

server/app.py::_barge_in_enabled() 只读配置开关:

def _barge_in_enabled() -> bool:
    return bool(AEC_REALTIME_ENABLED and AEC_REALTIME_BARGE_IN)

从不检查 VAD 能力是否真实存在。配置开关只是必要条件,不是能力证明;惰性导入只保证了启动不崩溃,没有闭合能力降级。

复现

  1. L2 安装(环境无 silero-vad / torch)
  2. 开启 AEC_REALTIME_ENABLEDAEC_REALTIME_BARGE_IN
  3. 播放任意语音 → 观察日志与 TTS status 事件

期望行为

能力缺席时,启动边界显式禁用打断检测:不启动必失败的线程、不发错误事件;禁用状态公开可观察(runtime_status 已持续公开 vad 状态)。已安装但加载失败(损坏)时则应暴露原因,不得伪装成能力缺席。

关联

发现于 #16 评审,修复见 #40

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions