microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
871 stars 480 forks source link

SetSpeakMiddleware does not honor multiple voice tags #5657

Closed p-nagpal closed 2 years ago

p-nagpal commented 3 years ago

Version

Used via Composer 2.0.0-nightly.250532.6b3fab5

Describe the bug

Using multiple voice tags in the speak field in Composer does not work. Default voice tags are added creating an invalid SSML.

To Reproduce

Steps to reproduce the behavior:

  1. In Composer, send a new activity. Set the speak field to <voice name="en-US-JennyNeural">press 1 for English.</voice><voice name="es-ES-ElviraNeural">pressione 2 para espaniol.</voice>
  2. Start the bot and Test in WebChat
  3. Notice that the speak field is set to

<voice name=\"'en-US-AriaNeural\">**<voice name=\"en-US-JennyNeural\"> press 1 for English.</voice><voice name=\"es-ES-ElviraNeural\">pressione 2 para espaniol.</voice> </voice>

Expected behavior

Default voice tags (<voice name=\"'en-US-AriaNeural\">) should not be added when one or more voice tags are specified in the speak field.

p-nagpal commented 3 years ago

Discussed this offline with @garypretty and @carlosscastro

tracyboehrer commented 2 years ago

See also: https://github.com/microsoft/botbuilder-dotnet/issues/5792

InfinytRam commented 2 years ago

investigating