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

Bump Speech SDK 1.15.1 to support sovereign clouds #3694

Merged
merged 11 commits into from
Feb 9, 2021

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Feb 2, 2021

Fixes #3666. Fixes #3421. Fixes #3411.

Changelog Entry

Added

Fixed

  • Fixes #3411. With Direct Line Speech, clicking on microphone button during speech recognition should no longer stop working, by @compulim in PR #3694
    • Although it no locker lock up microphone, clicking on the microphone button has no effect because Direct Line Speech does not support aborting speech recognition
  • Fixes #3421. With Direct Line Speech, after not able to recognize any speech, it should no longer stop working, by @compulim in PR #3694

Changed

Description

Bump Speech SDK to 1.15.0 to add sovereign cloud support and fixes several issues.

Design

Speech SDK 1.15.0 uses ES Promise interface, instead of a Promise-like interface ported from C#. We updated our test harness to support ES Promise.

We also added sovereign clouds support for Direct Line Speech. The fetchCredentials option passed to DirectLineSpeechSDK.createAdapters() call should return directLineSpeechHostname, instead of region. For example:

return { authorizationToken: '...', directLineSpeechHostname: 'virginia.convai.speech.azure.us' };

This change is outlined in the updated DIRECT_LINE_SPEECH.md.

There are few tracking issues open due to bugs in 1.15.0: #3692 and #3693.

One of the issue requires us to hardcode the audio output format. We will check if the output format is wrong: if SDK pass us the output format of MP3, it must be wrong, because MP3 is not a streamable format and cannot be used in Direct Line Speech. Then we hardcode it with RIFF 16kHz instead.

One potential risk: in the future, if the service decided to send us 44.1kHz (or any other values) instead. This version of Web Chat will still use the hardcoded value 16kHz.

I am not foreseeing the service will update to 44.1kHz sooner than the SDK resolving the issue and Web Chat bumping the SDK. So, IMO, the risk is small.

Specific Changes

  • Bumped [email protected]
  • Bumped [email protected], changes can be found here
    • Bumped [email protected] for peerDependencies
    • Bumped all dependencies to latest versions
    • Fixed race conditions for using different implementation of Promise interface
    • Updated AudioConfig to newer interface by 1.15.0
    • Updated Custom Voice API endpoint from cris.ai to customvoice.speech.microsoft.com
    • Moved build pipeline from Travis to GitHub Actions
  • Added tests for testing speech between hostname and region
  • Updated microphone button CSS: will now lit up in red during dictation using Direct Line Speech
    • Previously, it didn't lit up because it is disabled (Direct Line Speech does not support abort, thus, the button is disabled)
  • Removed workaround code for Speech SDK 1.12.0-1.13.1
    • Safari was not supported in previous version of SDKs because AudioContext was vendor-prefixed in Safari
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • Tested on Edge (Chromium), Chrome, and iOS Safari only. More intensive tests needed during release testing
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim marked this pull request as draft February 2, 2021 18:22
@compulim compulim marked this pull request as ready for review February 9, 2021 19:00
@compulim compulim changed the title Bump Speech SDK 1.15.0 to support sovereign clouds Bump Speech SDK 1.15.1 to support sovereign clouds Feb 9, 2021
Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending a few comments.

@compulim compulim enabled auto-merge (squash) February 9, 2021 21:29
@compulim compulim merged commit 3c31f6b into microsoft:master Feb 9, 2021
@compulim compulim mentioned this pull request Mar 2, 2021
52 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants