Merge pull request #1021 from hchen2020/master

Twilio SpeechModel
This commit is contained in:
Haiping 2025-04-20 22:50:34 -05:00 committed by GitHub
commit 330b10a0de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -66,7 +66,7 @@ public class TwilioService
},
Action = new Uri($"{_settings.CallbackHost}/{conversationalVoiceResponse.CallbackPath}"),
Enhanced = true,
SpeechModel = Gather.SpeechModelEnum.PhoneCall,
SpeechModel = _settings.SpeechModel,
SpeechTimeout = "auto", // timeout > 0 ? timeout.ToString() : "3",
Timeout = conversationalVoiceResponse.Timeout > 0 ? conversationalVoiceResponse.Timeout : 3,
ActionOnEmptyResult = conversationalVoiceResponse.ActionOnEmptyResult,
@ -106,7 +106,7 @@ public class TwilioService
},
Action = new Uri($"{_settings.CallbackHost}/{voiceResponse.CallbackPath}"),
Enhanced = true,
SpeechModel = Gather.SpeechModelEnum.PhoneCall,
SpeechModel = _settings.SpeechModel,
SpeechTimeout = "auto", // conversationalVoiceResponse.Timeout > 0 ? conversationalVoiceResponse.Timeout.ToString() : "3",
Timeout = voiceResponse.Timeout > 0 ? voiceResponse.Timeout : 3,
ActionOnEmptyResult = voiceResponse.ActionOnEmptyResult,

View file

@ -14,6 +14,7 @@ public class TwilioSetting
public string ApiSecret { get; set; }
public string CallbackHost { get; set; }
public string SpeechModel { get; set; } = "googlev2_telephony";
public string? MessagingShortCode { get; set; }
/// <summary>