Twilio Gather 录制得太早了
Twilio Gather is recording too soon
以下代码用于构建 TwiML 以询问调用者他们正在寻找哪个部门。
如果在向呼叫者读出 gather.Say
时用户已经在讲话,则包括他们在消息中所说的任何内容,以及他们对 [= 中问题的实际回答12=] url.
文档指出:
The following example shows a that specifies speech input
from the user. When this TwiML executes, the caller will hear the
prompt. Twilio will then collect speech input for up to 60
seconds.
然而语音输入收集正在发生而 say 正在执行。
我如何确保在执行 Say 时所说的任何内容都不包含在对问题的实际响应中?
...
var call = GetCallData();
var gather = new Gather(
timeout: 4,
input: new List<Gather.InputEnum> { Gather.InputEnum.Speech },
method: HttpMethod.Post,
language: call.TwilioLanguage,
bargeIn: false
)
{
Action = new Uri("MyUrl/Answer/Department")
};
gather.Say("Please say the name of the department you wish to be connected to",
language: call.TwilioLanguage,
voice: call.TwilioVoice);
response.Append(gather);
response.Redirect(new Uri("MyUrl/Hangup"), HttpMethod.Post);
return TwiML(response);
如果不在Gather中嵌套Say,调用者必须在Gather收集输入之前先听Say。
此处有更多详细信息。
"By nesting Say or Play in your Gather, you can read some text or play music for your caller while waiting for their input. See "在下面嵌套其他动词"以获取示例和更多信息。"
以下代码用于构建 TwiML 以询问调用者他们正在寻找哪个部门。
如果在向呼叫者读出 gather.Say
时用户已经在讲话,则包括他们在消息中所说的任何内容,以及他们对 [= 中问题的实际回答12=] url.
文档指出:
The following example shows a that specifies speech input from the user. When this TwiML executes, the caller will hear the prompt. Twilio will then collect speech input for up to 60 seconds.
然而语音输入收集正在发生而 say 正在执行。
我如何确保在执行 Say 时所说的任何内容都不包含在对问题的实际响应中?
...
var call = GetCallData();
var gather = new Gather(
timeout: 4,
input: new List<Gather.InputEnum> { Gather.InputEnum.Speech },
method: HttpMethod.Post,
language: call.TwilioLanguage,
bargeIn: false
)
{
Action = new Uri("MyUrl/Answer/Department")
};
gather.Say("Please say the name of the department you wish to be connected to",
language: call.TwilioLanguage,
voice: call.TwilioVoice);
response.Append(gather);
response.Redirect(new Uri("MyUrl/Hangup"), HttpMethod.Post);
return TwiML(response);
如果不在Gather中嵌套Say,调用者必须在Gather收集输入之前先听Say。
此处有更多详细信息。
"By nesting Say or Play in your Gather, you can read some text or play music for your caller while waiting for their input. See "在下面嵌套其他动词"以获取示例和更多信息。"