botframeworkcortanacortana-skills-kit

Chatbot using Cortana does not speak


I created a chatbot using botframework and Azure. I want to be able to speak to the bot using cortana, so i connected the bot to the cortana channel in Azure. This works and i can invoke the skill and send text messages. For test purposes the bot can receive messages and only sends a predefined message back to the user.

According to this i should be able to send a voice message back to the user by just setting the Speak-property of the message. I tried it with plain text and with SSML:

/** BotFramework SDK v3 **/
var message = context.MakeMessage();
message.Speak = "Hello";
await context.PostAsync(msg);

/** BotFramework SDK v4 **/
var msg = turnContext.Activity.CreateReply();
msg.Speak = "Hello";
await turnContext.SendActivityAsync(msg);

Both variants don't work. When i invoke the skill and type something, i get no audio output but text output.

Setting the Speak-property to a SSML string doesn't work either:

<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice languages='en-US' gender='female'>Hello</voice></speak>

I'm from germany. I know that 3rd party skills are supported in US only. I set my region and language to US for being able to use the skill.

Is there anything wrong with the bot?

Do i have to use a Text-To-Speech system like the one from MS CognitiveServices?

Thanks in advance.


Solution

  • As mentioned, Cortana will respond with speech if invoked or queried with speech. This is not clear on the documentation (and we'll fix that). However, you presently cannot respond with synthesized speech if text was input - we make the assumption to respond to the user in the form they made the request. The exception is rich cards. If you click a button, and the previous input was via speech, the next response will be via speech.

    Please file feedback as a feature request.