You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何阻止Twilio Conversation Relay在Agent发言时收集用户输入?

阻止Agent发言时被用户打断后收集输入的解决方案

你需要启用Conversation Relay配置里的两个核心参数来解决这个问题:

  • interruptible: false:设置Agent的常规发言不可被用户打断,用户在Agent说话期间的输入不会被系统收集
  • welcomeGreetingInterruptible: false:针对初始化时的欢迎语生效,确保欢迎语播放过程中用户无法打断,也不会触发输入收集

修改后的代码如下:

const response = new twilio.twiml.VoiceResponse();
const connect = response.connect();
const conversationRelay = connect.conversationRelay({
    url: `wss://${serverBaseUrl}/conversation-relay`,
    welcomeGreeting: "Hi! This is reservations. I see you are wanting to reserve a room at The Venetian Resort In Las Vegas. Can I begin by getting your name please?",
    transcriptionProvider: "deepgram",
    ttsProvider: "google",
    voice: "en-GB-Journey-F",
    dtmfDetection: "true",
    interruptByDtmf: "true",
    debug: "true",
    interruptible: false,
    welcomeGreetingInterruptible: false
});

启用这两个参数后,就能彻底阻止Agent发言时用户打断导致的输入收集行为,两个配置分别覆盖常规对话阶段和欢迎语播放阶段的可打断规则。

内容的提问来源于stack exchange,提问作者Max Young

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.14 02:37:06