botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Adaptive Card Speak tag not working in Cortana

Open SwetalinaGitHub opened this issue 8 years ago • 6 comments

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.

SwetalinaGitHub avatar Mar 30 '18 05:03 SwetalinaGitHub

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 )

EricDahlvang avatar Mar 30 '18 20:03 EricDahlvang

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 avatar Mar 31 '18 11:03 SwetalinaGitHub

@SwetalinaGitHub Correct. Speech is now only supported on the card itself.

EricDahlvang avatar Apr 11 '18 22:04 EricDahlvang

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 }, } }; } `

vedeevi avatar Aug 27 '18 12:08 vedeevi

Same issue.

Micro-Muncher avatar Sep 05 '18 16:09 Micro-Muncher

Same issue. Bot SDK is a pain... Everything is moving, renamed or non existing. So many dead links everywhere.

Toemsel avatar Sep 26 '18 13:09 Toemsel