Adaptive Card Speak tag not working in Cortana
Bot Info
- SDK Platform: .Net
- SDK Version: Adaptive Card 0.5.1
- Active Channels: Cortana
- Deployment Environment: Azure Bot Service, Azure App Service, Cortana Skills
Issue Description
Button title or text block data is not coming as speech from Cortana. Normally for Adaptive cards, we have “textblock.speak” or "Action.speak" syntax inside card body , but that is not working.
Only the speak which we add in code with attachment for adaptive card, that part is coming as speech from Cortana. var message = context.MakeMessage(); message.Speak =" "; message.Attachments = accordionCard;
Code Example
AdaptiveCard ac = new AdaptiveCard(); TextBlock titleTextBlock = new TextBlock(); titleTextBlock.Text = "Hello World"; titleTextBlock.Speak = "Hello World";
Reproduction Steps
1. 2. 3.
Expected Behavior
Cortana shall read out the content of text block and button title.
Actual Results
The Adaptive card display is coming proper, but the speak part is not working for text block and buttons.
Hi @SwetalinaGitHub
Please upgrade to the latest AdaptiveCards library: https://www.nuget.org/packages/AdaptiveCards The speak property has been deprecated on all but the AdaptiveCard itself https://github.com/Microsoft/AdaptiveCards/pull/659 (here is the Final v1.0 schema https://github.com/Microsoft/AdaptiveCards/pull/633 )
Hi @EricDahlvang
Thank you for the suggestion. Even after upgrading to the latest AdaptiveCards library, speak is not working for Cortana channel. Speak property is deprecated, so does that refer speak will not work for Action Base or Text block sections.
@SwetalinaGitHub Correct. Speech is now only supported on the card itself.
We are also having same issue, if we assign a text to AdaptiveCard.Speak it is not working with Cortana Skill. But this works, if we assign the value to IMessageActivity instance of Bot Framework. We are using AdaptiveCards of version 1.0.3.0.
Following is our code sample...
` IMessageActivity responseMessage = context.MakeMessage(); responseMessage.Attachments.Add(new Attachment { Content = GetAdaptiveCard(), ContentType=AdaptiveCard.ContentType, Name = "Card" });
private static AdaptiveCard GetAdaptiveCard() { return new AdaptiveCard { Speak = "Hello to AdaptiveCard response", Body = new List { new AdaptiveTextBlock { Type = AdpativeTextBlock.TypeName, Text = "Hello to Adaptive Card response", Size = AdaptiveTextSize.Medium, Weight = AdaptiveTextWeight.Default, Wrap = true }, } }; } `
Same issue.
Same issue. Bot SDK is a pain... Everything is moving, renamed or non existing. So many dead links everywhere.