Having issues getting your bot to be chatty? Try the suggestions below.
This indicates that the telephony service is picking up, but having trouble sending messages to your bot.
Currently SSML voice fonts need to be specified using their full name.
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
//Wait for the user to say something :)
if(string.IsNullOrWhiteSpace(turnContext.Activity.Text)) {
return;
}
//Echo what they say!
var replyText = $"You said {turnContext.Activity.Text}";
//Doesn't work
//var ssmlText = $"<speak version='1.0' xmlns='https://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='Jessa24kRUS'>{replyText}</voice></speak>");
//Works
var ssmlText = $"<speak version='1.0' xmlns='https://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='Microsoft Server Speech Text to Speech Voice (en-US, Jessa24kRUS)'>{replyText}</voice></speak>");
await turnContext.SendActivityAsync(MessageFactory.Text(replyText, ssmlText), cancellationToken);
}
Validate that your speech account is in a region that supports the voice you are attempting to use. Regions
Cognitive service keys map to bots 1:1. This means that if a bot has a cognitive services key, no other bot can use the same key, and vice versa. A phone number can only be associated with a single bot.
Violating either of the above conditions will result in an error on configuration of the channel.