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

Fix initial-silence-timeout sample #5403

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions samples/03.speech/i.initial-silence-timeout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,8 @@
);
const { token } = await res.json();

// Select the audio input device which has the keyword "Audio" in it.
const { deviceId } = (await window.navigator.mediaDevices.enumerateDevices()).find(
({ label }) => ~label.indexOf('Audio')
);

// Create the ponyfill factory function, which can be called to create a concrete implementation of the ponyfill.
const webSpeechPonyfillFactory = await window.WebChat.createCognitiveServicesSpeechServicesPonyfillFactory({
audioInputDeviceId: deviceId,

// We are passing the Promise function to the "credentials" field.
// This function will be called every time the token is being used.
credentials: fetchSpeechServicesCredentials,
Expand Down
Loading