Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech should accept authorizationToken in string format #2822

Closed
compulim opened this issue Jan 16, 2020 · 0 comments · Fixed by #2824
Closed

Speech should accept authorizationToken in string format #2822

compulim opened this issue Jan 16, 2020 · 0 comments · Fixed by #2824
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior.

Comments

@compulim
Copy link
Contributor

compulim commented Jan 16, 2020

Screenshots

image

Version

master

Describe the bug

When creating a ponyfill with authorizationToken and region as a string, it is throwing an error saying, "web-speech-cognitive-services: Authorization token must be a string."

This is because the createCognitiveServicesSpeechServicesPonyfillFactory.js is not resolving Promise.

The fix would be:

image

Steps to reproduce

  1. Use authorizationToken (string) and region (string) to create a Cognitive Services ponyfill factory (see the code below)
  2. Click on the microphone button
const webSpeechPonyfillFactory = await window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory( {
  authorizationToken,
  region
} );

Expected behavior

It should start speech recognition.

Additional context

Related to recent PR #2759.

Also, could we allow no reference grammar ID to be passed to the ponyfill?

Also, the error message is also not very visible until putting a breakpoint. Could we improve this?

[Bug]

@compulim compulim added bug Indicates an unexpected problem or an unintended behavior. Pending labels Jan 16, 2020
@compulim compulim mentioned this issue Mar 5, 2020
40 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant