-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Selectable audio input device (#3079)
* Bump versions * Select audo input device * Clean up * Detect Web Audio support * Add sample * Converge version of Carbon SDK * Add entry * Add and update entries * Skip warning if AudioConfig is presented * Add test * Add tests * Add authorization token from webchat-waterbottle * Enable IE11 * Add notes * Use daily build * Use daily build * Clean up * Apply suggestions from code review Co-Authored-By: Corina <14900841+corinagum@users.noreply.github.com> * Support Direct Line Speech * Add Direct Line Speech test * Add Direct Line Speech test * Fix Direct Line Speech tests * Improve test reliability * Save WAV files for failures * Add message * Use mockbot-streaming token * Improve reliability * Test reliability * Remove buffer bar * Remove commented out code * Add Direct Line Speech * Apply suggestions from code review Co-Authored-By: Corina <14900841+corinagum@users.noreply.github.com> * Apply PR suggestions * Update entry * Include @babel/plugin-proposal-class-properties * Fix tests Co-authored-by: Corina <14900841+corinagum@users.noreply.github.com>
- Loading branch information
Showing
95 changed files
with
2,770 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/__tests__/__image_snapshots__/**/__diff_output__ | ||
/.env | ||
/coverage | ||
/debug.log | ||
/gh-pages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-5 Bytes
(100%)
__tests__/__image_snapshots__/chrome-docker/video-js-video-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.4 KB
...ization-token-with-direct-line-protocol-should-recognize-hello-world-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...-token-with-direct-line-speech-protocol-should-recognize-hello-world-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.4 KB
...scription-key-with-direct-line-protocol-should-recognize-hello-world-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...on-key-with-direct-line-speech-protocol-should-recognize-hello-world-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions
24
__tests__/html/__jest__/fetchSpeechServicesAuthorizationToken.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import fetch from 'node-fetch'; | ||
|
||
export default async function fetchSpeechServicesAuthorizationToken({ region, subscriptionKey, tokenURL }) { | ||
if (!region && !tokenURL) { | ||
throw new Error('Either "region" or "tokenURL" must be specified.'); | ||
} else if (region && tokenURL) { | ||
throw new Error('Only either "region" or "tokenURL" can be specified.'); | ||
} else if (!subscriptionKey) { | ||
throw new Error('"subscriptionKey" must be specified.'); | ||
} | ||
|
||
const res = await fetch(tokenURL || `https://${region}.api.cognitive.microsoft.com/sts/v1.0/issueToken`, { | ||
headers: { | ||
'Ocp-Apim-Subscription-Key': subscriptionKey | ||
}, | ||
method: 'POST' | ||
}); | ||
|
||
if (!res.ok) { | ||
throw new Error(`Failed to fetch authorization token, server returned ${res.status}`); | ||
} | ||
|
||
return await res.text(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.