microsoft / microsoft/BotFramework-WebChat

TTS Stripping text from Markdown (Italian)

Open
#3,859 3 comments 0 reactions 1 assignee View on GitHub

@compulim is already working on this.

Since Apr 21, 2021.

Bot Services bug customer-replied-to customer-reported ExemptFromDailyDRIReport
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Hi,
I'm reporting this issue occurred using web chat js library (latest version https://cdn.botframework.com/botframework-webchat/latest/webchat.js)
I've enabled the webchat to use Cognitive Services Speech Services as described here: https://github.com/microsoft/BotFramework-WebChat/blob/master/docs/SPEECH.md



(async function () {
            const styleOptions = {
                botAvatarImage: 'xxxxxxxxx.png',
                botAvatarInitials: 'BT',
                userAvatarImage: 'xxxxxxxx.png',
                userAvatarInitials: 'US',
                bubbleBackground: 'rgba(5, 126, 252, .24)',
                bubbleFromUserBackground: 'rgba(255, 165, 0, .1)',
                hideUploadButton: true
            };

            const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
                if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
                    // When we receive DIRECT_LINE/CONNECT_FULFILLED action, we will send an event activity using WEB_CHAT/SEND_EVENT
                    dispatch({
                        type: 'WEB_CHAT/SEND_EVENT',
                        payload: {
                            name: 'webchat/join',
                            value: { language: window.navigator.language }
                        }
                    });
                }
                return next(action);
            });

            window.WebChat.renderWebChat(
                {
                    //this is for dev/test env, in prrod change to token exchange approach!
                    directLine: window.WebChat.createDirectLine({
                        secret: 'xxxxxxxxxxxxxxxxxxxxxx'
                    }),
                    locale: 'it-IT',
                    styleOptions,
                    store,
                    webSpeechPonyfillFactory: await window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory({
                        credentials: {
                            region: 'westeurope',
                            subscriptionKey: 'xxxxxxxxxxxxxxxxxxxxxx'
                        },
                        textNormalization: 'lexical'
                    })
                },
                document.getElementById('webchat')
            );

            document.querySelector('#webchat > *').focus();

        })().catch(err => console.error(err));


Among the supported features from the TTS there is "TTS Stripping text from Markdown", this is working well when the language is set to "en-US" but switching to "it-IT" no markdown stripping is happening anymore.
Outside this bot framework scenario I tested the same thing on the official TTS presentation web page: https://azure.microsoft.com/en-us/services/cognitive-services/text-to-speech/#features
If you run a quick test in the official demo page section, set something like "This is really ***very*** important markdown text." and the language set to English (United States); The result will read correctly ignoring markdown syntax. Now switch to Italian language, keeping the same text, you will note that the voice will read also the markdown syntax.
Is there an existing language limitation for this feature or something wrong on my configuration?

Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.