Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Twilio函数读取多个语音输入_C#_Twilio - Fatal编程技术网

C# Twilio函数读取多个语音输入

C# Twilio函数读取多个语音输入,c#,twilio,C#,Twilio,用例是在twilio中使用可编程语音呼叫IVR系统。根据IVR问题,使用twilio函数和TWIML发送答案。我怎样才能做到这一点?到目前为止,我已经使用Twilio进行了调用,并参考了下面的回调webhook [HttpPost] public TwiMLResult Index(string message) { var response = new VoiceResponse(); var gather = new Gather(inp

用例是在twilio中使用可编程语音呼叫IVR系统。根据IVR问题,使用twilio函数和TWIML发送答案。我怎样才能做到这一点?到目前为止,我已经使用Twilio进行了调用,并参考了下面的回调webhook

 [HttpPost]
    public TwiMLResult Index(string message)
    {
        var response = new VoiceResponse(); 

        var gather = new Gather(input: new List<Gather.InputEnum>()
        {
            Gather.InputEnum.Speech
        } , 
            timeout: 5,  action:new Uri("https://url-sample/GatherSample"));

        gather.Say("Please press 1 or say sales for sales.");
        response.Append(gather);
        LogWriter.Debug($"Message : {response.ToString()}");
        return new TwiMLResult(response);
    }

答案并不简单。您应该参考twilio文档了解这一点,并尝试实施,如果您在这方面遇到任何具体问题,请返回此处。。到目前为止,你有没有发现任何错误?如果您在这方面有困难,那么我们可以提供帮助,但如果您只是在探索,我建议您继续这样做,并遵循Chetan上面链接的教程。
    exports.handler = function(context, event, callback) {
  const twiml = new Twilio.twiml.VoiceResponse();

  const command = event.SpeechResult.toLowerCase();

  twiml.say(`You said ${command}. I'll give you a ${command} fact.`);

  callback(null, twiml);
};