Skip to content

Text to Speech Randomly Working #1714

@Amintasn

Description

@Amintasn

Using Webchat v4 with Botframework v3.
In most of the case the bot stops speaking in the middle of a phrase.
Speech-to-Text works fine though.
Also getting special characters in the bot reply like 'Good afternoon! I’m Aila, a Microsoft Virtual Conversational AI Agent. How can I help you today?'
Thoughts?

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <title>Web Chat: Cognitive Services Speech Services using JavaScript</title>
    <script src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>
    <style>
      html, body { height: 100% }
      body { margin: 0 }
      #webchat,
      #webchat > * {
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div id="webchat" role="main"></div>
    <script>
      (async function () {
        const searchParams = new URLSearchParams(window.location.search);
        const subscriptionKey = searchParams.get('s');
        let webSpeechPonyfillFactory;
        if (subscriptionKey) {
            webSpeechPonyfillFactory = await window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory({
            region: searchParams.get('r') || 'westus',
            subscriptionKey
          });
        }
        window.WebChat.renderWebChat({
          directLine: window.WebChat.createDirectLine({secret:'XXXXXX'}),
          webSpeechPonyfillFactory
        }, document.getElementById('webchat'));
        document.querySelector('#webchat > *').focus();
      })().catch(err => console.error(err));
    </script>
  </body>
</html>

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or an unintended behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions