Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Releases: speechly/speech-recognition-polyfill

Close microphone on stop

04 Dec 11:02
5bb0ba1

Choose a tag to compare

What

This release applies the patch suggested here, which should close the mic when the polyfill is inactive.

Why

Intended to resolve issue #30 where microphone indicator is still turned on even when polyfill is turned off, which can affect user trust in a web app.

Speechly Browser Client v2

20 Jun 12:25
37b7f36

Choose a tag to compare

This release upgrades the Speechly Browser Client to major version 2.

onerror callback

30 Sep 20:12
eb38ab7

Choose a tag to compare

As per this issue, it wasn't clear how to handle the case where the user denies microphone access. This release addresses a gap in both the documentation in the README and in the way errors are surfaced to the consumer, moving from a non-standard approach to one compliant with the W3C spec.

This release introduces support for the onerror callback as a means of handling errors.

A common error case is when the user chooses not to give permission for the web app to access the microphone. This, and any other error emitted by this polyfill, can be handled via the onerror callback. In such cases, it's advised that you render some fallback UI as these errors will usually mean that voice-driven features will not work and should be disabled:

import { MicrophoneNotAllowedError } from '@speechly/speech-recognition-polyfill';

...

speechRecognition.onerror = (event) => {
  if (event === MicrophoneNotAllowedError) {
    // Microphone permission denied - show some fallback UI
  } else {
    // Unable to start transcribing - show some fallback UI
  }
};

First major release

01 Jun 19:32

Choose a tag to compare

Basic polyfill for SpeechRecognition that implements the following fields and methods:

  • continuous
  • interimResults
  • onresult
  • onend
  • start
  • stop
  • abort

hasBrowserSupport check

01 Jun 19:13
f2297d7

Choose a tag to compare

Pre-release

What

Adds a static property hasBrowserSupport to the class produced by createSpeechlySpeechRecognition that is false if the MediaDevices or AudioContext APIs are not supported by the browser (both of these are required by the underlying Speechly browser client).

Why

IE11 and some old browsers don't support the APIs needed by this polyfill. Previously, the polyfill would throw errors when being created on these browsers. Now, consumers have a means of checking for browser support before using the polyfill, enabling them to gracefully apply fallback behaviour.

Test publish

26 May 19:34

Choose a tag to compare

Test publish Pre-release
Pre-release
v0.0.6

Enable public publishing

Test publish

26 May 19:14

Choose a tag to compare

Test publish Pre-release
Pre-release
v0.0.5

Tweak README examples